rbhive 0.1.0
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/rbhive/connection.rb +77 -0
- data/lib/rbhive.rb +1 -0
- data/lib/thrift/facebook_service.rb +688 -0
- data/lib/thrift/fb303_constants.rb +8 -0
- data/lib/thrift/fb303_types.rb +18 -0
- data/lib/thrift/hive_metastore_constants.rb +32 -0
- data/lib/thrift/hive_metastore_types.rb +430 -0
- data/lib/thrift/hive_service_constants.rb +8 -0
- data/lib/thrift/hive_service_types.rb +67 -0
- data/lib/thrift/reflection_limited_constants.rb +8 -0
- data/lib/thrift/reflection_limited_types.rb +150 -0
- data/lib/thrift/serde_constants.rb +88 -0
- data/lib/thrift/serde_types.rb +7 -0
- data/lib/thrift/thrift_hive.rb +439 -0
- data/lib/thrift/thrift_hive_metastore.rb +1502 -0
- metadata +88 -0
@@ -0,0 +1,32 @@
|
|
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 File.join(File.dirname(__FILE__), *%w[hive_metastore_types])
|
8
|
+
|
9
|
+
META_TABLE_COLUMNS = %q"columns"
|
10
|
+
|
11
|
+
META_TABLE_COLUMN_TYPES = %q"columns.types"
|
12
|
+
|
13
|
+
BUCKET_FIELD_NAME = %q"bucket_field_name"
|
14
|
+
|
15
|
+
BUCKET_COUNT = %q"bucket_count"
|
16
|
+
|
17
|
+
FIELD_TO_DIMENSION = %q"field_to_dimension"
|
18
|
+
|
19
|
+
META_TABLE_NAME = %q"name"
|
20
|
+
|
21
|
+
META_TABLE_DB = %q"db"
|
22
|
+
|
23
|
+
META_TABLE_LOCATION = %q"location"
|
24
|
+
|
25
|
+
META_TABLE_SERDE = %q"serde"
|
26
|
+
|
27
|
+
META_TABLE_PARTITION_COLUMNS = %q"partition_columns"
|
28
|
+
|
29
|
+
FILE_INPUT_FORMAT = %q"file.inputformat"
|
30
|
+
|
31
|
+
FILE_OUTPUT_FORMAT = %q"file.outputformat"
|
32
|
+
|
@@ -0,0 +1,430 @@
|
|
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 File.join(File.dirname(__FILE__), *%w[fb303_types])
|
8
|
+
|
9
|
+
class Version
|
10
|
+
include ::Thrift::Struct
|
11
|
+
VERSION = 1
|
12
|
+
COMMENTS = 2
|
13
|
+
|
14
|
+
::Thrift::Struct.field_accessor self, :version, :comments
|
15
|
+
FIELDS = {
|
16
|
+
VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'},
|
17
|
+
COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments'}
|
18
|
+
}
|
19
|
+
|
20
|
+
def struct_fields; FIELDS; end
|
21
|
+
|
22
|
+
def validate
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
class FieldSchema
|
28
|
+
include ::Thrift::Struct
|
29
|
+
NAME = 1
|
30
|
+
TYPE = 2
|
31
|
+
COMMENT = 3
|
32
|
+
|
33
|
+
::Thrift::Struct.field_accessor self, :name, :type, :comment
|
34
|
+
FIELDS = {
|
35
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
36
|
+
TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'},
|
37
|
+
COMMENT => {:type => ::Thrift::Types::STRING, :name => 'comment'}
|
38
|
+
}
|
39
|
+
|
40
|
+
def struct_fields; FIELDS; end
|
41
|
+
|
42
|
+
def validate
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
class Type
|
48
|
+
include ::Thrift::Struct
|
49
|
+
NAME = 1
|
50
|
+
TYPE1 = 2
|
51
|
+
TYPE2 = 3
|
52
|
+
F = 4
|
53
|
+
|
54
|
+
::Thrift::Struct.field_accessor self, :name, :type1, :type2, :fields
|
55
|
+
FIELDS = {
|
56
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
57
|
+
TYPE1 => {:type => ::Thrift::Types::STRING, :name => 'type1', :optional => true},
|
58
|
+
TYPE2 => {:type => ::Thrift::Types::STRING, :name => 'type2', :optional => true},
|
59
|
+
F => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}, :optional => true}
|
60
|
+
}
|
61
|
+
|
62
|
+
def struct_fields; FIELDS; end
|
63
|
+
|
64
|
+
def validate
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
class Database
|
70
|
+
include ::Thrift::Struct
|
71
|
+
NAME = 1
|
72
|
+
DESCRIPTION = 2
|
73
|
+
|
74
|
+
::Thrift::Struct.field_accessor self, :name, :description
|
75
|
+
FIELDS = {
|
76
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
77
|
+
DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}
|
78
|
+
}
|
79
|
+
|
80
|
+
def struct_fields; FIELDS; end
|
81
|
+
|
82
|
+
def validate
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
|
87
|
+
class SerDeInfo
|
88
|
+
include ::Thrift::Struct
|
89
|
+
NAME = 1
|
90
|
+
SERIALIZATIONLIB = 2
|
91
|
+
PARAMETERS = 3
|
92
|
+
|
93
|
+
::Thrift::Struct.field_accessor self, :name, :serializationLib, :parameters
|
94
|
+
FIELDS = {
|
95
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
96
|
+
SERIALIZATIONLIB => {:type => ::Thrift::Types::STRING, :name => 'serializationLib'},
|
97
|
+
PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
|
98
|
+
}
|
99
|
+
|
100
|
+
def struct_fields; FIELDS; end
|
101
|
+
|
102
|
+
def validate
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
class Order
|
108
|
+
include ::Thrift::Struct
|
109
|
+
COL = 1
|
110
|
+
ORDER = 2
|
111
|
+
|
112
|
+
::Thrift::Struct.field_accessor self, :col, :order
|
113
|
+
FIELDS = {
|
114
|
+
COL => {:type => ::Thrift::Types::STRING, :name => 'col'},
|
115
|
+
ORDER => {:type => ::Thrift::Types::I32, :name => 'order'}
|
116
|
+
}
|
117
|
+
|
118
|
+
def struct_fields; FIELDS; end
|
119
|
+
|
120
|
+
def validate
|
121
|
+
end
|
122
|
+
|
123
|
+
end
|
124
|
+
|
125
|
+
class StorageDescriptor
|
126
|
+
include ::Thrift::Struct
|
127
|
+
COLS = 1
|
128
|
+
LOCATION = 2
|
129
|
+
INPUTFORMAT = 3
|
130
|
+
OUTPUTFORMAT = 4
|
131
|
+
COMPRESSED = 5
|
132
|
+
NUMBUCKETS = 6
|
133
|
+
SERDEINFO = 7
|
134
|
+
BUCKETCOLS = 8
|
135
|
+
SORTCOLS = 9
|
136
|
+
PARAMETERS = 10
|
137
|
+
|
138
|
+
::Thrift::Struct.field_accessor self, :cols, :location, :inputFormat, :outputFormat, :compressed, :numBuckets, :serdeInfo, :bucketCols, :sortCols, :parameters
|
139
|
+
FIELDS = {
|
140
|
+
COLS => {:type => ::Thrift::Types::LIST, :name => 'cols', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}},
|
141
|
+
LOCATION => {:type => ::Thrift::Types::STRING, :name => 'location'},
|
142
|
+
INPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'inputFormat'},
|
143
|
+
OUTPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'outputFormat'},
|
144
|
+
COMPRESSED => {:type => ::Thrift::Types::BOOL, :name => 'compressed'},
|
145
|
+
NUMBUCKETS => {:type => ::Thrift::Types::I32, :name => 'numBuckets'},
|
146
|
+
SERDEINFO => {:type => ::Thrift::Types::STRUCT, :name => 'serdeInfo', :class => SerDeInfo},
|
147
|
+
BUCKETCOLS => {:type => ::Thrift::Types::LIST, :name => 'bucketCols', :element => {:type => ::Thrift::Types::STRING}},
|
148
|
+
SORTCOLS => {:type => ::Thrift::Types::LIST, :name => 'sortCols', :element => {:type => ::Thrift::Types::STRUCT, :class => Order}},
|
149
|
+
PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
|
150
|
+
}
|
151
|
+
|
152
|
+
def struct_fields; FIELDS; end
|
153
|
+
|
154
|
+
def validate
|
155
|
+
end
|
156
|
+
|
157
|
+
end
|
158
|
+
|
159
|
+
class Table
|
160
|
+
include ::Thrift::Struct
|
161
|
+
TABLENAME = 1
|
162
|
+
DBNAME = 2
|
163
|
+
OWNER = 3
|
164
|
+
CREATETIME = 4
|
165
|
+
LASTACCESSTIME = 5
|
166
|
+
RETENTION = 6
|
167
|
+
SD = 7
|
168
|
+
PARTITIONKEYS = 8
|
169
|
+
PARAMETERS = 9
|
170
|
+
|
171
|
+
::Thrift::Struct.field_accessor self, :tableName, :dbName, :owner, :createTime, :lastAccessTime, :retention, :sd, :partitionKeys, :parameters
|
172
|
+
FIELDS = {
|
173
|
+
TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
|
174
|
+
DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
|
175
|
+
OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'},
|
176
|
+
CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'},
|
177
|
+
LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'},
|
178
|
+
RETENTION => {:type => ::Thrift::Types::I32, :name => 'retention'},
|
179
|
+
SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor},
|
180
|
+
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}}
|
182
|
+
}
|
183
|
+
|
184
|
+
def struct_fields; FIELDS; end
|
185
|
+
|
186
|
+
def validate
|
187
|
+
end
|
188
|
+
|
189
|
+
end
|
190
|
+
|
191
|
+
class Partition
|
192
|
+
include ::Thrift::Struct
|
193
|
+
VALUES = 1
|
194
|
+
DBNAME = 2
|
195
|
+
TABLENAME = 3
|
196
|
+
CREATETIME = 4
|
197
|
+
LASTACCESSTIME = 5
|
198
|
+
SD = 6
|
199
|
+
PARAMETERS = 7
|
200
|
+
|
201
|
+
::Thrift::Struct.field_accessor self, :values, :dbName, :tableName, :createTime, :lastAccessTime, :sd, :parameters
|
202
|
+
FIELDS = {
|
203
|
+
VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}},
|
204
|
+
DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
|
205
|
+
TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
|
206
|
+
CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'},
|
207
|
+
LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'},
|
208
|
+
SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor},
|
209
|
+
PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
|
210
|
+
}
|
211
|
+
|
212
|
+
def struct_fields; FIELDS; end
|
213
|
+
|
214
|
+
def validate
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
class Index
|
220
|
+
include ::Thrift::Struct
|
221
|
+
INDEXNAME = 1
|
222
|
+
INDEXTYPE = 2
|
223
|
+
TABLENAME = 3
|
224
|
+
DBNAME = 4
|
225
|
+
COLNAMES = 5
|
226
|
+
PARTNAME = 6
|
227
|
+
|
228
|
+
::Thrift::Struct.field_accessor self, :indexName, :indexType, :tableName, :dbName, :colNames, :partName
|
229
|
+
FIELDS = {
|
230
|
+
INDEXNAME => {:type => ::Thrift::Types::STRING, :name => 'indexName'},
|
231
|
+
INDEXTYPE => {:type => ::Thrift::Types::I32, :name => 'indexType'},
|
232
|
+
TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
|
233
|
+
DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
|
234
|
+
COLNAMES => {:type => ::Thrift::Types::LIST, :name => 'colNames', :element => {:type => ::Thrift::Types::STRING}},
|
235
|
+
PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partName'}
|
236
|
+
}
|
237
|
+
|
238
|
+
def struct_fields; FIELDS; end
|
239
|
+
|
240
|
+
def validate
|
241
|
+
end
|
242
|
+
|
243
|
+
end
|
244
|
+
|
245
|
+
class Schema
|
246
|
+
include ::Thrift::Struct
|
247
|
+
FIELDSCHEMAS = 1
|
248
|
+
PROPERTIES = 2
|
249
|
+
|
250
|
+
::Thrift::Struct.field_accessor self, :fieldSchemas, :properties
|
251
|
+
FIELDS = {
|
252
|
+
FIELDSCHEMAS => {:type => ::Thrift::Types::LIST, :name => 'fieldSchemas', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}},
|
253
|
+
PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
|
254
|
+
}
|
255
|
+
|
256
|
+
def struct_fields; FIELDS; end
|
257
|
+
|
258
|
+
def validate
|
259
|
+
end
|
260
|
+
|
261
|
+
end
|
262
|
+
|
263
|
+
class MetaException < ::Thrift::Exception
|
264
|
+
include ::Thrift::Struct
|
265
|
+
def initialize(message=nil)
|
266
|
+
super()
|
267
|
+
self.message = message
|
268
|
+
end
|
269
|
+
|
270
|
+
MESSAGE = 1
|
271
|
+
|
272
|
+
::Thrift::Struct.field_accessor self, :message
|
273
|
+
FIELDS = {
|
274
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
275
|
+
}
|
276
|
+
|
277
|
+
def struct_fields; FIELDS; end
|
278
|
+
|
279
|
+
def validate
|
280
|
+
end
|
281
|
+
|
282
|
+
end
|
283
|
+
|
284
|
+
class UnknownTableException < ::Thrift::Exception
|
285
|
+
include ::Thrift::Struct
|
286
|
+
def initialize(message=nil)
|
287
|
+
super()
|
288
|
+
self.message = message
|
289
|
+
end
|
290
|
+
|
291
|
+
MESSAGE = 1
|
292
|
+
|
293
|
+
::Thrift::Struct.field_accessor self, :message
|
294
|
+
FIELDS = {
|
295
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
296
|
+
}
|
297
|
+
|
298
|
+
def struct_fields; FIELDS; end
|
299
|
+
|
300
|
+
def validate
|
301
|
+
end
|
302
|
+
|
303
|
+
end
|
304
|
+
|
305
|
+
class UnknownDBException < ::Thrift::Exception
|
306
|
+
include ::Thrift::Struct
|
307
|
+
def initialize(message=nil)
|
308
|
+
super()
|
309
|
+
self.message = message
|
310
|
+
end
|
311
|
+
|
312
|
+
MESSAGE = 1
|
313
|
+
|
314
|
+
::Thrift::Struct.field_accessor self, :message
|
315
|
+
FIELDS = {
|
316
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
317
|
+
}
|
318
|
+
|
319
|
+
def struct_fields; FIELDS; end
|
320
|
+
|
321
|
+
def validate
|
322
|
+
end
|
323
|
+
|
324
|
+
end
|
325
|
+
|
326
|
+
class AlreadyExistsException < ::Thrift::Exception
|
327
|
+
include ::Thrift::Struct
|
328
|
+
def initialize(message=nil)
|
329
|
+
super()
|
330
|
+
self.message = message
|
331
|
+
end
|
332
|
+
|
333
|
+
MESSAGE = 1
|
334
|
+
|
335
|
+
::Thrift::Struct.field_accessor self, :message
|
336
|
+
FIELDS = {
|
337
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
338
|
+
}
|
339
|
+
|
340
|
+
def struct_fields; FIELDS; end
|
341
|
+
|
342
|
+
def validate
|
343
|
+
end
|
344
|
+
|
345
|
+
end
|
346
|
+
|
347
|
+
class InvalidObjectException < ::Thrift::Exception
|
348
|
+
include ::Thrift::Struct
|
349
|
+
def initialize(message=nil)
|
350
|
+
super()
|
351
|
+
self.message = message
|
352
|
+
end
|
353
|
+
|
354
|
+
MESSAGE = 1
|
355
|
+
|
356
|
+
::Thrift::Struct.field_accessor self, :message
|
357
|
+
FIELDS = {
|
358
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
359
|
+
}
|
360
|
+
|
361
|
+
def struct_fields; FIELDS; end
|
362
|
+
|
363
|
+
def validate
|
364
|
+
end
|
365
|
+
|
366
|
+
end
|
367
|
+
|
368
|
+
class NoSuchObjectException < ::Thrift::Exception
|
369
|
+
include ::Thrift::Struct
|
370
|
+
def initialize(message=nil)
|
371
|
+
super()
|
372
|
+
self.message = message
|
373
|
+
end
|
374
|
+
|
375
|
+
MESSAGE = 1
|
376
|
+
|
377
|
+
::Thrift::Struct.field_accessor self, :message
|
378
|
+
FIELDS = {
|
379
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
380
|
+
}
|
381
|
+
|
382
|
+
def struct_fields; FIELDS; end
|
383
|
+
|
384
|
+
def validate
|
385
|
+
end
|
386
|
+
|
387
|
+
end
|
388
|
+
|
389
|
+
class IndexAlreadyExistsException < ::Thrift::Exception
|
390
|
+
include ::Thrift::Struct
|
391
|
+
def initialize(message=nil)
|
392
|
+
super()
|
393
|
+
self.message = message
|
394
|
+
end
|
395
|
+
|
396
|
+
MESSAGE = 1
|
397
|
+
|
398
|
+
::Thrift::Struct.field_accessor self, :message
|
399
|
+
FIELDS = {
|
400
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
401
|
+
}
|
402
|
+
|
403
|
+
def struct_fields; FIELDS; end
|
404
|
+
|
405
|
+
def validate
|
406
|
+
end
|
407
|
+
|
408
|
+
end
|
409
|
+
|
410
|
+
class InvalidOperationException < ::Thrift::Exception
|
411
|
+
include ::Thrift::Struct
|
412
|
+
def initialize(message=nil)
|
413
|
+
super()
|
414
|
+
self.message = message
|
415
|
+
end
|
416
|
+
|
417
|
+
MESSAGE = 1
|
418
|
+
|
419
|
+
::Thrift::Struct.field_accessor self, :message
|
420
|
+
FIELDS = {
|
421
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
422
|
+
}
|
423
|
+
|
424
|
+
def struct_fields; FIELDS; end
|
425
|
+
|
426
|
+
def validate
|
427
|
+
end
|
428
|
+
|
429
|
+
end
|
430
|
+
|
@@ -0,0 +1,67 @@
|
|
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 File.join(File.dirname(__FILE__), *%w[fb303_types])
|
8
|
+
require File.join(File.dirname(__FILE__), *%w[hive_metastore_types])
|
9
|
+
|
10
|
+
|
11
|
+
module JobTrackerState
|
12
|
+
INITIALIZING = 1
|
13
|
+
RUNNING = 2
|
14
|
+
VALUE_MAP = {1 => "INITIALIZING", 2 => "RUNNING"}
|
15
|
+
VALID_VALUES = Set.new([INITIALIZING, RUNNING]).freeze
|
16
|
+
end
|
17
|
+
|
18
|
+
class HiveClusterStatus
|
19
|
+
include ::Thrift::Struct
|
20
|
+
TASKTRACKERS = 1
|
21
|
+
MAPTASKS = 2
|
22
|
+
REDUCETASKS = 3
|
23
|
+
MAXMAPTASKS = 4
|
24
|
+
MAXREDUCETASKS = 5
|
25
|
+
STATE = 6
|
26
|
+
|
27
|
+
::Thrift::Struct.field_accessor self, :taskTrackers, :mapTasks, :reduceTasks, :maxMapTasks, :maxReduceTasks, :state
|
28
|
+
FIELDS = {
|
29
|
+
TASKTRACKERS => {:type => ::Thrift::Types::I32, :name => 'taskTrackers'},
|
30
|
+
MAPTASKS => {:type => ::Thrift::Types::I32, :name => 'mapTasks'},
|
31
|
+
REDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'reduceTasks'},
|
32
|
+
MAXMAPTASKS => {:type => ::Thrift::Types::I32, :name => 'maxMapTasks'},
|
33
|
+
MAXREDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'maxReduceTasks'},
|
34
|
+
STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => JobTrackerState}
|
35
|
+
}
|
36
|
+
|
37
|
+
def struct_fields; FIELDS; end
|
38
|
+
|
39
|
+
def validate
|
40
|
+
unless @state.nil? || JobTrackerState::VALID_VALUES.include?(@state)
|
41
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
class HiveServerException < ::Thrift::Exception
|
48
|
+
include ::Thrift::Struct
|
49
|
+
def initialize(message=nil)
|
50
|
+
super()
|
51
|
+
self.message = message
|
52
|
+
end
|
53
|
+
|
54
|
+
MESSAGE = 1
|
55
|
+
|
56
|
+
::Thrift::Struct.field_accessor self, :message
|
57
|
+
FIELDS = {
|
58
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
59
|
+
}
|
60
|
+
|
61
|
+
def struct_fields; FIELDS; end
|
62
|
+
|
63
|
+
def validate
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
|
@@ -0,0 +1,150 @@
|
|
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 TTypeTag
|
9
|
+
T_VOID = 1
|
10
|
+
T_BOOL = 2
|
11
|
+
T_BYTE = 3
|
12
|
+
T_I16 = 6
|
13
|
+
T_I32 = 8
|
14
|
+
T_I64 = 10
|
15
|
+
T_DOUBLE = 4
|
16
|
+
T_STRING = 11
|
17
|
+
T_STRUCT = 12
|
18
|
+
T_MAP = 13
|
19
|
+
T_SET = 14
|
20
|
+
T_LIST = 15
|
21
|
+
T_ENUM = 101
|
22
|
+
T_NOT_REFLECTED = 102
|
23
|
+
VALUE_MAP = {1 => "T_VOID", 2 => "T_BOOL", 3 => "T_BYTE", 6 => "T_I16", 8 => "T_I32", 10 => "T_I64", 4 => "T_DOUBLE", 11 => "T_STRING", 12 => "T_STRUCT", 13 => "T_MAP", 14 => "T_SET", 15 => "T_LIST", 101 => "T_ENUM", 102 => "T_NOT_REFLECTED"}
|
24
|
+
VALID_VALUES = Set.new([T_VOID, T_BOOL, T_BYTE, T_I16, T_I32, T_I64, T_DOUBLE, T_STRING, T_STRUCT, T_MAP, T_SET, T_LIST, T_ENUM, T_NOT_REFLECTED]).freeze
|
25
|
+
end
|
26
|
+
|
27
|
+
class SimpleType
|
28
|
+
include ::Thrift::Struct
|
29
|
+
TTYPE = 1
|
30
|
+
NAME = 2
|
31
|
+
|
32
|
+
::Thrift::Struct.field_accessor self, :ttype, :name
|
33
|
+
FIELDS = {
|
34
|
+
TTYPE => {:type => ::Thrift::Types::I32, :name => 'ttype', :enum_class => TTypeTag},
|
35
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}
|
36
|
+
}
|
37
|
+
|
38
|
+
def struct_fields; FIELDS; end
|
39
|
+
|
40
|
+
def validate
|
41
|
+
unless @ttype.nil? || TTypeTag::VALID_VALUES.include?(@ttype)
|
42
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ttype!')
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
class ContainerType
|
49
|
+
include ::Thrift::Struct
|
50
|
+
TTYPE = 1
|
51
|
+
SUBTYPE1 = 2
|
52
|
+
SUBTYPE2 = 3
|
53
|
+
|
54
|
+
::Thrift::Struct.field_accessor self, :ttype, :subtype1, :subtype2
|
55
|
+
FIELDS = {
|
56
|
+
TTYPE => {:type => ::Thrift::Types::I32, :name => 'ttype', :enum_class => TTypeTag},
|
57
|
+
SUBTYPE1 => {:type => ::Thrift::Types::STRUCT, :name => 'subtype1', :class => SimpleType},
|
58
|
+
SUBTYPE2 => {:type => ::Thrift::Types::STRUCT, :name => 'subtype2', :class => SimpleType, :optional => true}
|
59
|
+
}
|
60
|
+
|
61
|
+
def struct_fields; FIELDS; end
|
62
|
+
|
63
|
+
def validate
|
64
|
+
unless @ttype.nil? || TTypeTag::VALID_VALUES.include?(@ttype)
|
65
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ttype!')
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
class ThriftType
|
72
|
+
include ::Thrift::Struct
|
73
|
+
IS_CONTAINER = 1
|
74
|
+
SIMPLE_TYPE = 2
|
75
|
+
CONTAINER_TYPE = 3
|
76
|
+
|
77
|
+
::Thrift::Struct.field_accessor self, :is_container, :simple_type, :container_type
|
78
|
+
FIELDS = {
|
79
|
+
IS_CONTAINER => {:type => ::Thrift::Types::BOOL, :name => 'is_container'},
|
80
|
+
SIMPLE_TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'simple_type', :class => SimpleType, :optional => true},
|
81
|
+
CONTAINER_TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'container_type', :class => ContainerType, :optional => true}
|
82
|
+
}
|
83
|
+
|
84
|
+
def struct_fields; FIELDS; end
|
85
|
+
|
86
|
+
def validate
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
class Argument
|
92
|
+
include ::Thrift::Struct
|
93
|
+
KEY = 1
|
94
|
+
NAME = 2
|
95
|
+
TYPE = 3
|
96
|
+
|
97
|
+
::Thrift::Struct.field_accessor self, :key, :name, :type
|
98
|
+
FIELDS = {
|
99
|
+
KEY => {:type => ::Thrift::Types::I16, :name => 'key'},
|
100
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
101
|
+
TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'type', :class => ThriftType}
|
102
|
+
}
|
103
|
+
|
104
|
+
def struct_fields; FIELDS; end
|
105
|
+
|
106
|
+
def validate
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
class Method
|
112
|
+
include ::Thrift::Struct
|
113
|
+
NAME = 1
|
114
|
+
RETURN_TYPE = 2
|
115
|
+
ARGUMENTS = 3
|
116
|
+
|
117
|
+
::Thrift::Struct.field_accessor self, :name, :return_type, :arguments
|
118
|
+
FIELDS = {
|
119
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
120
|
+
RETURN_TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'return_type', :class => ThriftType},
|
121
|
+
ARGUMENTS => {:type => ::Thrift::Types::LIST, :name => 'arguments', :element => {:type => ::Thrift::Types::STRUCT, :class => Argument}}
|
122
|
+
}
|
123
|
+
|
124
|
+
def struct_fields; FIELDS; end
|
125
|
+
|
126
|
+
def validate
|
127
|
+
end
|
128
|
+
|
129
|
+
end
|
130
|
+
|
131
|
+
class Service
|
132
|
+
include ::Thrift::Struct
|
133
|
+
NAME = 1
|
134
|
+
METHODS = 2
|
135
|
+
FULLY_REFLECTED = 3
|
136
|
+
|
137
|
+
::Thrift::Struct.field_accessor self, :name, :methods, :fully_reflected
|
138
|
+
FIELDS = {
|
139
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
140
|
+
METHODS => {:type => ::Thrift::Types::LIST, :name => 'methods', :element => {:type => ::Thrift::Types::STRUCT, :class => Method}},
|
141
|
+
FULLY_REFLECTED => {:type => ::Thrift::Types::BOOL, :name => 'fully_reflected'}
|
142
|
+
}
|
143
|
+
|
144
|
+
def struct_fields; FIELDS; end
|
145
|
+
|
146
|
+
def validate
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
|