rbhive 0.1.1 → 0.1.3
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.
- data/lib/thrift/facebook_service.rb +53 -40
- data/lib/thrift/hive_metastore_constants.rb +9 -0
- data/lib/thrift/hive_metastore_types.rb +89 -51
- data/lib/thrift/hive_service_types.rb +10 -10
- data/lib/thrift/queryplan_constants.rb +8 -0
- data/lib/thrift/queryplan_types.rb +253 -0
- data/lib/thrift/reflection_limited_types.rb +12 -12
- data/lib/thrift/serde_constants.rb +2 -0
- data/lib/thrift/thrift_hive.rb +88 -23
- data/lib/thrift/thrift_hive_metastore.rb +1255 -150
- metadata +16 -5
@@ -6,12 +6,12 @@
|
|
6
6
|
|
7
7
|
require File.join(File.dirname(__FILE__), *%w[fb303_types])
|
8
8
|
|
9
|
+
|
9
10
|
class Version
|
10
|
-
include ::Thrift::Struct
|
11
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
11
12
|
VERSION = 1
|
12
13
|
COMMENTS = 2
|
13
14
|
|
14
|
-
::Thrift::Struct.field_accessor self, :version, :comments
|
15
15
|
FIELDS = {
|
16
16
|
VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'},
|
17
17
|
COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments'}
|
@@ -22,15 +22,15 @@ class Version
|
|
22
22
|
def validate
|
23
23
|
end
|
24
24
|
|
25
|
+
::Thrift::Struct.generate_accessors self
|
25
26
|
end
|
26
27
|
|
27
28
|
class FieldSchema
|
28
|
-
include ::Thrift::Struct
|
29
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
29
30
|
NAME = 1
|
30
31
|
TYPE = 2
|
31
32
|
COMMENT = 3
|
32
33
|
|
33
|
-
::Thrift::Struct.field_accessor self, :name, :type, :comment
|
34
34
|
FIELDS = {
|
35
35
|
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
36
36
|
TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'},
|
@@ -42,21 +42,21 @@ class FieldSchema
|
|
42
42
|
def validate
|
43
43
|
end
|
44
44
|
|
45
|
+
::Thrift::Struct.generate_accessors self
|
45
46
|
end
|
46
47
|
|
47
48
|
class Type
|
48
|
-
include ::Thrift::Struct
|
49
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
49
50
|
NAME = 1
|
50
51
|
TYPE1 = 2
|
51
52
|
TYPE2 = 3
|
52
|
-
|
53
|
+
FIELDS = 4
|
53
54
|
|
54
|
-
::Thrift::Struct.field_accessor self, :name, :type1, :type2, :fields
|
55
55
|
FIELDS = {
|
56
56
|
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
57
57
|
TYPE1 => {:type => ::Thrift::Types::STRING, :name => 'type1', :optional => true},
|
58
58
|
TYPE2 => {:type => ::Thrift::Types::STRING, :name => 'type2', :optional => true},
|
59
|
-
|
59
|
+
FIELDS => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}, :optional => true}
|
60
60
|
}
|
61
61
|
|
62
62
|
def struct_fields; FIELDS; end
|
@@ -64,17 +64,19 @@ class Type
|
|
64
64
|
def validate
|
65
65
|
end
|
66
66
|
|
67
|
+
::Thrift::Struct.generate_accessors self
|
67
68
|
end
|
68
69
|
|
69
70
|
class Database
|
70
|
-
include ::Thrift::Struct
|
71
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
71
72
|
NAME = 1
|
72
73
|
DESCRIPTION = 2
|
74
|
+
LOCATIONURI = 3
|
73
75
|
|
74
|
-
::Thrift::Struct.field_accessor self, :name, :description
|
75
76
|
FIELDS = {
|
76
77
|
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
77
|
-
DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}
|
78
|
+
DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'},
|
79
|
+
LOCATIONURI => {:type => ::Thrift::Types::STRING, :name => 'locationUri'}
|
78
80
|
}
|
79
81
|
|
80
82
|
def struct_fields; FIELDS; end
|
@@ -82,15 +84,15 @@ class Database
|
|
82
84
|
def validate
|
83
85
|
end
|
84
86
|
|
87
|
+
::Thrift::Struct.generate_accessors self
|
85
88
|
end
|
86
89
|
|
87
90
|
class SerDeInfo
|
88
|
-
include ::Thrift::Struct
|
91
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
89
92
|
NAME = 1
|
90
93
|
SERIALIZATIONLIB = 2
|
91
94
|
PARAMETERS = 3
|
92
95
|
|
93
|
-
::Thrift::Struct.field_accessor self, :name, :serializationLib, :parameters
|
94
96
|
FIELDS = {
|
95
97
|
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
96
98
|
SERIALIZATIONLIB => {:type => ::Thrift::Types::STRING, :name => 'serializationLib'},
|
@@ -102,14 +104,14 @@ class SerDeInfo
|
|
102
104
|
def validate
|
103
105
|
end
|
104
106
|
|
107
|
+
::Thrift::Struct.generate_accessors self
|
105
108
|
end
|
106
109
|
|
107
110
|
class Order
|
108
|
-
include ::Thrift::Struct
|
111
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
109
112
|
COL = 1
|
110
113
|
ORDER = 2
|
111
114
|
|
112
|
-
::Thrift::Struct.field_accessor self, :col, :order
|
113
115
|
FIELDS = {
|
114
116
|
COL => {:type => ::Thrift::Types::STRING, :name => 'col'},
|
115
117
|
ORDER => {:type => ::Thrift::Types::I32, :name => 'order'}
|
@@ -120,10 +122,11 @@ class Order
|
|
120
122
|
def validate
|
121
123
|
end
|
122
124
|
|
125
|
+
::Thrift::Struct.generate_accessors self
|
123
126
|
end
|
124
127
|
|
125
128
|
class StorageDescriptor
|
126
|
-
include ::Thrift::Struct
|
129
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
127
130
|
COLS = 1
|
128
131
|
LOCATION = 2
|
129
132
|
INPUTFORMAT = 3
|
@@ -135,7 +138,6 @@ class StorageDescriptor
|
|
135
138
|
SORTCOLS = 9
|
136
139
|
PARAMETERS = 10
|
137
140
|
|
138
|
-
::Thrift::Struct.field_accessor self, :cols, :location, :inputFormat, :outputFormat, :compressed, :numBuckets, :serdeInfo, :bucketCols, :sortCols, :parameters
|
139
141
|
FIELDS = {
|
140
142
|
COLS => {:type => ::Thrift::Types::LIST, :name => 'cols', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}},
|
141
143
|
LOCATION => {:type => ::Thrift::Types::STRING, :name => 'location'},
|
@@ -154,10 +156,11 @@ class StorageDescriptor
|
|
154
156
|
def validate
|
155
157
|
end
|
156
158
|
|
159
|
+
::Thrift::Struct.generate_accessors self
|
157
160
|
end
|
158
161
|
|
159
162
|
class Table
|
160
|
-
include ::Thrift::Struct
|
163
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
161
164
|
TABLENAME = 1
|
162
165
|
DBNAME = 2
|
163
166
|
OWNER = 3
|
@@ -167,8 +170,10 @@ class Table
|
|
167
170
|
SD = 7
|
168
171
|
PARTITIONKEYS = 8
|
169
172
|
PARAMETERS = 9
|
173
|
+
VIEWORIGINALTEXT = 10
|
174
|
+
VIEWEXPANDEDTEXT = 11
|
175
|
+
TABLETYPE = 12
|
170
176
|
|
171
|
-
::Thrift::Struct.field_accessor self, :tableName, :dbName, :owner, :createTime, :lastAccessTime, :retention, :sd, :partitionKeys, :parameters
|
172
177
|
FIELDS = {
|
173
178
|
TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
|
174
179
|
DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
|
@@ -178,7 +183,10 @@ class Table
|
|
178
183
|
RETENTION => {:type => ::Thrift::Types::I32, :name => 'retention'},
|
179
184
|
SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor},
|
180
185
|
PARTITIONKEYS => {:type => ::Thrift::Types::LIST, :name => 'partitionKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}},
|
181
|
-
PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
|
186
|
+
PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
|
187
|
+
VIEWORIGINALTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewOriginalText'},
|
188
|
+
VIEWEXPANDEDTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewExpandedText'},
|
189
|
+
TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'}
|
182
190
|
}
|
183
191
|
|
184
192
|
def struct_fields; FIELDS; end
|
@@ -186,10 +194,11 @@ class Table
|
|
186
194
|
def validate
|
187
195
|
end
|
188
196
|
|
197
|
+
::Thrift::Struct.generate_accessors self
|
189
198
|
end
|
190
199
|
|
191
200
|
class Partition
|
192
|
-
include ::Thrift::Struct
|
201
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
193
202
|
VALUES = 1
|
194
203
|
DBNAME = 2
|
195
204
|
TABLENAME = 3
|
@@ -198,7 +207,6 @@ class Partition
|
|
198
207
|
SD = 6
|
199
208
|
PARAMETERS = 7
|
200
209
|
|
201
|
-
::Thrift::Struct.field_accessor self, :values, :dbName, :tableName, :createTime, :lastAccessTime, :sd, :parameters
|
202
210
|
FIELDS = {
|
203
211
|
VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}},
|
204
212
|
DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
|
@@ -214,25 +222,33 @@ class Partition
|
|
214
222
|
def validate
|
215
223
|
end
|
216
224
|
|
225
|
+
::Thrift::Struct.generate_accessors self
|
217
226
|
end
|
218
227
|
|
219
228
|
class Index
|
220
|
-
include ::Thrift::Struct
|
229
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
221
230
|
INDEXNAME = 1
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
231
|
+
INDEXHANDLERCLASS = 2
|
232
|
+
DBNAME = 3
|
233
|
+
ORIGTABLENAME = 4
|
234
|
+
CREATETIME = 5
|
235
|
+
LASTACCESSTIME = 6
|
236
|
+
INDEXTABLENAME = 7
|
237
|
+
SD = 8
|
238
|
+
PARAMETERS = 9
|
239
|
+
DEFERREDREBUILD = 10
|
227
240
|
|
228
|
-
::Thrift::Struct.field_accessor self, :indexName, :indexType, :tableName, :dbName, :colNames, :partName
|
229
241
|
FIELDS = {
|
230
242
|
INDEXNAME => {:type => ::Thrift::Types::STRING, :name => 'indexName'},
|
231
|
-
|
232
|
-
TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
|
243
|
+
INDEXHANDLERCLASS => {:type => ::Thrift::Types::STRING, :name => 'indexHandlerClass'},
|
233
244
|
DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
|
234
|
-
|
235
|
-
|
245
|
+
ORIGTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'origTableName'},
|
246
|
+
CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'},
|
247
|
+
LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'},
|
248
|
+
INDEXTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'indexTableName'},
|
249
|
+
SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor},
|
250
|
+
PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
|
251
|
+
DEFERREDREBUILD => {:type => ::Thrift::Types::BOOL, :name => 'deferredRebuild'}
|
236
252
|
}
|
237
253
|
|
238
254
|
def struct_fields; FIELDS; end
|
@@ -240,14 +256,14 @@ class Index
|
|
240
256
|
def validate
|
241
257
|
end
|
242
258
|
|
259
|
+
::Thrift::Struct.generate_accessors self
|
243
260
|
end
|
244
261
|
|
245
262
|
class Schema
|
246
|
-
include ::Thrift::Struct
|
263
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
247
264
|
FIELDSCHEMAS = 1
|
248
265
|
PROPERTIES = 2
|
249
266
|
|
250
|
-
::Thrift::Struct.field_accessor self, :fieldSchemas, :properties
|
251
267
|
FIELDS = {
|
252
268
|
FIELDSCHEMAS => {:type => ::Thrift::Types::LIST, :name => 'fieldSchemas', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}},
|
253
269
|
PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
|
@@ -258,10 +274,11 @@ class Schema
|
|
258
274
|
def validate
|
259
275
|
end
|
260
276
|
|
277
|
+
::Thrift::Struct.generate_accessors self
|
261
278
|
end
|
262
279
|
|
263
280
|
class MetaException < ::Thrift::Exception
|
264
|
-
include ::Thrift::Struct
|
281
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
265
282
|
def initialize(message=nil)
|
266
283
|
super()
|
267
284
|
self.message = message
|
@@ -269,7 +286,6 @@ class MetaException < ::Thrift::Exception
|
|
269
286
|
|
270
287
|
MESSAGE = 1
|
271
288
|
|
272
|
-
::Thrift::Struct.field_accessor self, :message
|
273
289
|
FIELDS = {
|
274
290
|
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
275
291
|
}
|
@@ -279,10 +295,11 @@ class MetaException < ::Thrift::Exception
|
|
279
295
|
def validate
|
280
296
|
end
|
281
297
|
|
298
|
+
::Thrift::Struct.generate_accessors self
|
282
299
|
end
|
283
300
|
|
284
301
|
class UnknownTableException < ::Thrift::Exception
|
285
|
-
include ::Thrift::Struct
|
302
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
286
303
|
def initialize(message=nil)
|
287
304
|
super()
|
288
305
|
self.message = message
|
@@ -290,7 +307,6 @@ class UnknownTableException < ::Thrift::Exception
|
|
290
307
|
|
291
308
|
MESSAGE = 1
|
292
309
|
|
293
|
-
::Thrift::Struct.field_accessor self, :message
|
294
310
|
FIELDS = {
|
295
311
|
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
296
312
|
}
|
@@ -300,10 +316,11 @@ class UnknownTableException < ::Thrift::Exception
|
|
300
316
|
def validate
|
301
317
|
end
|
302
318
|
|
319
|
+
::Thrift::Struct.generate_accessors self
|
303
320
|
end
|
304
321
|
|
305
322
|
class UnknownDBException < ::Thrift::Exception
|
306
|
-
include ::Thrift::Struct
|
323
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
307
324
|
def initialize(message=nil)
|
308
325
|
super()
|
309
326
|
self.message = message
|
@@ -311,7 +328,6 @@ class UnknownDBException < ::Thrift::Exception
|
|
311
328
|
|
312
329
|
MESSAGE = 1
|
313
330
|
|
314
|
-
::Thrift::Struct.field_accessor self, :message
|
315
331
|
FIELDS = {
|
316
332
|
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
317
333
|
}
|
@@ -321,10 +337,11 @@ class UnknownDBException < ::Thrift::Exception
|
|
321
337
|
def validate
|
322
338
|
end
|
323
339
|
|
340
|
+
::Thrift::Struct.generate_accessors self
|
324
341
|
end
|
325
342
|
|
326
343
|
class AlreadyExistsException < ::Thrift::Exception
|
327
|
-
include ::Thrift::Struct
|
344
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
328
345
|
def initialize(message=nil)
|
329
346
|
super()
|
330
347
|
self.message = message
|
@@ -332,7 +349,6 @@ class AlreadyExistsException < ::Thrift::Exception
|
|
332
349
|
|
333
350
|
MESSAGE = 1
|
334
351
|
|
335
|
-
::Thrift::Struct.field_accessor self, :message
|
336
352
|
FIELDS = {
|
337
353
|
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
338
354
|
}
|
@@ -342,10 +358,11 @@ class AlreadyExistsException < ::Thrift::Exception
|
|
342
358
|
def validate
|
343
359
|
end
|
344
360
|
|
361
|
+
::Thrift::Struct.generate_accessors self
|
345
362
|
end
|
346
363
|
|
347
364
|
class InvalidObjectException < ::Thrift::Exception
|
348
|
-
include ::Thrift::Struct
|
365
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
349
366
|
def initialize(message=nil)
|
350
367
|
super()
|
351
368
|
self.message = message
|
@@ -353,7 +370,6 @@ class InvalidObjectException < ::Thrift::Exception
|
|
353
370
|
|
354
371
|
MESSAGE = 1
|
355
372
|
|
356
|
-
::Thrift::Struct.field_accessor self, :message
|
357
373
|
FIELDS = {
|
358
374
|
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
359
375
|
}
|
@@ -363,10 +379,11 @@ class InvalidObjectException < ::Thrift::Exception
|
|
363
379
|
def validate
|
364
380
|
end
|
365
381
|
|
382
|
+
::Thrift::Struct.generate_accessors self
|
366
383
|
end
|
367
384
|
|
368
385
|
class NoSuchObjectException < ::Thrift::Exception
|
369
|
-
include ::Thrift::Struct
|
386
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
370
387
|
def initialize(message=nil)
|
371
388
|
super()
|
372
389
|
self.message = message
|
@@ -374,7 +391,6 @@ class NoSuchObjectException < ::Thrift::Exception
|
|
374
391
|
|
375
392
|
MESSAGE = 1
|
376
393
|
|
377
|
-
::Thrift::Struct.field_accessor self, :message
|
378
394
|
FIELDS = {
|
379
395
|
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
380
396
|
}
|
@@ -384,10 +400,11 @@ class NoSuchObjectException < ::Thrift::Exception
|
|
384
400
|
def validate
|
385
401
|
end
|
386
402
|
|
403
|
+
::Thrift::Struct.generate_accessors self
|
387
404
|
end
|
388
405
|
|
389
406
|
class IndexAlreadyExistsException < ::Thrift::Exception
|
390
|
-
include ::Thrift::Struct
|
407
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
391
408
|
def initialize(message=nil)
|
392
409
|
super()
|
393
410
|
self.message = message
|
@@ -395,7 +412,6 @@ class IndexAlreadyExistsException < ::Thrift::Exception
|
|
395
412
|
|
396
413
|
MESSAGE = 1
|
397
414
|
|
398
|
-
::Thrift::Struct.field_accessor self, :message
|
399
415
|
FIELDS = {
|
400
416
|
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
401
417
|
}
|
@@ -405,10 +421,32 @@ class IndexAlreadyExistsException < ::Thrift::Exception
|
|
405
421
|
def validate
|
406
422
|
end
|
407
423
|
|
424
|
+
::Thrift::Struct.generate_accessors self
|
408
425
|
end
|
409
426
|
|
410
427
|
class InvalidOperationException < ::Thrift::Exception
|
411
|
-
include ::Thrift::Struct
|
428
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
429
|
+
def initialize(message=nil)
|
430
|
+
super()
|
431
|
+
self.message = message
|
432
|
+
end
|
433
|
+
|
434
|
+
MESSAGE = 1
|
435
|
+
|
436
|
+
FIELDS = {
|
437
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
438
|
+
}
|
439
|
+
|
440
|
+
def struct_fields; FIELDS; end
|
441
|
+
|
442
|
+
def validate
|
443
|
+
end
|
444
|
+
|
445
|
+
::Thrift::Struct.generate_accessors self
|
446
|
+
end
|
447
|
+
|
448
|
+
class ConfigValSecurityException < ::Thrift::Exception
|
449
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
412
450
|
def initialize(message=nil)
|
413
451
|
super()
|
414
452
|
self.message = message
|
@@ -416,7 +454,6 @@ class InvalidOperationException < ::Thrift::Exception
|
|
416
454
|
|
417
455
|
MESSAGE = 1
|
418
456
|
|
419
|
-
::Thrift::Struct.field_accessor self, :message
|
420
457
|
FIELDS = {
|
421
458
|
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
422
459
|
}
|
@@ -426,5 +463,6 @@ class InvalidOperationException < ::Thrift::Exception
|
|
426
463
|
def validate
|
427
464
|
end
|
428
465
|
|
466
|
+
::Thrift::Struct.generate_accessors self
|
429
467
|
end
|
430
468
|
|
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
require File.join(File.dirname(__FILE__), *%w[fb303_types])
|
8
8
|
require File.join(File.dirname(__FILE__), *%w[hive_metastore_types])
|
9
|
+
require File.join(File.dirname(__FILE__), *%w[queryplan_types])
|
9
10
|
|
10
11
|
|
11
12
|
module JobTrackerState
|
@@ -16,7 +17,7 @@ module JobTrackerState
|
|
16
17
|
end
|
17
18
|
|
18
19
|
class HiveClusterStatus
|
19
|
-
include ::Thrift::Struct
|
20
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
20
21
|
TASKTRACKERS = 1
|
21
22
|
MAPTASKS = 2
|
22
23
|
REDUCETASKS = 3
|
@@ -24,7 +25,6 @@ class HiveClusterStatus
|
|
24
25
|
MAXREDUCETASKS = 5
|
25
26
|
STATE = 6
|
26
27
|
|
27
|
-
::Thrift::Struct.field_accessor self, :taskTrackers, :mapTasks, :reduceTasks, :maxMapTasks, :maxReduceTasks, :state
|
28
28
|
FIELDS = {
|
29
29
|
TASKTRACKERS => {:type => ::Thrift::Types::I32, :name => 'taskTrackers'},
|
30
30
|
MAPTASKS => {:type => ::Thrift::Types::I32, :name => 'mapTasks'},
|
@@ -42,20 +42,19 @@ class HiveClusterStatus
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
+
::Thrift::Struct.generate_accessors self
|
45
46
|
end
|
46
47
|
|
47
48
|
class HiveServerException < ::Thrift::Exception
|
48
|
-
include ::Thrift::Struct
|
49
|
-
def initialize(message=nil)
|
50
|
-
super()
|
51
|
-
self.message = message
|
52
|
-
end
|
53
|
-
|
49
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
54
50
|
MESSAGE = 1
|
51
|
+
ERRORCODE = 2
|
52
|
+
SQLSTATE = 3
|
55
53
|
|
56
|
-
::Thrift::Struct.field_accessor self, :message
|
57
54
|
FIELDS = {
|
58
|
-
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
55
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'},
|
56
|
+
ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode'},
|
57
|
+
SQLSTATE => {:type => ::Thrift::Types::STRING, :name => 'SQLState'}
|
59
58
|
}
|
60
59
|
|
61
60
|
def struct_fields; FIELDS; end
|
@@ -63,5 +62,6 @@ class HiveServerException < ::Thrift::Exception
|
|
63
62
|
def validate
|
64
63
|
end
|
65
64
|
|
65
|
+
::Thrift::Struct.generate_accessors self
|
66
66
|
end
|
67
67
|
|