rbhive-vidma 1.0.2.pre1.pre.thrift0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/CHANGELOG.md +16 -0
- data/Gemfile +3 -0
- data/LICENSE +20 -0
- data/README.md +344 -0
- data/Rakefile +1 -0
- data/lib/rbhive.rb +8 -0
- data/lib/rbhive/connection.rb +150 -0
- data/lib/rbhive/explain_result.rb +46 -0
- data/lib/rbhive/result_set.rb +37 -0
- data/lib/rbhive/schema_definition.rb +86 -0
- data/lib/rbhive/t_c_l_i_connection.rb +439 -0
- data/lib/rbhive/t_c_l_i_result_set.rb +3 -0
- data/lib/rbhive/t_c_l_i_schema_definition.rb +88 -0
- data/lib/rbhive/table_schema.rb +117 -0
- data/lib/rbhive/version.rb +3 -0
- data/lib/thrift/facebook_service.rb +700 -0
- data/lib/thrift/fb303_constants.rb +9 -0
- data/lib/thrift/fb303_types.rb +19 -0
- data/lib/thrift/hive_metastore_constants.rb +41 -0
- data/lib/thrift/hive_metastore_types.rb +630 -0
- data/lib/thrift/hive_service_constants.rb +13 -0
- data/lib/thrift/hive_service_types.rb +72 -0
- data/lib/thrift/queryplan_constants.rb +13 -0
- data/lib/thrift/queryplan_types.rb +261 -0
- data/lib/thrift/sasl_client_transport.rb +97 -0
- data/lib/thrift/serde_constants.rb +92 -0
- data/lib/thrift/serde_types.rb +7 -0
- data/lib/thrift/t_c_l_i_service.rb +1054 -0
- data/lib/thrift/t_c_l_i_service_constants.rb +72 -0
- data/lib/thrift/t_c_l_i_service_types.rb +1762 -0
- data/lib/thrift/thrift_hive.rb +508 -0
- data/lib/thrift/thrift_hive_metastore.rb +3856 -0
- data/rbhive.gemspec +33 -0
- metadata +165 -0
@@ -0,0 +1,508 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.0)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require_relative 'thrift_hive_metastore'
|
9
|
+
require_relative 'hive_service_types'
|
10
|
+
|
11
|
+
module Hive
|
12
|
+
module Thrift
|
13
|
+
module ThriftHive
|
14
|
+
class Client < ::ThriftHiveMetastore::Client
|
15
|
+
include ::Thrift::Client
|
16
|
+
|
17
|
+
def execute(query)
|
18
|
+
send_execute(query)
|
19
|
+
recv_execute()
|
20
|
+
end
|
21
|
+
|
22
|
+
def send_execute(query)
|
23
|
+
send_message('execute', Execute_args, :query => query)
|
24
|
+
end
|
25
|
+
|
26
|
+
def recv_execute()
|
27
|
+
result = receive_message(Execute_result)
|
28
|
+
raise result.ex unless result.ex.nil?
|
29
|
+
return
|
30
|
+
end
|
31
|
+
|
32
|
+
def fetchOne()
|
33
|
+
send_fetchOne()
|
34
|
+
return recv_fetchOne()
|
35
|
+
end
|
36
|
+
|
37
|
+
def send_fetchOne()
|
38
|
+
send_message('fetchOne', FetchOne_args)
|
39
|
+
end
|
40
|
+
|
41
|
+
def recv_fetchOne()
|
42
|
+
result = receive_message(FetchOne_result)
|
43
|
+
return result.success unless result.success.nil?
|
44
|
+
raise result.ex unless result.ex.nil?
|
45
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchOne failed: unknown result')
|
46
|
+
end
|
47
|
+
|
48
|
+
def fetchN(numRows)
|
49
|
+
send_fetchN(numRows)
|
50
|
+
return recv_fetchN()
|
51
|
+
end
|
52
|
+
|
53
|
+
def send_fetchN(numRows)
|
54
|
+
send_message('fetchN', FetchN_args, :numRows => numRows)
|
55
|
+
end
|
56
|
+
|
57
|
+
def recv_fetchN()
|
58
|
+
result = receive_message(FetchN_result)
|
59
|
+
return result.success unless result.success.nil?
|
60
|
+
raise result.ex unless result.ex.nil?
|
61
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchN failed: unknown result')
|
62
|
+
end
|
63
|
+
|
64
|
+
def fetchAll()
|
65
|
+
send_fetchAll()
|
66
|
+
return recv_fetchAll()
|
67
|
+
end
|
68
|
+
|
69
|
+
def send_fetchAll()
|
70
|
+
send_message('fetchAll', FetchAll_args)
|
71
|
+
end
|
72
|
+
|
73
|
+
def recv_fetchAll()
|
74
|
+
result = receive_message(FetchAll_result)
|
75
|
+
return result.success unless result.success.nil?
|
76
|
+
raise result.ex unless result.ex.nil?
|
77
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchAll failed: unknown result')
|
78
|
+
end
|
79
|
+
|
80
|
+
def getSchema()
|
81
|
+
send_getSchema()
|
82
|
+
return recv_getSchema()
|
83
|
+
end
|
84
|
+
|
85
|
+
def send_getSchema()
|
86
|
+
send_message('getSchema', GetSchema_args)
|
87
|
+
end
|
88
|
+
|
89
|
+
def recv_getSchema()
|
90
|
+
result = receive_message(GetSchema_result)
|
91
|
+
return result.success unless result.success.nil?
|
92
|
+
raise result.ex unless result.ex.nil?
|
93
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getSchema failed: unknown result')
|
94
|
+
end
|
95
|
+
|
96
|
+
def getThriftSchema()
|
97
|
+
send_getThriftSchema()
|
98
|
+
return recv_getThriftSchema()
|
99
|
+
end
|
100
|
+
|
101
|
+
def send_getThriftSchema()
|
102
|
+
send_message('getThriftSchema', GetThriftSchema_args)
|
103
|
+
end
|
104
|
+
|
105
|
+
def recv_getThriftSchema()
|
106
|
+
result = receive_message(GetThriftSchema_result)
|
107
|
+
return result.success unless result.success.nil?
|
108
|
+
raise result.ex unless result.ex.nil?
|
109
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getThriftSchema failed: unknown result')
|
110
|
+
end
|
111
|
+
|
112
|
+
def getClusterStatus()
|
113
|
+
send_getClusterStatus()
|
114
|
+
return recv_getClusterStatus()
|
115
|
+
end
|
116
|
+
|
117
|
+
def send_getClusterStatus()
|
118
|
+
send_message('getClusterStatus', GetClusterStatus_args)
|
119
|
+
end
|
120
|
+
|
121
|
+
def recv_getClusterStatus()
|
122
|
+
result = receive_message(GetClusterStatus_result)
|
123
|
+
return result.success unless result.success.nil?
|
124
|
+
raise result.ex unless result.ex.nil?
|
125
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getClusterStatus failed: unknown result')
|
126
|
+
end
|
127
|
+
|
128
|
+
def getQueryPlan()
|
129
|
+
send_getQueryPlan()
|
130
|
+
return recv_getQueryPlan()
|
131
|
+
end
|
132
|
+
|
133
|
+
def send_getQueryPlan()
|
134
|
+
send_message('getQueryPlan', GetQueryPlan_args)
|
135
|
+
end
|
136
|
+
|
137
|
+
def recv_getQueryPlan()
|
138
|
+
result = receive_message(GetQueryPlan_result)
|
139
|
+
return result.success unless result.success.nil?
|
140
|
+
raise result.ex unless result.ex.nil?
|
141
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getQueryPlan failed: unknown result')
|
142
|
+
end
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
class Processor < ::ThriftHiveMetastore::Processor
|
147
|
+
include ::Thrift::Processor
|
148
|
+
|
149
|
+
def process_execute(seqid, iprot, oprot)
|
150
|
+
args = read_args(iprot, Execute_args)
|
151
|
+
result = Execute_result.new()
|
152
|
+
begin
|
153
|
+
@handler.execute(args.query)
|
154
|
+
rescue ::Hive::Thrift::HiveServerException => ex
|
155
|
+
result.ex = ex
|
156
|
+
end
|
157
|
+
write_result(result, oprot, 'execute', seqid)
|
158
|
+
end
|
159
|
+
|
160
|
+
def process_fetchOne(seqid, iprot, oprot)
|
161
|
+
args = read_args(iprot, FetchOne_args)
|
162
|
+
result = FetchOne_result.new()
|
163
|
+
begin
|
164
|
+
result.success = @handler.fetchOne()
|
165
|
+
rescue ::Hive::Thrift::HiveServerException => ex
|
166
|
+
result.ex = ex
|
167
|
+
end
|
168
|
+
write_result(result, oprot, 'fetchOne', seqid)
|
169
|
+
end
|
170
|
+
|
171
|
+
def process_fetchN(seqid, iprot, oprot)
|
172
|
+
args = read_args(iprot, FetchN_args)
|
173
|
+
result = FetchN_result.new()
|
174
|
+
begin
|
175
|
+
result.success = @handler.fetchN(args.numRows)
|
176
|
+
rescue ::Hive::Thrift::HiveServerException => ex
|
177
|
+
result.ex = ex
|
178
|
+
end
|
179
|
+
write_result(result, oprot, 'fetchN', seqid)
|
180
|
+
end
|
181
|
+
|
182
|
+
def process_fetchAll(seqid, iprot, oprot)
|
183
|
+
args = read_args(iprot, FetchAll_args)
|
184
|
+
result = FetchAll_result.new()
|
185
|
+
begin
|
186
|
+
result.success = @handler.fetchAll()
|
187
|
+
rescue ::Hive::Thrift::HiveServerException => ex
|
188
|
+
result.ex = ex
|
189
|
+
end
|
190
|
+
write_result(result, oprot, 'fetchAll', seqid)
|
191
|
+
end
|
192
|
+
|
193
|
+
def process_getSchema(seqid, iprot, oprot)
|
194
|
+
args = read_args(iprot, GetSchema_args)
|
195
|
+
result = GetSchema_result.new()
|
196
|
+
begin
|
197
|
+
result.success = @handler.getSchema()
|
198
|
+
rescue ::Hive::Thrift::HiveServerException => ex
|
199
|
+
result.ex = ex
|
200
|
+
end
|
201
|
+
write_result(result, oprot, 'getSchema', seqid)
|
202
|
+
end
|
203
|
+
|
204
|
+
def process_getThriftSchema(seqid, iprot, oprot)
|
205
|
+
args = read_args(iprot, GetThriftSchema_args)
|
206
|
+
result = GetThriftSchema_result.new()
|
207
|
+
begin
|
208
|
+
result.success = @handler.getThriftSchema()
|
209
|
+
rescue ::Hive::Thrift::HiveServerException => ex
|
210
|
+
result.ex = ex
|
211
|
+
end
|
212
|
+
write_result(result, oprot, 'getThriftSchema', seqid)
|
213
|
+
end
|
214
|
+
|
215
|
+
def process_getClusterStatus(seqid, iprot, oprot)
|
216
|
+
args = read_args(iprot, GetClusterStatus_args)
|
217
|
+
result = GetClusterStatus_result.new()
|
218
|
+
begin
|
219
|
+
result.success = @handler.getClusterStatus()
|
220
|
+
rescue ::Hive::Thrift::HiveServerException => ex
|
221
|
+
result.ex = ex
|
222
|
+
end
|
223
|
+
write_result(result, oprot, 'getClusterStatus', seqid)
|
224
|
+
end
|
225
|
+
|
226
|
+
def process_getQueryPlan(seqid, iprot, oprot)
|
227
|
+
args = read_args(iprot, GetQueryPlan_args)
|
228
|
+
result = GetQueryPlan_result.new()
|
229
|
+
begin
|
230
|
+
result.success = @handler.getQueryPlan()
|
231
|
+
rescue ::Hive::Thrift::HiveServerException => ex
|
232
|
+
result.ex = ex
|
233
|
+
end
|
234
|
+
write_result(result, oprot, 'getQueryPlan', seqid)
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
238
|
+
|
239
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
240
|
+
|
241
|
+
class Execute_args
|
242
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
243
|
+
QUERY = 1
|
244
|
+
|
245
|
+
FIELDS = {
|
246
|
+
QUERY => {:type => ::Thrift::Types::STRING, :name => 'query'}
|
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 Execute_result
|
258
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
259
|
+
EX = 1
|
260
|
+
|
261
|
+
FIELDS = {
|
262
|
+
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Hive::Thrift::HiveServerException}
|
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 FetchOne_args
|
274
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
275
|
+
|
276
|
+
FIELDS = {
|
277
|
+
|
278
|
+
}
|
279
|
+
|
280
|
+
def struct_fields; FIELDS; end
|
281
|
+
|
282
|
+
def validate
|
283
|
+
end
|
284
|
+
|
285
|
+
::Thrift::Struct.generate_accessors self
|
286
|
+
end
|
287
|
+
|
288
|
+
class FetchOne_result
|
289
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
290
|
+
SUCCESS = 0
|
291
|
+
EX = 1
|
292
|
+
|
293
|
+
FIELDS = {
|
294
|
+
SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
|
295
|
+
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Hive::Thrift::HiveServerException}
|
296
|
+
}
|
297
|
+
|
298
|
+
def struct_fields; FIELDS; end
|
299
|
+
|
300
|
+
def validate
|
301
|
+
end
|
302
|
+
|
303
|
+
::Thrift::Struct.generate_accessors self
|
304
|
+
end
|
305
|
+
|
306
|
+
class FetchN_args
|
307
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
308
|
+
NUMROWS = 1
|
309
|
+
|
310
|
+
FIELDS = {
|
311
|
+
NUMROWS => {:type => ::Thrift::Types::I32, :name => 'numRows'}
|
312
|
+
}
|
313
|
+
|
314
|
+
def struct_fields; FIELDS; end
|
315
|
+
|
316
|
+
def validate
|
317
|
+
end
|
318
|
+
|
319
|
+
::Thrift::Struct.generate_accessors self
|
320
|
+
end
|
321
|
+
|
322
|
+
class FetchN_result
|
323
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
324
|
+
SUCCESS = 0
|
325
|
+
EX = 1
|
326
|
+
|
327
|
+
FIELDS = {
|
328
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
|
329
|
+
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Hive::Thrift::HiveServerException}
|
330
|
+
}
|
331
|
+
|
332
|
+
def struct_fields; FIELDS; end
|
333
|
+
|
334
|
+
def validate
|
335
|
+
end
|
336
|
+
|
337
|
+
::Thrift::Struct.generate_accessors self
|
338
|
+
end
|
339
|
+
|
340
|
+
class FetchAll_args
|
341
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
342
|
+
|
343
|
+
FIELDS = {
|
344
|
+
|
345
|
+
}
|
346
|
+
|
347
|
+
def struct_fields; FIELDS; end
|
348
|
+
|
349
|
+
def validate
|
350
|
+
end
|
351
|
+
|
352
|
+
::Thrift::Struct.generate_accessors self
|
353
|
+
end
|
354
|
+
|
355
|
+
class FetchAll_result
|
356
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
357
|
+
SUCCESS = 0
|
358
|
+
EX = 1
|
359
|
+
|
360
|
+
FIELDS = {
|
361
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
|
362
|
+
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Hive::Thrift::HiveServerException}
|
363
|
+
}
|
364
|
+
|
365
|
+
def struct_fields; FIELDS; end
|
366
|
+
|
367
|
+
def validate
|
368
|
+
end
|
369
|
+
|
370
|
+
::Thrift::Struct.generate_accessors self
|
371
|
+
end
|
372
|
+
|
373
|
+
class GetSchema_args
|
374
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
375
|
+
|
376
|
+
FIELDS = {
|
377
|
+
|
378
|
+
}
|
379
|
+
|
380
|
+
def struct_fields; FIELDS; end
|
381
|
+
|
382
|
+
def validate
|
383
|
+
end
|
384
|
+
|
385
|
+
::Thrift::Struct.generate_accessors self
|
386
|
+
end
|
387
|
+
|
388
|
+
class GetSchema_result
|
389
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
390
|
+
SUCCESS = 0
|
391
|
+
EX = 1
|
392
|
+
|
393
|
+
FIELDS = {
|
394
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Schema},
|
395
|
+
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Hive::Thrift::HiveServerException}
|
396
|
+
}
|
397
|
+
|
398
|
+
def struct_fields; FIELDS; end
|
399
|
+
|
400
|
+
def validate
|
401
|
+
end
|
402
|
+
|
403
|
+
::Thrift::Struct.generate_accessors self
|
404
|
+
end
|
405
|
+
|
406
|
+
class GetThriftSchema_args
|
407
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
408
|
+
|
409
|
+
FIELDS = {
|
410
|
+
|
411
|
+
}
|
412
|
+
|
413
|
+
def struct_fields; FIELDS; end
|
414
|
+
|
415
|
+
def validate
|
416
|
+
end
|
417
|
+
|
418
|
+
::Thrift::Struct.generate_accessors self
|
419
|
+
end
|
420
|
+
|
421
|
+
class GetThriftSchema_result
|
422
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
423
|
+
SUCCESS = 0
|
424
|
+
EX = 1
|
425
|
+
|
426
|
+
FIELDS = {
|
427
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Schema},
|
428
|
+
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Hive::Thrift::HiveServerException}
|
429
|
+
}
|
430
|
+
|
431
|
+
def struct_fields; FIELDS; end
|
432
|
+
|
433
|
+
def validate
|
434
|
+
end
|
435
|
+
|
436
|
+
::Thrift::Struct.generate_accessors self
|
437
|
+
end
|
438
|
+
|
439
|
+
class GetClusterStatus_args
|
440
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
441
|
+
|
442
|
+
FIELDS = {
|
443
|
+
|
444
|
+
}
|
445
|
+
|
446
|
+
def struct_fields; FIELDS; end
|
447
|
+
|
448
|
+
def validate
|
449
|
+
end
|
450
|
+
|
451
|
+
::Thrift::Struct.generate_accessors self
|
452
|
+
end
|
453
|
+
|
454
|
+
class GetClusterStatus_result
|
455
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
456
|
+
SUCCESS = 0
|
457
|
+
EX = 1
|
458
|
+
|
459
|
+
FIELDS = {
|
460
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Hive::Thrift::HiveClusterStatus},
|
461
|
+
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Hive::Thrift::HiveServerException}
|
462
|
+
}
|
463
|
+
|
464
|
+
def struct_fields; FIELDS; end
|
465
|
+
|
466
|
+
def validate
|
467
|
+
end
|
468
|
+
|
469
|
+
::Thrift::Struct.generate_accessors self
|
470
|
+
end
|
471
|
+
|
472
|
+
class GetQueryPlan_args
|
473
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
474
|
+
|
475
|
+
FIELDS = {
|
476
|
+
|
477
|
+
}
|
478
|
+
|
479
|
+
def struct_fields; FIELDS; end
|
480
|
+
|
481
|
+
def validate
|
482
|
+
end
|
483
|
+
|
484
|
+
::Thrift::Struct.generate_accessors self
|
485
|
+
end
|
486
|
+
|
487
|
+
class GetQueryPlan_result
|
488
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
489
|
+
SUCCESS = 0
|
490
|
+
EX = 1
|
491
|
+
|
492
|
+
FIELDS = {
|
493
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Hive::Thrift::QueryPlan},
|
494
|
+
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Hive::Thrift::HiveServerException}
|
495
|
+
}
|
496
|
+
|
497
|
+
def struct_fields; FIELDS; end
|
498
|
+
|
499
|
+
def validate
|
500
|
+
end
|
501
|
+
|
502
|
+
::Thrift::Struct.generate_accessors self
|
503
|
+
end
|
504
|
+
|
505
|
+
end
|
506
|
+
|
507
|
+
end
|
508
|
+
end
|