sequel-impala 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG +3 -0
- data/LICENSE +462 -0
- data/README.rdoc +39 -0
- data/Rakefile +39 -0
- data/lib/driver/commons-logging-1.2.jar +0 -0
- data/lib/driver/hadoop-common-2.6.0.jar +0 -0
- data/lib/driver/hadoop-core-2.6.0.jar +0 -0
- data/lib/driver/hive-exec-1.1.0.jar +0 -0
- data/lib/driver/hive-jdbc-1.1.0.jar +0 -0
- data/lib/driver/hive-metastore-1.1.0.jar +0 -0
- data/lib/driver/hive-service-1.1.0.jar +0 -0
- data/lib/driver/httpclient-4.3.jar +0 -0
- data/lib/driver/httpcore-4.3.jar +0 -0
- data/lib/driver/libfb303-0.9.0.jar +0 -0
- data/lib/driver/slf4j-api-1.7.5.jar +0 -0
- data/lib/impala.rb +47 -0
- data/lib/impala/connection.rb +117 -0
- data/lib/impala/cursor.rb +157 -0
- data/lib/impala/protocol.rb +8 -0
- data/lib/impala/protocol/beeswax_constants.rb +15 -0
- data/lib/impala/protocol/beeswax_service.rb +766 -0
- data/lib/impala/protocol/beeswax_types.rb +193 -0
- data/lib/impala/protocol/cli_service_constants.rb +60 -0
- data/lib/impala/protocol/cli_service_types.rb +1452 -0
- data/lib/impala/protocol/facebook_service.rb +706 -0
- data/lib/impala/protocol/fb303_constants.rb +15 -0
- data/lib/impala/protocol/fb303_types.rb +25 -0
- data/lib/impala/protocol/hive_metastore_constants.rb +53 -0
- data/lib/impala/protocol/hive_metastore_types.rb +698 -0
- data/lib/impala/protocol/impala_hive_server2_service.rb +29 -0
- data/lib/impala/protocol/impala_service.rb +377 -0
- data/lib/impala/protocol/impala_service_constants.rb +13 -0
- data/lib/impala/protocol/impala_service_types.rb +90 -0
- data/lib/impala/protocol/status_constants.rb +13 -0
- data/lib/impala/protocol/status_types.rb +46 -0
- data/lib/impala/protocol/t_c_l_i_service.rb +948 -0
- data/lib/impala/protocol/thrift_hive_metastore.rb +4707 -0
- data/lib/impala/version.rb +3 -0
- data/lib/jdbc/hive2.rb +46 -0
- data/lib/sequel/adapters/impala.rb +123 -0
- data/lib/sequel/adapters/jdbc/hive2.rb +26 -0
- data/lib/sequel/adapters/shared/impala.rb +635 -0
- data/lib/sequel/extensions/csv_to_parquet.rb +112 -0
- data/spec/database_test.rb +56 -0
- data/spec/dataset_test.rb +1268 -0
- data/spec/files/bad_down_migration/001_create_alt_basic.rb +4 -0
- data/spec/files/bad_down_migration/002_create_alt_advanced.rb +4 -0
- data/spec/files/bad_timestamped_migrations/1273253849_create_sessions.rb +9 -0
- data/spec/files/bad_timestamped_migrations/1273253851_create_nodes.rb +9 -0
- data/spec/files/bad_timestamped_migrations/1273253853_3_create_users.rb +3 -0
- data/spec/files/bad_up_migration/001_create_alt_basic.rb +4 -0
- data/spec/files/bad_up_migration/002_create_alt_advanced.rb +3 -0
- data/spec/files/convert_to_timestamp_migrations/001_create_sessions.rb +9 -0
- data/spec/files/convert_to_timestamp_migrations/002_create_nodes.rb +9 -0
- data/spec/files/convert_to_timestamp_migrations/003_3_create_users.rb +4 -0
- data/spec/files/convert_to_timestamp_migrations/1273253850_create_artists.rb +9 -0
- data/spec/files/convert_to_timestamp_migrations/1273253852_create_albums.rb +9 -0
- data/spec/files/duplicate_timestamped_migrations/1273253849_create_sessions.rb +9 -0
- data/spec/files/duplicate_timestamped_migrations/1273253853_create_nodes.rb +9 -0
- data/spec/files/duplicate_timestamped_migrations/1273253853_create_users.rb +4 -0
- data/spec/files/integer_migrations/001_create_sessions.rb +9 -0
- data/spec/files/integer_migrations/002_create_nodes.rb +9 -0
- data/spec/files/integer_migrations/003_3_create_users.rb +4 -0
- data/spec/files/interleaved_timestamped_migrations/1273253849_create_sessions.rb +9 -0
- data/spec/files/interleaved_timestamped_migrations/1273253850_create_artists.rb +9 -0
- data/spec/files/interleaved_timestamped_migrations/1273253851_create_nodes.rb +9 -0
- data/spec/files/interleaved_timestamped_migrations/1273253852_create_albums.rb +9 -0
- data/spec/files/interleaved_timestamped_migrations/1273253853_3_create_users.rb +4 -0
- data/spec/files/reversible_migrations/001_reversible.rb +5 -0
- data/spec/files/reversible_migrations/002_reversible.rb +5 -0
- data/spec/files/reversible_migrations/003_reversible.rb +5 -0
- data/spec/files/reversible_migrations/004_reversible.rb +5 -0
- data/spec/files/reversible_migrations/005_reversible.rb +10 -0
- data/spec/files/timestamped_migrations/1273253849_create_sessions.rb +9 -0
- data/spec/files/timestamped_migrations/1273253851_create_nodes.rb +9 -0
- data/spec/files/timestamped_migrations/1273253853_3_create_users.rb +4 -0
- data/spec/impala_test.rb +285 -0
- data/spec/migrator_test.rb +240 -0
- data/spec/plugin_test.rb +91 -0
- data/spec/prepared_statement_test.rb +327 -0
- data/spec/schema_test.rb +356 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/timezone_test.rb +86 -0
- data/spec/type_test.rb +99 -0
- metadata +239 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.1)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 't_c_l_i_service'
|
9
|
+
require 'impala_service_types'
|
10
|
+
|
11
|
+
module Impala
|
12
|
+
module Protocol
|
13
|
+
module ImpalaHiveServer2Service
|
14
|
+
class Client < ::Impala::Protocol::Hive::TCLIService::Client
|
15
|
+
include ::Thrift::Client
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
class Processor < ::Impala::Protocol::Hive::TCLIService::Processor
|
20
|
+
include ::Thrift::Processor
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,377 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.1)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'beeswax_service'
|
9
|
+
require 'impala_service_types'
|
10
|
+
|
11
|
+
module Impala
|
12
|
+
module Protocol
|
13
|
+
module ImpalaService
|
14
|
+
class Client < ::Impala::Protocol::Beeswax::BeeswaxService::Client
|
15
|
+
include ::Thrift::Client
|
16
|
+
|
17
|
+
def Cancel(query_id)
|
18
|
+
send_Cancel(query_id)
|
19
|
+
return recv_Cancel()
|
20
|
+
end
|
21
|
+
|
22
|
+
def send_Cancel(query_id)
|
23
|
+
send_message('Cancel', Cancel_args, :query_id => query_id)
|
24
|
+
end
|
25
|
+
|
26
|
+
def recv_Cancel()
|
27
|
+
result = receive_message(Cancel_result)
|
28
|
+
return result.success unless result.success.nil?
|
29
|
+
raise result.error unless result.error.nil?
|
30
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'Cancel failed: unknown result')
|
31
|
+
end
|
32
|
+
|
33
|
+
def ResetCatalog()
|
34
|
+
send_ResetCatalog()
|
35
|
+
return recv_ResetCatalog()
|
36
|
+
end
|
37
|
+
|
38
|
+
def send_ResetCatalog()
|
39
|
+
send_message('ResetCatalog', ResetCatalog_args)
|
40
|
+
end
|
41
|
+
|
42
|
+
def recv_ResetCatalog()
|
43
|
+
result = receive_message(ResetCatalog_result)
|
44
|
+
return result.success unless result.success.nil?
|
45
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ResetCatalog failed: unknown result')
|
46
|
+
end
|
47
|
+
|
48
|
+
def ResetTable(request)
|
49
|
+
send_ResetTable(request)
|
50
|
+
return recv_ResetTable()
|
51
|
+
end
|
52
|
+
|
53
|
+
def send_ResetTable(request)
|
54
|
+
send_message('ResetTable', ResetTable_args, :request => request)
|
55
|
+
end
|
56
|
+
|
57
|
+
def recv_ResetTable()
|
58
|
+
result = receive_message(ResetTable_result)
|
59
|
+
return result.success unless result.success.nil?
|
60
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ResetTable failed: unknown result')
|
61
|
+
end
|
62
|
+
|
63
|
+
def GetRuntimeProfile(query_id)
|
64
|
+
send_GetRuntimeProfile(query_id)
|
65
|
+
return recv_GetRuntimeProfile()
|
66
|
+
end
|
67
|
+
|
68
|
+
def send_GetRuntimeProfile(query_id)
|
69
|
+
send_message('GetRuntimeProfile', GetRuntimeProfile_args, :query_id => query_id)
|
70
|
+
end
|
71
|
+
|
72
|
+
def recv_GetRuntimeProfile()
|
73
|
+
result = receive_message(GetRuntimeProfile_result)
|
74
|
+
return result.success unless result.success.nil?
|
75
|
+
raise result.error unless result.error.nil?
|
76
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetRuntimeProfile failed: unknown result')
|
77
|
+
end
|
78
|
+
|
79
|
+
def CloseInsert(handle)
|
80
|
+
send_CloseInsert(handle)
|
81
|
+
return recv_CloseInsert()
|
82
|
+
end
|
83
|
+
|
84
|
+
def send_CloseInsert(handle)
|
85
|
+
send_message('CloseInsert', CloseInsert_args, :handle => handle)
|
86
|
+
end
|
87
|
+
|
88
|
+
def recv_CloseInsert()
|
89
|
+
result = receive_message(CloseInsert_result)
|
90
|
+
return result.success unless result.success.nil?
|
91
|
+
raise result.error unless result.error.nil?
|
92
|
+
raise result.error2 unless result.error2.nil?
|
93
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'CloseInsert failed: unknown result')
|
94
|
+
end
|
95
|
+
|
96
|
+
def PingImpalaService()
|
97
|
+
send_PingImpalaService()
|
98
|
+
return recv_PingImpalaService()
|
99
|
+
end
|
100
|
+
|
101
|
+
def send_PingImpalaService()
|
102
|
+
send_message('PingImpalaService', PingImpalaService_args)
|
103
|
+
end
|
104
|
+
|
105
|
+
def recv_PingImpalaService()
|
106
|
+
result = receive_message(PingImpalaService_result)
|
107
|
+
return result.success unless result.success.nil?
|
108
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'PingImpalaService failed: unknown result')
|
109
|
+
end
|
110
|
+
|
111
|
+
end
|
112
|
+
|
113
|
+
class Processor < ::Impala::Protocol::Beeswax::BeeswaxService::Processor
|
114
|
+
include ::Thrift::Processor
|
115
|
+
|
116
|
+
def process_Cancel(seqid, iprot, oprot)
|
117
|
+
args = read_args(iprot, Cancel_args)
|
118
|
+
result = Cancel_result.new()
|
119
|
+
begin
|
120
|
+
result.success = @handler.Cancel(args.query_id)
|
121
|
+
rescue ::Impala::Protocol::Beeswax::BeeswaxException => error
|
122
|
+
result.error = error
|
123
|
+
end
|
124
|
+
write_result(result, oprot, 'Cancel', seqid)
|
125
|
+
end
|
126
|
+
|
127
|
+
def process_ResetCatalog(seqid, iprot, oprot)
|
128
|
+
args = read_args(iprot, ResetCatalog_args)
|
129
|
+
result = ResetCatalog_result.new()
|
130
|
+
result.success = @handler.ResetCatalog()
|
131
|
+
write_result(result, oprot, 'ResetCatalog', seqid)
|
132
|
+
end
|
133
|
+
|
134
|
+
def process_ResetTable(seqid, iprot, oprot)
|
135
|
+
args = read_args(iprot, ResetTable_args)
|
136
|
+
result = ResetTable_result.new()
|
137
|
+
result.success = @handler.ResetTable(args.request)
|
138
|
+
write_result(result, oprot, 'ResetTable', seqid)
|
139
|
+
end
|
140
|
+
|
141
|
+
def process_GetRuntimeProfile(seqid, iprot, oprot)
|
142
|
+
args = read_args(iprot, GetRuntimeProfile_args)
|
143
|
+
result = GetRuntimeProfile_result.new()
|
144
|
+
begin
|
145
|
+
result.success = @handler.GetRuntimeProfile(args.query_id)
|
146
|
+
rescue ::Impala::Protocol::Beeswax::BeeswaxException => error
|
147
|
+
result.error = error
|
148
|
+
end
|
149
|
+
write_result(result, oprot, 'GetRuntimeProfile', seqid)
|
150
|
+
end
|
151
|
+
|
152
|
+
def process_CloseInsert(seqid, iprot, oprot)
|
153
|
+
args = read_args(iprot, CloseInsert_args)
|
154
|
+
result = CloseInsert_result.new()
|
155
|
+
begin
|
156
|
+
result.success = @handler.CloseInsert(args.handle)
|
157
|
+
rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error
|
158
|
+
result.error = error
|
159
|
+
rescue ::Impala::Protocol::Beeswax::BeeswaxException => error2
|
160
|
+
result.error2 = error2
|
161
|
+
end
|
162
|
+
write_result(result, oprot, 'CloseInsert', seqid)
|
163
|
+
end
|
164
|
+
|
165
|
+
def process_PingImpalaService(seqid, iprot, oprot)
|
166
|
+
args = read_args(iprot, PingImpalaService_args)
|
167
|
+
result = PingImpalaService_result.new()
|
168
|
+
result.success = @handler.PingImpalaService()
|
169
|
+
write_result(result, oprot, 'PingImpalaService', seqid)
|
170
|
+
end
|
171
|
+
|
172
|
+
end
|
173
|
+
|
174
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
175
|
+
|
176
|
+
class Cancel_args
|
177
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
178
|
+
QUERY_ID = 1
|
179
|
+
|
180
|
+
FIELDS = {
|
181
|
+
QUERY_ID => {:type => ::Thrift::Types::STRUCT, :name => 'query_id', :class => ::Impala::Protocol::Beeswax::QueryHandle}
|
182
|
+
}
|
183
|
+
|
184
|
+
def struct_fields; FIELDS; end
|
185
|
+
|
186
|
+
def validate
|
187
|
+
end
|
188
|
+
|
189
|
+
::Thrift::Struct.generate_accessors self
|
190
|
+
end
|
191
|
+
|
192
|
+
class Cancel_result
|
193
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
194
|
+
SUCCESS = 0
|
195
|
+
ERROR = 1
|
196
|
+
|
197
|
+
FIELDS = {
|
198
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::TStatus},
|
199
|
+
ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::BeeswaxException}
|
200
|
+
}
|
201
|
+
|
202
|
+
def struct_fields; FIELDS; end
|
203
|
+
|
204
|
+
def validate
|
205
|
+
end
|
206
|
+
|
207
|
+
::Thrift::Struct.generate_accessors self
|
208
|
+
end
|
209
|
+
|
210
|
+
class ResetCatalog_args
|
211
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
212
|
+
|
213
|
+
FIELDS = {
|
214
|
+
|
215
|
+
}
|
216
|
+
|
217
|
+
def struct_fields; FIELDS; end
|
218
|
+
|
219
|
+
def validate
|
220
|
+
end
|
221
|
+
|
222
|
+
::Thrift::Struct.generate_accessors self
|
223
|
+
end
|
224
|
+
|
225
|
+
class ResetCatalog_result
|
226
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
227
|
+
SUCCESS = 0
|
228
|
+
|
229
|
+
FIELDS = {
|
230
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::TStatus}
|
231
|
+
}
|
232
|
+
|
233
|
+
def struct_fields; FIELDS; end
|
234
|
+
|
235
|
+
def validate
|
236
|
+
end
|
237
|
+
|
238
|
+
::Thrift::Struct.generate_accessors self
|
239
|
+
end
|
240
|
+
|
241
|
+
class ResetTable_args
|
242
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
243
|
+
REQUEST = 1
|
244
|
+
|
245
|
+
FIELDS = {
|
246
|
+
REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::Impala::Protocol::TResetTableReq}
|
247
|
+
}
|
248
|
+
|
249
|
+
def struct_fields; FIELDS; end
|
250
|
+
|
251
|
+
def validate
|
252
|
+
end
|
253
|
+
|
254
|
+
::Thrift::Struct.generate_accessors self
|
255
|
+
end
|
256
|
+
|
257
|
+
class ResetTable_result
|
258
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
259
|
+
SUCCESS = 0
|
260
|
+
|
261
|
+
FIELDS = {
|
262
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::TStatus}
|
263
|
+
}
|
264
|
+
|
265
|
+
def struct_fields; FIELDS; end
|
266
|
+
|
267
|
+
def validate
|
268
|
+
end
|
269
|
+
|
270
|
+
::Thrift::Struct.generate_accessors self
|
271
|
+
end
|
272
|
+
|
273
|
+
class GetRuntimeProfile_args
|
274
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
275
|
+
QUERY_ID = 1
|
276
|
+
|
277
|
+
FIELDS = {
|
278
|
+
QUERY_ID => {:type => ::Thrift::Types::STRUCT, :name => 'query_id', :class => ::Impala::Protocol::Beeswax::QueryHandle}
|
279
|
+
}
|
280
|
+
|
281
|
+
def struct_fields; FIELDS; end
|
282
|
+
|
283
|
+
def validate
|
284
|
+
end
|
285
|
+
|
286
|
+
::Thrift::Struct.generate_accessors self
|
287
|
+
end
|
288
|
+
|
289
|
+
class GetRuntimeProfile_result
|
290
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
291
|
+
SUCCESS = 0
|
292
|
+
ERROR = 1
|
293
|
+
|
294
|
+
FIELDS = {
|
295
|
+
SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
|
296
|
+
ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::BeeswaxException}
|
297
|
+
}
|
298
|
+
|
299
|
+
def struct_fields; FIELDS; end
|
300
|
+
|
301
|
+
def validate
|
302
|
+
end
|
303
|
+
|
304
|
+
::Thrift::Struct.generate_accessors self
|
305
|
+
end
|
306
|
+
|
307
|
+
class CloseInsert_args
|
308
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
309
|
+
HANDLE = 1
|
310
|
+
|
311
|
+
FIELDS = {
|
312
|
+
HANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'handle', :class => ::Impala::Protocol::Beeswax::QueryHandle}
|
313
|
+
}
|
314
|
+
|
315
|
+
def struct_fields; FIELDS; end
|
316
|
+
|
317
|
+
def validate
|
318
|
+
end
|
319
|
+
|
320
|
+
::Thrift::Struct.generate_accessors self
|
321
|
+
end
|
322
|
+
|
323
|
+
class CloseInsert_result
|
324
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
325
|
+
SUCCESS = 0
|
326
|
+
ERROR = 1
|
327
|
+
ERROR2 = 2
|
328
|
+
|
329
|
+
FIELDS = {
|
330
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::TInsertResult},
|
331
|
+
ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException},
|
332
|
+
ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Impala::Protocol::Beeswax::BeeswaxException}
|
333
|
+
}
|
334
|
+
|
335
|
+
def struct_fields; FIELDS; end
|
336
|
+
|
337
|
+
def validate
|
338
|
+
end
|
339
|
+
|
340
|
+
::Thrift::Struct.generate_accessors self
|
341
|
+
end
|
342
|
+
|
343
|
+
class PingImpalaService_args
|
344
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
345
|
+
|
346
|
+
FIELDS = {
|
347
|
+
|
348
|
+
}
|
349
|
+
|
350
|
+
def struct_fields; FIELDS; end
|
351
|
+
|
352
|
+
def validate
|
353
|
+
end
|
354
|
+
|
355
|
+
::Thrift::Struct.generate_accessors self
|
356
|
+
end
|
357
|
+
|
358
|
+
class PingImpalaService_result
|
359
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
360
|
+
SUCCESS = 0
|
361
|
+
|
362
|
+
FIELDS = {
|
363
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::TPingImpalaServiceResp}
|
364
|
+
}
|
365
|
+
|
366
|
+
def struct_fields; FIELDS; end
|
367
|
+
|
368
|
+
def validate
|
369
|
+
end
|
370
|
+
|
371
|
+
::Thrift::Struct.generate_accessors self
|
372
|
+
end
|
373
|
+
|
374
|
+
end
|
375
|
+
|
376
|
+
end
|
377
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.1)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'status_types'
|
9
|
+
require 'beeswax_types'
|
10
|
+
require 'cli_service_types'
|
11
|
+
|
12
|
+
|
13
|
+
module Impala
|
14
|
+
module Protocol
|
15
|
+
module TImpalaQueryOptions
|
16
|
+
ABORT_ON_ERROR = 0
|
17
|
+
MAX_ERRORS = 1
|
18
|
+
DISABLE_CODEGEN = 2
|
19
|
+
BATCH_SIZE = 3
|
20
|
+
MEM_LIMIT = 4
|
21
|
+
NUM_NODES = 5
|
22
|
+
MAX_SCAN_RANGE_LENGTH = 6
|
23
|
+
MAX_IO_BUFFERS = 7
|
24
|
+
NUM_SCANNER_THREADS = 8
|
25
|
+
ALLOW_UNSUPPORTED_FORMATS = 9
|
26
|
+
DEFAULT_ORDER_BY_LIMIT = 10
|
27
|
+
DEBUG_ACTION = 11
|
28
|
+
ABORT_ON_DEFAULT_LIMIT_EXCEEDED = 12
|
29
|
+
PARQUET_COMPRESSION_CODEC = 13
|
30
|
+
HBASE_CACHING = 14
|
31
|
+
HBASE_CACHE_BLOCKS = 15
|
32
|
+
VALUE_MAP = {0 => "ABORT_ON_ERROR", 1 => "MAX_ERRORS", 2 => "DISABLE_CODEGEN", 3 => "BATCH_SIZE", 4 => "MEM_LIMIT", 5 => "NUM_NODES", 6 => "MAX_SCAN_RANGE_LENGTH", 7 => "MAX_IO_BUFFERS", 8 => "NUM_SCANNER_THREADS", 9 => "ALLOW_UNSUPPORTED_FORMATS", 10 => "DEFAULT_ORDER_BY_LIMIT", 11 => "DEBUG_ACTION", 12 => "ABORT_ON_DEFAULT_LIMIT_EXCEEDED", 13 => "PARQUET_COMPRESSION_CODEC", 14 => "HBASE_CACHING", 15 => "HBASE_CACHE_BLOCKS"}
|
33
|
+
VALID_VALUES = Set.new([ABORT_ON_ERROR, MAX_ERRORS, DISABLE_CODEGEN, BATCH_SIZE, MEM_LIMIT, NUM_NODES, MAX_SCAN_RANGE_LENGTH, MAX_IO_BUFFERS, NUM_SCANNER_THREADS, ALLOW_UNSUPPORTED_FORMATS, DEFAULT_ORDER_BY_LIMIT, DEBUG_ACTION, ABORT_ON_DEFAULT_LIMIT_EXCEEDED, PARQUET_COMPRESSION_CODEC, HBASE_CACHING, HBASE_CACHE_BLOCKS]).freeze
|
34
|
+
end
|
35
|
+
|
36
|
+
class TInsertResult
|
37
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
38
|
+
ROWS_APPENDED = 1
|
39
|
+
|
40
|
+
FIELDS = {
|
41
|
+
ROWS_APPENDED => {:type => ::Thrift::Types::MAP, :name => 'rows_appended', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}
|
42
|
+
}
|
43
|
+
|
44
|
+
def struct_fields; FIELDS; end
|
45
|
+
|
46
|
+
def validate
|
47
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field rows_appended is unset!') unless @rows_appended
|
48
|
+
end
|
49
|
+
|
50
|
+
::Thrift::Struct.generate_accessors self
|
51
|
+
end
|
52
|
+
|
53
|
+
class TPingImpalaServiceResp
|
54
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
55
|
+
VERSION = 1
|
56
|
+
|
57
|
+
FIELDS = {
|
58
|
+
VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'}
|
59
|
+
}
|
60
|
+
|
61
|
+
def struct_fields; FIELDS; end
|
62
|
+
|
63
|
+
def validate
|
64
|
+
end
|
65
|
+
|
66
|
+
::Thrift::Struct.generate_accessors self
|
67
|
+
end
|
68
|
+
|
69
|
+
class TResetTableReq
|
70
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
71
|
+
DB_NAME = 1
|
72
|
+
TABLE_NAME = 2
|
73
|
+
|
74
|
+
FIELDS = {
|
75
|
+
DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
|
76
|
+
TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}
|
77
|
+
}
|
78
|
+
|
79
|
+
def struct_fields; FIELDS; end
|
80
|
+
|
81
|
+
def validate
|
82
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name
|
83
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_name is unset!') unless @table_name
|
84
|
+
end
|
85
|
+
|
86
|
+
::Thrift::Struct.generate_accessors self
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
end
|