hyper_record 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/CHANGELOG +83 -0
- data/LICENSE +20 -0
- data/README +49 -0
- data/Rakefile +43 -0
- data/VERSION.yml +4 -0
- data/benchmark/save.rb +58 -0
- data/hyper_record.gemspec +76 -0
- data/init.rb +1 -0
- data/lib/active_record/connection_adapters/hyper_table_definition.rb +26 -0
- data/lib/active_record/connection_adapters/hypertable_adapter.rb +680 -0
- data/lib/active_record/connection_adapters/qualified_column.rb +57 -0
- data/lib/associations/hyper_has_and_belongs_to_many_association_extension.rb +107 -0
- data/lib/associations/hyper_has_many_association_extension.rb +87 -0
- data/lib/hyper_record.rb +636 -0
- data/lib/hypertable/gen-rb/client_constants.rb +12 -0
- data/lib/hypertable/gen-rb/client_service.rb +1436 -0
- data/lib/hypertable/gen-rb/client_types.rb +253 -0
- data/lib/hypertable/gen-rb/hql_constants.rb +12 -0
- data/lib/hypertable/gen-rb/hql_service.rb +281 -0
- data/lib/hypertable/gen-rb/hql_types.rb +73 -0
- data/lib/hypertable/thrift_client.rb +94 -0
- data/lib/hypertable/thrift_transport_monkey_patch.rb +29 -0
- data/pkg/hyper_record-0.2.8.gem +0 -0
- data/spec/fixtures/pages.yml +8 -0
- data/spec/fixtures/qualified_pages.yml +1 -0
- data/spec/lib/associations_spec.rb +235 -0
- data/spec/lib/hyper_record_spec.rb +948 -0
- data/spec/lib/hypertable_adapter_spec.rb +121 -0
- data/spec/spec_helper.rb +130 -0
- data/test/test_helper.rb +10 -0
- data/test/thrift_client_test.rb +590 -0
- metadata +99 -0
@@ -0,0 +1,253 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
|
8
|
+
module Hypertable
|
9
|
+
module ThriftGen
|
10
|
+
module CellFlag
|
11
|
+
DELETE_ROW = 0
|
12
|
+
DELETE_CF = 1
|
13
|
+
DELETE_CELL = 2
|
14
|
+
INSERT = 255
|
15
|
+
VALUE_MAP = {0 => "DELETE_ROW", 1 => "DELETE_CF", 2 => "DELETE_CELL", 255 => "INSERT"}
|
16
|
+
VALID_VALUES = Set.new([DELETE_ROW, DELETE_CF, DELETE_CELL, INSERT]).freeze
|
17
|
+
end
|
18
|
+
|
19
|
+
module MutatorFlag
|
20
|
+
NO_LOG_SYNC = 1
|
21
|
+
VALUE_MAP = {1 => "NO_LOG_SYNC"}
|
22
|
+
VALID_VALUES = Set.new([NO_LOG_SYNC]).freeze
|
23
|
+
end
|
24
|
+
|
25
|
+
# Specifies a range of rows
|
26
|
+
#
|
27
|
+
# <dl>
|
28
|
+
# <dt>start_row</dt>
|
29
|
+
# <dd>The row to start scan with. Must not contain nulls (0x00)</dd>
|
30
|
+
#
|
31
|
+
# <dt>start_inclusive</dt>
|
32
|
+
# <dd>Whether the start row is included in the result (default: true)</dd>
|
33
|
+
#
|
34
|
+
# <dt>end_row</dt>
|
35
|
+
# <dd>The row to end scan with. Must not contain nulls</dd>
|
36
|
+
#
|
37
|
+
# <dt>end_inclusive</dt>
|
38
|
+
# <dd>Whether the end row is included in the result (default: true)</dd>
|
39
|
+
# </dl>
|
40
|
+
class RowInterval
|
41
|
+
include ::Thrift::Struct
|
42
|
+
START_ROW = 1
|
43
|
+
START_INCLUSIVE = 2
|
44
|
+
END_ROW = 3
|
45
|
+
END_INCLUSIVE = 4
|
46
|
+
|
47
|
+
::Thrift::Struct.field_accessor self, :start_row, :start_inclusive, :end_row, :end_inclusive
|
48
|
+
FIELDS = {
|
49
|
+
START_ROW => {:type => ::Thrift::Types::STRING, :name => 'start_row', :optional => true},
|
50
|
+
START_INCLUSIVE => {:type => ::Thrift::Types::BOOL, :name => 'start_inclusive', :default => true, :optional => true},
|
51
|
+
END_ROW => {:type => ::Thrift::Types::STRING, :name => 'end_row', :optional => true},
|
52
|
+
END_INCLUSIVE => {:type => ::Thrift::Types::BOOL, :name => 'end_inclusive', :default => true, :optional => true}
|
53
|
+
}
|
54
|
+
|
55
|
+
def struct_fields; FIELDS; end
|
56
|
+
|
57
|
+
def validate
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
# Specifies a range of cells
|
63
|
+
#
|
64
|
+
# <dl>
|
65
|
+
# <dt>start_row</dt>
|
66
|
+
# <dd>The row to start scan with. Must not contain nulls (0x00)</dd>
|
67
|
+
#
|
68
|
+
# <dt>start_column</dt>
|
69
|
+
# <dd>The column (prefix of column_family:column_qualifier) of the
|
70
|
+
# start row for the scan</dd>
|
71
|
+
#
|
72
|
+
# <dt>start_inclusive</dt>
|
73
|
+
# <dd>Whether the start row is included in the result (default: true)</dd>
|
74
|
+
#
|
75
|
+
# <dt>end_row</dt>
|
76
|
+
# <dd>The row to end scan with. Must not contain nulls</dd>
|
77
|
+
#
|
78
|
+
# <dt>end_column</dt>
|
79
|
+
# <dd>The column (prefix of column_family:column_qualifier) of the
|
80
|
+
# end row for the scan</dd>
|
81
|
+
#
|
82
|
+
# <dt>end_inclusive</dt>
|
83
|
+
# <dd>Whether the end row is included in the result (default: true)</dd>
|
84
|
+
# </dl>
|
85
|
+
class CellInterval
|
86
|
+
include ::Thrift::Struct
|
87
|
+
START_ROW = 1
|
88
|
+
START_COLUMN = 2
|
89
|
+
START_INCLUSIVE = 3
|
90
|
+
END_ROW = 4
|
91
|
+
END_COLUMN = 5
|
92
|
+
END_INCLUSIVE = 6
|
93
|
+
|
94
|
+
::Thrift::Struct.field_accessor self, :start_row, :start_column, :start_inclusive, :end_row, :end_column, :end_inclusive
|
95
|
+
FIELDS = {
|
96
|
+
START_ROW => {:type => ::Thrift::Types::STRING, :name => 'start_row', :optional => true},
|
97
|
+
START_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'start_column', :optional => true},
|
98
|
+
START_INCLUSIVE => {:type => ::Thrift::Types::BOOL, :name => 'start_inclusive', :default => true, :optional => true},
|
99
|
+
END_ROW => {:type => ::Thrift::Types::STRING, :name => 'end_row', :optional => true},
|
100
|
+
END_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'end_column', :optional => true},
|
101
|
+
END_INCLUSIVE => {:type => ::Thrift::Types::BOOL, :name => 'end_inclusive', :default => true, :optional => true}
|
102
|
+
}
|
103
|
+
|
104
|
+
def struct_fields; FIELDS; end
|
105
|
+
|
106
|
+
def validate
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
# Specifies options for a scan
|
112
|
+
#
|
113
|
+
# <dl>
|
114
|
+
# <dt>row_intervals</dt>
|
115
|
+
# <dd>A list of ranges of rows to scan. Mutually exclusive with
|
116
|
+
# cell_interval</dd>
|
117
|
+
#
|
118
|
+
# <dt>cell_intervals</dt>
|
119
|
+
# <dd>A list of ranges of cells to scan. Mutually exclusive with
|
120
|
+
# row_intervals</dd>
|
121
|
+
#
|
122
|
+
# <dt>return_deletes</dt>
|
123
|
+
# <dd>Indicates whether cells pending delete are returned</dd>
|
124
|
+
#
|
125
|
+
# <dt>revs</dt>
|
126
|
+
# <dd>Specifies max number of revisions of cells to return</dd>
|
127
|
+
#
|
128
|
+
# <dt>row_limit</dt>
|
129
|
+
# <dd>Specifies max number of rows to return</dd>
|
130
|
+
#
|
131
|
+
# <dt>start_time</dt>
|
132
|
+
# <dd>Specifies start time in nanoseconds since epoch for cells to
|
133
|
+
# return</dd>
|
134
|
+
#
|
135
|
+
# <dt>end_time</dt>
|
136
|
+
# <dd>Specifies end time in nanoseconds since epoch for cells to return</dd>
|
137
|
+
#
|
138
|
+
# <dt>columns</dt>
|
139
|
+
# <dd>Specifies the names of the columns to return</dd>
|
140
|
+
# </dl>
|
141
|
+
class ScanSpec
|
142
|
+
include ::Thrift::Struct
|
143
|
+
ROW_INTERVALS = 1
|
144
|
+
CELL_INTERVALS = 2
|
145
|
+
RETURN_DELETES = 3
|
146
|
+
REVS = 4
|
147
|
+
ROW_LIMIT = 5
|
148
|
+
START_TIME = 6
|
149
|
+
END_TIME = 7
|
150
|
+
COLUMNS = 8
|
151
|
+
|
152
|
+
::Thrift::Struct.field_accessor self, :row_intervals, :cell_intervals, :return_deletes, :revs, :row_limit, :start_time, :end_time, :columns
|
153
|
+
FIELDS = {
|
154
|
+
ROW_INTERVALS => {:type => ::Thrift::Types::LIST, :name => 'row_intervals', :element => {:type => ::Thrift::Types::STRUCT, :class => Hypertable::ThriftGen::RowInterval}, :optional => true},
|
155
|
+
CELL_INTERVALS => {:type => ::Thrift::Types::LIST, :name => 'cell_intervals', :element => {:type => ::Thrift::Types::STRUCT, :class => Hypertable::ThriftGen::CellInterval}, :optional => true},
|
156
|
+
RETURN_DELETES => {:type => ::Thrift::Types::BOOL, :name => 'return_deletes', :default => false, :optional => true},
|
157
|
+
REVS => {:type => ::Thrift::Types::I32, :name => 'revs', :default => 0, :optional => true},
|
158
|
+
ROW_LIMIT => {:type => ::Thrift::Types::I32, :name => 'row_limit', :default => 0, :optional => true},
|
159
|
+
START_TIME => {:type => ::Thrift::Types::I64, :name => 'start_time', :optional => true},
|
160
|
+
END_TIME => {:type => ::Thrift::Types::I64, :name => 'end_time', :optional => true},
|
161
|
+
COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
|
162
|
+
}
|
163
|
+
|
164
|
+
def struct_fields; FIELDS; end
|
165
|
+
|
166
|
+
def validate
|
167
|
+
end
|
168
|
+
|
169
|
+
end
|
170
|
+
|
171
|
+
# Defines a table cell
|
172
|
+
#
|
173
|
+
# <dl>
|
174
|
+
# <dt>row_key</dt>
|
175
|
+
# <dd>Specifies the row key. Note, it cannot contain null characters.
|
176
|
+
# If a row key is not specified in a return cell, it's assumed to
|
177
|
+
# be the same as the previous cell</dd>
|
178
|
+
#
|
179
|
+
# <dt>column_family</dt>
|
180
|
+
# <dd>Specifies the column family</dd>
|
181
|
+
#
|
182
|
+
# <dt>column_qualifier</dt>
|
183
|
+
# <dd>Specifies the column qualifier. A column family must be specified.</dd>
|
184
|
+
#
|
185
|
+
# <dt>value</dt>
|
186
|
+
# <dd>Value of a cell. Currently a sequence of uninterpreted bytes.</dd>
|
187
|
+
#
|
188
|
+
# <dt>timestamp</dt>
|
189
|
+
# <dd>Nanoseconds since epoch for the cell<dd>
|
190
|
+
#
|
191
|
+
# <dt>revision</dt>
|
192
|
+
# <dd>A 64-bit revision number for the cell</dd>
|
193
|
+
#
|
194
|
+
# <dt>flag</dt>
|
195
|
+
# <dd>A 16-bit integer indicating the state of the cell</dd>
|
196
|
+
# </dl>
|
197
|
+
class Cell
|
198
|
+
include ::Thrift::Struct
|
199
|
+
ROW_KEY = 1
|
200
|
+
COLUMN_FAMILY = 2
|
201
|
+
COLUMN_QUALIFIER = 3
|
202
|
+
VALUE = 4
|
203
|
+
TIMESTAMP = 5
|
204
|
+
REVISION = 6
|
205
|
+
FLAG = 7
|
206
|
+
|
207
|
+
::Thrift::Struct.field_accessor self, :row_key, :column_family, :column_qualifier, :value, :timestamp, :revision, :flag
|
208
|
+
FIELDS = {
|
209
|
+
ROW_KEY => {:type => ::Thrift::Types::STRING, :name => 'row_key', :optional => true},
|
210
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family', :optional => true},
|
211
|
+
COLUMN_QUALIFIER => {:type => ::Thrift::Types::STRING, :name => 'column_qualifier', :optional => true},
|
212
|
+
VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :optional => true},
|
213
|
+
TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
|
214
|
+
REVISION => {:type => ::Thrift::Types::I64, :name => 'revision', :optional => true},
|
215
|
+
FLAG => {:type => ::Thrift::Types::I16, :name => 'flag', :default => 255, :optional => true}
|
216
|
+
}
|
217
|
+
|
218
|
+
def struct_fields; FIELDS; end
|
219
|
+
|
220
|
+
def validate
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
|
225
|
+
# Exception for thrift clients.
|
226
|
+
#
|
227
|
+
# <dl>
|
228
|
+
# <dt>code</dt><dd>Internal use (defined in src/cc/Common/Error.h)</dd>
|
229
|
+
# <dt>message</dt><dd>A message about the exception</dd>
|
230
|
+
# </dl>
|
231
|
+
#
|
232
|
+
# Note: some languages (like php) don't have adequate namespace, so Exception
|
233
|
+
# would conflict with language builtins.
|
234
|
+
class ClientException < ::Thrift::Exception
|
235
|
+
include ::Thrift::Struct
|
236
|
+
CODE = 1
|
237
|
+
MESSAGE = 2
|
238
|
+
|
239
|
+
::Thrift::Struct.field_accessor self, :code, :message
|
240
|
+
FIELDS = {
|
241
|
+
CODE => {:type => ::Thrift::Types::I32, :name => 'code'},
|
242
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
243
|
+
}
|
244
|
+
|
245
|
+
def struct_fields; FIELDS; end
|
246
|
+
|
247
|
+
def validate
|
248
|
+
end
|
249
|
+
|
250
|
+
end
|
251
|
+
|
252
|
+
end
|
253
|
+
end
|
@@ -0,0 +1,281 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'client_service'
|
9
|
+
require 'hql_types'
|
10
|
+
|
11
|
+
module Hypertable
|
12
|
+
module ThriftGen
|
13
|
+
module HqlService
|
14
|
+
class Client < Hypertable::ThriftGen::ClientService::Client
|
15
|
+
include ::Thrift::Client
|
16
|
+
|
17
|
+
def hql_exec(command, noflush, unbuffered)
|
18
|
+
send_hql_exec(command, noflush, unbuffered)
|
19
|
+
return recv_hql_exec()
|
20
|
+
end
|
21
|
+
|
22
|
+
def send_hql_exec(command, noflush, unbuffered)
|
23
|
+
send_message('hql_exec', Hql_exec_args, :command => command, :noflush => noflush, :unbuffered => unbuffered)
|
24
|
+
end
|
25
|
+
|
26
|
+
def recv_hql_exec()
|
27
|
+
result = receive_message(Hql_exec_result)
|
28
|
+
return result.success unless result.success.nil?
|
29
|
+
raise result.e unless result.e.nil?
|
30
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'hql_exec failed: unknown result')
|
31
|
+
end
|
32
|
+
|
33
|
+
def hql_query(command)
|
34
|
+
send_hql_query(command)
|
35
|
+
return recv_hql_query()
|
36
|
+
end
|
37
|
+
|
38
|
+
def send_hql_query(command)
|
39
|
+
send_message('hql_query', Hql_query_args, :command => command)
|
40
|
+
end
|
41
|
+
|
42
|
+
def recv_hql_query()
|
43
|
+
result = receive_message(Hql_query_result)
|
44
|
+
return result.success unless result.success.nil?
|
45
|
+
raise result.e unless result.e.nil?
|
46
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'hql_query failed: unknown result')
|
47
|
+
end
|
48
|
+
|
49
|
+
def hql_exec2(command, noflush, unbuffered)
|
50
|
+
send_hql_exec2(command, noflush, unbuffered)
|
51
|
+
return recv_hql_exec2()
|
52
|
+
end
|
53
|
+
|
54
|
+
def send_hql_exec2(command, noflush, unbuffered)
|
55
|
+
send_message('hql_exec2', Hql_exec2_args, :command => command, :noflush => noflush, :unbuffered => unbuffered)
|
56
|
+
end
|
57
|
+
|
58
|
+
def recv_hql_exec2()
|
59
|
+
result = receive_message(Hql_exec2_result)
|
60
|
+
return result.success unless result.success.nil?
|
61
|
+
raise result.e unless result.e.nil?
|
62
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'hql_exec2 failed: unknown result')
|
63
|
+
end
|
64
|
+
|
65
|
+
def hql_query2(command)
|
66
|
+
send_hql_query2(command)
|
67
|
+
return recv_hql_query2()
|
68
|
+
end
|
69
|
+
|
70
|
+
def send_hql_query2(command)
|
71
|
+
send_message('hql_query2', Hql_query2_args, :command => command)
|
72
|
+
end
|
73
|
+
|
74
|
+
def recv_hql_query2()
|
75
|
+
result = receive_message(Hql_query2_result)
|
76
|
+
return result.success unless result.success.nil?
|
77
|
+
raise result.e unless result.e.nil?
|
78
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'hql_query2 failed: unknown result')
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
class Processor < Hypertable::ThriftGen::ClientService::Processor
|
84
|
+
include ::Thrift::Processor
|
85
|
+
|
86
|
+
def process_hql_exec(seqid, iprot, oprot)
|
87
|
+
args = read_args(iprot, Hql_exec_args)
|
88
|
+
result = Hql_exec_result.new()
|
89
|
+
begin
|
90
|
+
result.success = @handler.hql_exec(args.command, args.noflush, args.unbuffered)
|
91
|
+
rescue Hypertable::ThriftGen::ClientException => e
|
92
|
+
result.e = e
|
93
|
+
end
|
94
|
+
write_result(result, oprot, 'hql_exec', seqid)
|
95
|
+
end
|
96
|
+
|
97
|
+
def process_hql_query(seqid, iprot, oprot)
|
98
|
+
args = read_args(iprot, Hql_query_args)
|
99
|
+
result = Hql_query_result.new()
|
100
|
+
begin
|
101
|
+
result.success = @handler.hql_query(args.command)
|
102
|
+
rescue Hypertable::ThriftGen::ClientException => e
|
103
|
+
result.e = e
|
104
|
+
end
|
105
|
+
write_result(result, oprot, 'hql_query', seqid)
|
106
|
+
end
|
107
|
+
|
108
|
+
def process_hql_exec2(seqid, iprot, oprot)
|
109
|
+
args = read_args(iprot, Hql_exec2_args)
|
110
|
+
result = Hql_exec2_result.new()
|
111
|
+
begin
|
112
|
+
result.success = @handler.hql_exec2(args.command, args.noflush, args.unbuffered)
|
113
|
+
rescue Hypertable::ThriftGen::ClientException => e
|
114
|
+
result.e = e
|
115
|
+
end
|
116
|
+
write_result(result, oprot, 'hql_exec2', seqid)
|
117
|
+
end
|
118
|
+
|
119
|
+
def process_hql_query2(seqid, iprot, oprot)
|
120
|
+
args = read_args(iprot, Hql_query2_args)
|
121
|
+
result = Hql_query2_result.new()
|
122
|
+
begin
|
123
|
+
result.success = @handler.hql_query2(args.command)
|
124
|
+
rescue Hypertable::ThriftGen::ClientException => e
|
125
|
+
result.e = e
|
126
|
+
end
|
127
|
+
write_result(result, oprot, 'hql_query2', seqid)
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
|
132
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
133
|
+
|
134
|
+
class Hql_exec_args
|
135
|
+
include ::Thrift::Struct
|
136
|
+
COMMAND = 1
|
137
|
+
NOFLUSH = 2
|
138
|
+
UNBUFFERED = 3
|
139
|
+
|
140
|
+
::Thrift::Struct.field_accessor self, :command, :noflush, :unbuffered
|
141
|
+
FIELDS = {
|
142
|
+
COMMAND => {:type => ::Thrift::Types::STRING, :name => 'command'},
|
143
|
+
NOFLUSH => {:type => ::Thrift::Types::BOOL, :name => 'noflush', :default => false},
|
144
|
+
UNBUFFERED => {:type => ::Thrift::Types::BOOL, :name => 'unbuffered', :default => false}
|
145
|
+
}
|
146
|
+
|
147
|
+
def struct_fields; FIELDS; end
|
148
|
+
|
149
|
+
def validate
|
150
|
+
end
|
151
|
+
|
152
|
+
end
|
153
|
+
|
154
|
+
class Hql_exec_result
|
155
|
+
include ::Thrift::Struct
|
156
|
+
SUCCESS = 0
|
157
|
+
E = 1
|
158
|
+
|
159
|
+
::Thrift::Struct.field_accessor self, :success, :e
|
160
|
+
FIELDS = {
|
161
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Hypertable::ThriftGen::HqlResult},
|
162
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => Hypertable::ThriftGen::ClientException}
|
163
|
+
}
|
164
|
+
|
165
|
+
def struct_fields; FIELDS; end
|
166
|
+
|
167
|
+
def validate
|
168
|
+
end
|
169
|
+
|
170
|
+
end
|
171
|
+
|
172
|
+
class Hql_query_args
|
173
|
+
include ::Thrift::Struct
|
174
|
+
COMMAND = 1
|
175
|
+
|
176
|
+
::Thrift::Struct.field_accessor self, :command
|
177
|
+
FIELDS = {
|
178
|
+
COMMAND => {:type => ::Thrift::Types::STRING, :name => 'command'}
|
179
|
+
}
|
180
|
+
|
181
|
+
def struct_fields; FIELDS; end
|
182
|
+
|
183
|
+
def validate
|
184
|
+
end
|
185
|
+
|
186
|
+
end
|
187
|
+
|
188
|
+
class Hql_query_result
|
189
|
+
include ::Thrift::Struct
|
190
|
+
SUCCESS = 0
|
191
|
+
E = 1
|
192
|
+
|
193
|
+
::Thrift::Struct.field_accessor self, :success, :e
|
194
|
+
FIELDS = {
|
195
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Hypertable::ThriftGen::HqlResult},
|
196
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => Hypertable::ThriftGen::ClientException}
|
197
|
+
}
|
198
|
+
|
199
|
+
def struct_fields; FIELDS; end
|
200
|
+
|
201
|
+
def validate
|
202
|
+
end
|
203
|
+
|
204
|
+
end
|
205
|
+
|
206
|
+
class Hql_exec2_args
|
207
|
+
include ::Thrift::Struct
|
208
|
+
COMMAND = 1
|
209
|
+
NOFLUSH = 2
|
210
|
+
UNBUFFERED = 3
|
211
|
+
|
212
|
+
::Thrift::Struct.field_accessor self, :command, :noflush, :unbuffered
|
213
|
+
FIELDS = {
|
214
|
+
COMMAND => {:type => ::Thrift::Types::STRING, :name => 'command'},
|
215
|
+
NOFLUSH => {:type => ::Thrift::Types::BOOL, :name => 'noflush', :default => false},
|
216
|
+
UNBUFFERED => {:type => ::Thrift::Types::BOOL, :name => 'unbuffered', :default => false}
|
217
|
+
}
|
218
|
+
|
219
|
+
def struct_fields; FIELDS; end
|
220
|
+
|
221
|
+
def validate
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
|
226
|
+
class Hql_exec2_result
|
227
|
+
include ::Thrift::Struct
|
228
|
+
SUCCESS = 0
|
229
|
+
E = 1
|
230
|
+
|
231
|
+
::Thrift::Struct.field_accessor self, :success, :e
|
232
|
+
FIELDS = {
|
233
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Hypertable::ThriftGen::HqlResult2},
|
234
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => Hypertable::ThriftGen::ClientException}
|
235
|
+
}
|
236
|
+
|
237
|
+
def struct_fields; FIELDS; end
|
238
|
+
|
239
|
+
def validate
|
240
|
+
end
|
241
|
+
|
242
|
+
end
|
243
|
+
|
244
|
+
class Hql_query2_args
|
245
|
+
include ::Thrift::Struct
|
246
|
+
COMMAND = 1
|
247
|
+
|
248
|
+
::Thrift::Struct.field_accessor self, :command
|
249
|
+
FIELDS = {
|
250
|
+
COMMAND => {:type => ::Thrift::Types::STRING, :name => 'command'}
|
251
|
+
}
|
252
|
+
|
253
|
+
def struct_fields; FIELDS; end
|
254
|
+
|
255
|
+
def validate
|
256
|
+
end
|
257
|
+
|
258
|
+
end
|
259
|
+
|
260
|
+
class Hql_query2_result
|
261
|
+
include ::Thrift::Struct
|
262
|
+
SUCCESS = 0
|
263
|
+
E = 1
|
264
|
+
|
265
|
+
::Thrift::Struct.field_accessor self, :success, :e
|
266
|
+
FIELDS = {
|
267
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Hypertable::ThriftGen::HqlResult2},
|
268
|
+
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => Hypertable::ThriftGen::ClientException}
|
269
|
+
}
|
270
|
+
|
271
|
+
def struct_fields; FIELDS; end
|
272
|
+
|
273
|
+
def validate
|
274
|
+
end
|
275
|
+
|
276
|
+
end
|
277
|
+
|
278
|
+
end
|
279
|
+
|
280
|
+
end
|
281
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'client_types'
|
8
|
+
|
9
|
+
|
10
|
+
module Hypertable
|
11
|
+
module ThriftGen
|
12
|
+
# Result type of HQL queries
|
13
|
+
#
|
14
|
+
# <dl>
|
15
|
+
# <dt>results</dt>
|
16
|
+
# <dd>String results from metadata queries</dd>
|
17
|
+
#
|
18
|
+
# <dt>cells</dt>
|
19
|
+
# <dd>Resulting table cells of for buffered queries</dd>
|
20
|
+
#
|
21
|
+
# <dt>scanner</dt>
|
22
|
+
# <dd>Resulting scanner ID for unbuffered queries</dd>
|
23
|
+
#
|
24
|
+
# <dt>mutator</dt>
|
25
|
+
# <dd>Resulting mutator ID for unflushed modifying queries</dd>
|
26
|
+
# </dl>
|
27
|
+
class HqlResult
|
28
|
+
include ::Thrift::Struct
|
29
|
+
RESULTS = 1
|
30
|
+
CELLS = 2
|
31
|
+
SCANNER = 3
|
32
|
+
MUTATOR = 4
|
33
|
+
|
34
|
+
::Thrift::Struct.field_accessor self, :results, :cells, :scanner, :mutator
|
35
|
+
FIELDS = {
|
36
|
+
RESULTS => {:type => ::Thrift::Types::LIST, :name => 'results', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
|
37
|
+
CELLS => {:type => ::Thrift::Types::LIST, :name => 'cells', :element => {:type => ::Thrift::Types::STRUCT, :class => Hypertable::ThriftGen::Cell}, :optional => true},
|
38
|
+
SCANNER => {:type => ::Thrift::Types::I64, :name => 'scanner', :optional => true},
|
39
|
+
MUTATOR => {:type => ::Thrift::Types::I64, :name => 'mutator', :optional => true}
|
40
|
+
}
|
41
|
+
|
42
|
+
def struct_fields; FIELDS; end
|
43
|
+
|
44
|
+
def validate
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
# Same as HqlResult except with cell as array
|
50
|
+
class HqlResult2
|
51
|
+
include ::Thrift::Struct
|
52
|
+
RESULTS = 1
|
53
|
+
CELLS = 2
|
54
|
+
SCANNER = 3
|
55
|
+
MUTATOR = 4
|
56
|
+
|
57
|
+
::Thrift::Struct.field_accessor self, :results, :cells, :scanner, :mutator
|
58
|
+
FIELDS = {
|
59
|
+
RESULTS => {:type => ::Thrift::Types::LIST, :name => 'results', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
|
60
|
+
CELLS => {:type => ::Thrift::Types::LIST, :name => 'cells', :element => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRING}}, :optional => true},
|
61
|
+
SCANNER => {:type => ::Thrift::Types::I64, :name => 'scanner', :optional => true},
|
62
|
+
MUTATOR => {:type => ::Thrift::Types::I64, :name => 'mutator', :optional => true}
|
63
|
+
}
|
64
|
+
|
65
|
+
def struct_fields; FIELDS; end
|
66
|
+
|
67
|
+
def validate
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
end
|