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.
@@ -0,0 +1,1502 @@
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 File.join(File.dirname(__FILE__), *%w[facebook_service])
9
+ require File.join(File.dirname(__FILE__), *%w[hive_metastore_types])
10
+
11
+ module ThriftHiveMetastore
12
+ class Client < FacebookService::Client
13
+ include ::Thrift::Client
14
+
15
+ def create_database(name, description)
16
+ send_create_database(name, description)
17
+ return recv_create_database()
18
+ end
19
+
20
+ def send_create_database(name, description)
21
+ send_message('create_database', Create_database_args, :name => name, :description => description)
22
+ end
23
+
24
+ def recv_create_database()
25
+ result = receive_message(Create_database_result)
26
+ return result.success unless result.success.nil?
27
+ raise result.o1 unless result.o1.nil?
28
+ raise result.o2 unless result.o2.nil?
29
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'create_database failed: unknown result')
30
+ end
31
+
32
+ def get_database(name)
33
+ send_get_database(name)
34
+ return recv_get_database()
35
+ end
36
+
37
+ def send_get_database(name)
38
+ send_message('get_database', Get_database_args, :name => name)
39
+ end
40
+
41
+ def recv_get_database()
42
+ result = receive_message(Get_database_result)
43
+ return result.success unless result.success.nil?
44
+ raise result.o1 unless result.o1.nil?
45
+ raise result.o2 unless result.o2.nil?
46
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_database failed: unknown result')
47
+ end
48
+
49
+ def drop_database(name)
50
+ send_drop_database(name)
51
+ return recv_drop_database()
52
+ end
53
+
54
+ def send_drop_database(name)
55
+ send_message('drop_database', Drop_database_args, :name => name)
56
+ end
57
+
58
+ def recv_drop_database()
59
+ result = receive_message(Drop_database_result)
60
+ return result.success unless result.success.nil?
61
+ raise result.o2 unless result.o2.nil?
62
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_database failed: unknown result')
63
+ end
64
+
65
+ def get_databases()
66
+ send_get_databases()
67
+ return recv_get_databases()
68
+ end
69
+
70
+ def send_get_databases()
71
+ send_message('get_databases', Get_databases_args)
72
+ end
73
+
74
+ def recv_get_databases()
75
+ result = receive_message(Get_databases_result)
76
+ return result.success unless result.success.nil?
77
+ raise result.o1 unless result.o1.nil?
78
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_databases failed: unknown result')
79
+ end
80
+
81
+ def get_type(name)
82
+ send_get_type(name)
83
+ return recv_get_type()
84
+ end
85
+
86
+ def send_get_type(name)
87
+ send_message('get_type', Get_type_args, :name => name)
88
+ end
89
+
90
+ def recv_get_type()
91
+ result = receive_message(Get_type_result)
92
+ return result.success unless result.success.nil?
93
+ raise result.o2 unless result.o2.nil?
94
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_type failed: unknown result')
95
+ end
96
+
97
+ def create_type(type)
98
+ send_create_type(type)
99
+ return recv_create_type()
100
+ end
101
+
102
+ def send_create_type(type)
103
+ send_message('create_type', Create_type_args, :type => type)
104
+ end
105
+
106
+ def recv_create_type()
107
+ result = receive_message(Create_type_result)
108
+ return result.success unless result.success.nil?
109
+ raise result.o1 unless result.o1.nil?
110
+ raise result.o2 unless result.o2.nil?
111
+ raise result.o3 unless result.o3.nil?
112
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'create_type failed: unknown result')
113
+ end
114
+
115
+ def drop_type(type)
116
+ send_drop_type(type)
117
+ return recv_drop_type()
118
+ end
119
+
120
+ def send_drop_type(type)
121
+ send_message('drop_type', Drop_type_args, :type => type)
122
+ end
123
+
124
+ def recv_drop_type()
125
+ result = receive_message(Drop_type_result)
126
+ return result.success unless result.success.nil?
127
+ raise result.o2 unless result.o2.nil?
128
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_type failed: unknown result')
129
+ end
130
+
131
+ def get_type_all(name)
132
+ send_get_type_all(name)
133
+ return recv_get_type_all()
134
+ end
135
+
136
+ def send_get_type_all(name)
137
+ send_message('get_type_all', Get_type_all_args, :name => name)
138
+ end
139
+
140
+ def recv_get_type_all()
141
+ result = receive_message(Get_type_all_result)
142
+ return result.success unless result.success.nil?
143
+ raise result.o2 unless result.o2.nil?
144
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_type_all failed: unknown result')
145
+ end
146
+
147
+ def get_fields(db_name, table_name)
148
+ send_get_fields(db_name, table_name)
149
+ return recv_get_fields()
150
+ end
151
+
152
+ def send_get_fields(db_name, table_name)
153
+ send_message('get_fields', Get_fields_args, :db_name => db_name, :table_name => table_name)
154
+ end
155
+
156
+ def recv_get_fields()
157
+ result = receive_message(Get_fields_result)
158
+ return result.success unless result.success.nil?
159
+ raise result.o1 unless result.o1.nil?
160
+ raise result.o2 unless result.o2.nil?
161
+ raise result.o3 unless result.o3.nil?
162
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_fields failed: unknown result')
163
+ end
164
+
165
+ def get_schema(db_name, table_name)
166
+ send_get_schema(db_name, table_name)
167
+ return recv_get_schema()
168
+ end
169
+
170
+ def send_get_schema(db_name, table_name)
171
+ send_message('get_schema', Get_schema_args, :db_name => db_name, :table_name => table_name)
172
+ end
173
+
174
+ def recv_get_schema()
175
+ result = receive_message(Get_schema_result)
176
+ return result.success unless result.success.nil?
177
+ raise result.o1 unless result.o1.nil?
178
+ raise result.o2 unless result.o2.nil?
179
+ raise result.o3 unless result.o3.nil?
180
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_schema failed: unknown result')
181
+ end
182
+
183
+ def create_table(tbl)
184
+ send_create_table(tbl)
185
+ recv_create_table()
186
+ end
187
+
188
+ def send_create_table(tbl)
189
+ send_message('create_table', Create_table_args, :tbl => tbl)
190
+ end
191
+
192
+ def recv_create_table()
193
+ result = receive_message(Create_table_result)
194
+ raise result.o1 unless result.o1.nil?
195
+ raise result.o2 unless result.o2.nil?
196
+ raise result.o3 unless result.o3.nil?
197
+ raise result.o4 unless result.o4.nil?
198
+ return
199
+ end
200
+
201
+ def drop_table(dbname, name, deleteData)
202
+ send_drop_table(dbname, name, deleteData)
203
+ recv_drop_table()
204
+ end
205
+
206
+ def send_drop_table(dbname, name, deleteData)
207
+ send_message('drop_table', Drop_table_args, :dbname => dbname, :name => name, :deleteData => deleteData)
208
+ end
209
+
210
+ def recv_drop_table()
211
+ result = receive_message(Drop_table_result)
212
+ raise result.o1 unless result.o1.nil?
213
+ raise result.o3 unless result.o3.nil?
214
+ return
215
+ end
216
+
217
+ def get_tables(db_name, pattern)
218
+ send_get_tables(db_name, pattern)
219
+ return recv_get_tables()
220
+ end
221
+
222
+ def send_get_tables(db_name, pattern)
223
+ send_message('get_tables', Get_tables_args, :db_name => db_name, :pattern => pattern)
224
+ end
225
+
226
+ def recv_get_tables()
227
+ result = receive_message(Get_tables_result)
228
+ return result.success unless result.success.nil?
229
+ raise result.o1 unless result.o1.nil?
230
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_tables failed: unknown result')
231
+ end
232
+
233
+ def get_table(dbname, tbl_name)
234
+ send_get_table(dbname, tbl_name)
235
+ return recv_get_table()
236
+ end
237
+
238
+ def send_get_table(dbname, tbl_name)
239
+ send_message('get_table', Get_table_args, :dbname => dbname, :tbl_name => tbl_name)
240
+ end
241
+
242
+ def recv_get_table()
243
+ result = receive_message(Get_table_result)
244
+ return result.success unless result.success.nil?
245
+ raise result.o1 unless result.o1.nil?
246
+ raise result.o2 unless result.o2.nil?
247
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table failed: unknown result')
248
+ end
249
+
250
+ def alter_table(dbname, tbl_name, new_tbl)
251
+ send_alter_table(dbname, tbl_name, new_tbl)
252
+ recv_alter_table()
253
+ end
254
+
255
+ def send_alter_table(dbname, tbl_name, new_tbl)
256
+ send_message('alter_table', Alter_table_args, :dbname => dbname, :tbl_name => tbl_name, :new_tbl => new_tbl)
257
+ end
258
+
259
+ def recv_alter_table()
260
+ result = receive_message(Alter_table_result)
261
+ raise result.o1 unless result.o1.nil?
262
+ raise result.o2 unless result.o2.nil?
263
+ return
264
+ end
265
+
266
+ def add_partition(new_part)
267
+ send_add_partition(new_part)
268
+ return recv_add_partition()
269
+ end
270
+
271
+ def send_add_partition(new_part)
272
+ send_message('add_partition', Add_partition_args, :new_part => new_part)
273
+ end
274
+
275
+ def recv_add_partition()
276
+ result = receive_message(Add_partition_result)
277
+ return result.success unless result.success.nil?
278
+ raise result.o1 unless result.o1.nil?
279
+ raise result.o2 unless result.o2.nil?
280
+ raise result.o3 unless result.o3.nil?
281
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partition failed: unknown result')
282
+ end
283
+
284
+ def append_partition(db_name, tbl_name, part_vals)
285
+ send_append_partition(db_name, tbl_name, part_vals)
286
+ return recv_append_partition()
287
+ end
288
+
289
+ def send_append_partition(db_name, tbl_name, part_vals)
290
+ send_message('append_partition', Append_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals)
291
+ end
292
+
293
+ def recv_append_partition()
294
+ result = receive_message(Append_partition_result)
295
+ return result.success unless result.success.nil?
296
+ raise result.o1 unless result.o1.nil?
297
+ raise result.o2 unless result.o2.nil?
298
+ raise result.o3 unless result.o3.nil?
299
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition failed: unknown result')
300
+ end
301
+
302
+ def drop_partition(db_name, tbl_name, part_vals, deleteData)
303
+ send_drop_partition(db_name, tbl_name, part_vals, deleteData)
304
+ return recv_drop_partition()
305
+ end
306
+
307
+ def send_drop_partition(db_name, tbl_name, part_vals, deleteData)
308
+ send_message('drop_partition', Drop_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :deleteData => deleteData)
309
+ end
310
+
311
+ def recv_drop_partition()
312
+ result = receive_message(Drop_partition_result)
313
+ return result.success unless result.success.nil?
314
+ raise result.o1 unless result.o1.nil?
315
+ raise result.o2 unless result.o2.nil?
316
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition failed: unknown result')
317
+ end
318
+
319
+ def get_partition(db_name, tbl_name, part_vals)
320
+ send_get_partition(db_name, tbl_name, part_vals)
321
+ return recv_get_partition()
322
+ end
323
+
324
+ def send_get_partition(db_name, tbl_name, part_vals)
325
+ send_message('get_partition', Get_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals)
326
+ end
327
+
328
+ def recv_get_partition()
329
+ result = receive_message(Get_partition_result)
330
+ return result.success unless result.success.nil?
331
+ raise result.o1 unless result.o1.nil?
332
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition failed: unknown result')
333
+ end
334
+
335
+ def get_partitions(db_name, tbl_name, max_parts)
336
+ send_get_partitions(db_name, tbl_name, max_parts)
337
+ return recv_get_partitions()
338
+ end
339
+
340
+ def send_get_partitions(db_name, tbl_name, max_parts)
341
+ send_message('get_partitions', Get_partitions_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts)
342
+ end
343
+
344
+ def recv_get_partitions()
345
+ result = receive_message(Get_partitions_result)
346
+ return result.success unless result.success.nil?
347
+ raise result.o1 unless result.o1.nil?
348
+ raise result.o2 unless result.o2.nil?
349
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions failed: unknown result')
350
+ end
351
+
352
+ def get_partition_names(db_name, tbl_name, max_parts)
353
+ send_get_partition_names(db_name, tbl_name, max_parts)
354
+ return recv_get_partition_names()
355
+ end
356
+
357
+ def send_get_partition_names(db_name, tbl_name, max_parts)
358
+ send_message('get_partition_names', Get_partition_names_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts)
359
+ end
360
+
361
+ def recv_get_partition_names()
362
+ result = receive_message(Get_partition_names_result)
363
+ return result.success unless result.success.nil?
364
+ raise result.o2 unless result.o2.nil?
365
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_names failed: unknown result')
366
+ end
367
+
368
+ def alter_partition(db_name, tbl_name, new_part)
369
+ send_alter_partition(db_name, tbl_name, new_part)
370
+ recv_alter_partition()
371
+ end
372
+
373
+ def send_alter_partition(db_name, tbl_name, new_part)
374
+ send_message('alter_partition', Alter_partition_args, :db_name => db_name, :tbl_name => tbl_name, :new_part => new_part)
375
+ end
376
+
377
+ def recv_alter_partition()
378
+ result = receive_message(Alter_partition_result)
379
+ raise result.o1 unless result.o1.nil?
380
+ raise result.o2 unless result.o2.nil?
381
+ return
382
+ end
383
+
384
+ end
385
+
386
+ class Processor < FacebookService::Processor
387
+ include ::Thrift::Processor
388
+
389
+ def process_create_database(seqid, iprot, oprot)
390
+ args = read_args(iprot, Create_database_args)
391
+ result = Create_database_result.new()
392
+ begin
393
+ result.success = @handler.create_database(args.name, args.description)
394
+ rescue AlreadyExistsException => o1
395
+ result.o1 = o1
396
+ rescue MetaException => o2
397
+ result.o2 = o2
398
+ end
399
+ write_result(result, oprot, 'create_database', seqid)
400
+ end
401
+
402
+ def process_get_database(seqid, iprot, oprot)
403
+ args = read_args(iprot, Get_database_args)
404
+ result = Get_database_result.new()
405
+ begin
406
+ result.success = @handler.get_database(args.name)
407
+ rescue NoSuchObjectException => o1
408
+ result.o1 = o1
409
+ rescue MetaException => o2
410
+ result.o2 = o2
411
+ end
412
+ write_result(result, oprot, 'get_database', seqid)
413
+ end
414
+
415
+ def process_drop_database(seqid, iprot, oprot)
416
+ args = read_args(iprot, Drop_database_args)
417
+ result = Drop_database_result.new()
418
+ begin
419
+ result.success = @handler.drop_database(args.name)
420
+ rescue MetaException => o2
421
+ result.o2 = o2
422
+ end
423
+ write_result(result, oprot, 'drop_database', seqid)
424
+ end
425
+
426
+ def process_get_databases(seqid, iprot, oprot)
427
+ args = read_args(iprot, Get_databases_args)
428
+ result = Get_databases_result.new()
429
+ begin
430
+ result.success = @handler.get_databases()
431
+ rescue MetaException => o1
432
+ result.o1 = o1
433
+ end
434
+ write_result(result, oprot, 'get_databases', seqid)
435
+ end
436
+
437
+ def process_get_type(seqid, iprot, oprot)
438
+ args = read_args(iprot, Get_type_args)
439
+ result = Get_type_result.new()
440
+ begin
441
+ result.success = @handler.get_type(args.name)
442
+ rescue MetaException => o2
443
+ result.o2 = o2
444
+ end
445
+ write_result(result, oprot, 'get_type', seqid)
446
+ end
447
+
448
+ def process_create_type(seqid, iprot, oprot)
449
+ args = read_args(iprot, Create_type_args)
450
+ result = Create_type_result.new()
451
+ begin
452
+ result.success = @handler.create_type(args.type)
453
+ rescue AlreadyExistsException => o1
454
+ result.o1 = o1
455
+ rescue InvalidObjectException => o2
456
+ result.o2 = o2
457
+ rescue MetaException => o3
458
+ result.o3 = o3
459
+ end
460
+ write_result(result, oprot, 'create_type', seqid)
461
+ end
462
+
463
+ def process_drop_type(seqid, iprot, oprot)
464
+ args = read_args(iprot, Drop_type_args)
465
+ result = Drop_type_result.new()
466
+ begin
467
+ result.success = @handler.drop_type(args.type)
468
+ rescue MetaException => o2
469
+ result.o2 = o2
470
+ end
471
+ write_result(result, oprot, 'drop_type', seqid)
472
+ end
473
+
474
+ def process_get_type_all(seqid, iprot, oprot)
475
+ args = read_args(iprot, Get_type_all_args)
476
+ result = Get_type_all_result.new()
477
+ begin
478
+ result.success = @handler.get_type_all(args.name)
479
+ rescue MetaException => o2
480
+ result.o2 = o2
481
+ end
482
+ write_result(result, oprot, 'get_type_all', seqid)
483
+ end
484
+
485
+ def process_get_fields(seqid, iprot, oprot)
486
+ args = read_args(iprot, Get_fields_args)
487
+ result = Get_fields_result.new()
488
+ begin
489
+ result.success = @handler.get_fields(args.db_name, args.table_name)
490
+ rescue MetaException => o1
491
+ result.o1 = o1
492
+ rescue UnknownTableException => o2
493
+ result.o2 = o2
494
+ rescue UnknownDBException => o3
495
+ result.o3 = o3
496
+ end
497
+ write_result(result, oprot, 'get_fields', seqid)
498
+ end
499
+
500
+ def process_get_schema(seqid, iprot, oprot)
501
+ args = read_args(iprot, Get_schema_args)
502
+ result = Get_schema_result.new()
503
+ begin
504
+ result.success = @handler.get_schema(args.db_name, args.table_name)
505
+ rescue MetaException => o1
506
+ result.o1 = o1
507
+ rescue UnknownTableException => o2
508
+ result.o2 = o2
509
+ rescue UnknownDBException => o3
510
+ result.o3 = o3
511
+ end
512
+ write_result(result, oprot, 'get_schema', seqid)
513
+ end
514
+
515
+ def process_create_table(seqid, iprot, oprot)
516
+ args = read_args(iprot, Create_table_args)
517
+ result = Create_table_result.new()
518
+ begin
519
+ @handler.create_table(args.tbl)
520
+ rescue AlreadyExistsException => o1
521
+ result.o1 = o1
522
+ rescue InvalidObjectException => o2
523
+ result.o2 = o2
524
+ rescue MetaException => o3
525
+ result.o3 = o3
526
+ rescue NoSuchObjectException => o4
527
+ result.o4 = o4
528
+ end
529
+ write_result(result, oprot, 'create_table', seqid)
530
+ end
531
+
532
+ def process_drop_table(seqid, iprot, oprot)
533
+ args = read_args(iprot, Drop_table_args)
534
+ result = Drop_table_result.new()
535
+ begin
536
+ @handler.drop_table(args.dbname, args.name, args.deleteData)
537
+ rescue NoSuchObjectException => o1
538
+ result.o1 = o1
539
+ rescue MetaException => o3
540
+ result.o3 = o3
541
+ end
542
+ write_result(result, oprot, 'drop_table', seqid)
543
+ end
544
+
545
+ def process_get_tables(seqid, iprot, oprot)
546
+ args = read_args(iprot, Get_tables_args)
547
+ result = Get_tables_result.new()
548
+ begin
549
+ result.success = @handler.get_tables(args.db_name, args.pattern)
550
+ rescue MetaException => o1
551
+ result.o1 = o1
552
+ end
553
+ write_result(result, oprot, 'get_tables', seqid)
554
+ end
555
+
556
+ def process_get_table(seqid, iprot, oprot)
557
+ args = read_args(iprot, Get_table_args)
558
+ result = Get_table_result.new()
559
+ begin
560
+ result.success = @handler.get_table(args.dbname, args.tbl_name)
561
+ rescue MetaException => o1
562
+ result.o1 = o1
563
+ rescue NoSuchObjectException => o2
564
+ result.o2 = o2
565
+ end
566
+ write_result(result, oprot, 'get_table', seqid)
567
+ end
568
+
569
+ def process_alter_table(seqid, iprot, oprot)
570
+ args = read_args(iprot, Alter_table_args)
571
+ result = Alter_table_result.new()
572
+ begin
573
+ @handler.alter_table(args.dbname, args.tbl_name, args.new_tbl)
574
+ rescue InvalidOperationException => o1
575
+ result.o1 = o1
576
+ rescue MetaException => o2
577
+ result.o2 = o2
578
+ end
579
+ write_result(result, oprot, 'alter_table', seqid)
580
+ end
581
+
582
+ def process_add_partition(seqid, iprot, oprot)
583
+ args = read_args(iprot, Add_partition_args)
584
+ result = Add_partition_result.new()
585
+ begin
586
+ result.success = @handler.add_partition(args.new_part)
587
+ rescue InvalidObjectException => o1
588
+ result.o1 = o1
589
+ rescue AlreadyExistsException => o2
590
+ result.o2 = o2
591
+ rescue MetaException => o3
592
+ result.o3 = o3
593
+ end
594
+ write_result(result, oprot, 'add_partition', seqid)
595
+ end
596
+
597
+ def process_append_partition(seqid, iprot, oprot)
598
+ args = read_args(iprot, Append_partition_args)
599
+ result = Append_partition_result.new()
600
+ begin
601
+ result.success = @handler.append_partition(args.db_name, args.tbl_name, args.part_vals)
602
+ rescue InvalidObjectException => o1
603
+ result.o1 = o1
604
+ rescue AlreadyExistsException => o2
605
+ result.o2 = o2
606
+ rescue MetaException => o3
607
+ result.o3 = o3
608
+ end
609
+ write_result(result, oprot, 'append_partition', seqid)
610
+ end
611
+
612
+ def process_drop_partition(seqid, iprot, oprot)
613
+ args = read_args(iprot, Drop_partition_args)
614
+ result = Drop_partition_result.new()
615
+ begin
616
+ result.success = @handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData)
617
+ rescue NoSuchObjectException => o1
618
+ result.o1 = o1
619
+ rescue MetaException => o2
620
+ result.o2 = o2
621
+ end
622
+ write_result(result, oprot, 'drop_partition', seqid)
623
+ end
624
+
625
+ def process_get_partition(seqid, iprot, oprot)
626
+ args = read_args(iprot, Get_partition_args)
627
+ result = Get_partition_result.new()
628
+ begin
629
+ result.success = @handler.get_partition(args.db_name, args.tbl_name, args.part_vals)
630
+ rescue MetaException => o1
631
+ result.o1 = o1
632
+ end
633
+ write_result(result, oprot, 'get_partition', seqid)
634
+ end
635
+
636
+ def process_get_partitions(seqid, iprot, oprot)
637
+ args = read_args(iprot, Get_partitions_args)
638
+ result = Get_partitions_result.new()
639
+ begin
640
+ result.success = @handler.get_partitions(args.db_name, args.tbl_name, args.max_parts)
641
+ rescue NoSuchObjectException => o1
642
+ result.o1 = o1
643
+ rescue MetaException => o2
644
+ result.o2 = o2
645
+ end
646
+ write_result(result, oprot, 'get_partitions', seqid)
647
+ end
648
+
649
+ def process_get_partition_names(seqid, iprot, oprot)
650
+ args = read_args(iprot, Get_partition_names_args)
651
+ result = Get_partition_names_result.new()
652
+ begin
653
+ result.success = @handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts)
654
+ rescue MetaException => o2
655
+ result.o2 = o2
656
+ end
657
+ write_result(result, oprot, 'get_partition_names', seqid)
658
+ end
659
+
660
+ def process_alter_partition(seqid, iprot, oprot)
661
+ args = read_args(iprot, Alter_partition_args)
662
+ result = Alter_partition_result.new()
663
+ begin
664
+ @handler.alter_partition(args.db_name, args.tbl_name, args.new_part)
665
+ rescue InvalidOperationException => o1
666
+ result.o1 = o1
667
+ rescue MetaException => o2
668
+ result.o2 = o2
669
+ end
670
+ write_result(result, oprot, 'alter_partition', seqid)
671
+ end
672
+
673
+ end
674
+
675
+ # HELPER FUNCTIONS AND STRUCTURES
676
+
677
+ class Create_database_args
678
+ include ::Thrift::Struct
679
+ NAME = 1
680
+ DESCRIPTION = 2
681
+
682
+ ::Thrift::Struct.field_accessor self, :name, :description
683
+ FIELDS = {
684
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
685
+ DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}
686
+ }
687
+
688
+ def struct_fields; FIELDS; end
689
+
690
+ def validate
691
+ end
692
+
693
+ end
694
+
695
+ class Create_database_result
696
+ include ::Thrift::Struct
697
+ SUCCESS = 0
698
+ O1 = 1
699
+ O2 = 2
700
+
701
+ ::Thrift::Struct.field_accessor self, :success, :o1, :o2
702
+ FIELDS = {
703
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
704
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException},
705
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
706
+ }
707
+
708
+ def struct_fields; FIELDS; end
709
+
710
+ def validate
711
+ end
712
+
713
+ end
714
+
715
+ class Get_database_args
716
+ include ::Thrift::Struct
717
+ NAME = 1
718
+
719
+ ::Thrift::Struct.field_accessor self, :name
720
+ FIELDS = {
721
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}
722
+ }
723
+
724
+ def struct_fields; FIELDS; end
725
+
726
+ def validate
727
+ end
728
+
729
+ end
730
+
731
+ class Get_database_result
732
+ include ::Thrift::Struct
733
+ SUCCESS = 0
734
+ O1 = 1
735
+ O2 = 2
736
+
737
+ ::Thrift::Struct.field_accessor self, :success, :o1, :o2
738
+ FIELDS = {
739
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Database},
740
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException},
741
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
742
+ }
743
+
744
+ def struct_fields; FIELDS; end
745
+
746
+ def validate
747
+ end
748
+
749
+ end
750
+
751
+ class Drop_database_args
752
+ include ::Thrift::Struct
753
+ NAME = 1
754
+
755
+ ::Thrift::Struct.field_accessor self, :name
756
+ FIELDS = {
757
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}
758
+ }
759
+
760
+ def struct_fields; FIELDS; end
761
+
762
+ def validate
763
+ end
764
+
765
+ end
766
+
767
+ class Drop_database_result
768
+ include ::Thrift::Struct
769
+ SUCCESS = 0
770
+ O2 = 2
771
+
772
+ ::Thrift::Struct.field_accessor self, :success, :o2
773
+ FIELDS = {
774
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
775
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
776
+ }
777
+
778
+ def struct_fields; FIELDS; end
779
+
780
+ def validate
781
+ end
782
+
783
+ end
784
+
785
+ class Get_databases_args
786
+ include ::Thrift::Struct
787
+
788
+ FIELDS = {
789
+
790
+ }
791
+
792
+ def struct_fields; FIELDS; end
793
+
794
+ def validate
795
+ end
796
+
797
+ end
798
+
799
+ class Get_databases_result
800
+ include ::Thrift::Struct
801
+ SUCCESS = 0
802
+ O1 = 1
803
+
804
+ ::Thrift::Struct.field_accessor self, :success, :o1
805
+ FIELDS = {
806
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
807
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}
808
+ }
809
+
810
+ def struct_fields; FIELDS; end
811
+
812
+ def validate
813
+ end
814
+
815
+ end
816
+
817
+ class Get_type_args
818
+ include ::Thrift::Struct
819
+ NAME = 1
820
+
821
+ ::Thrift::Struct.field_accessor self, :name
822
+ FIELDS = {
823
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}
824
+ }
825
+
826
+ def struct_fields; FIELDS; end
827
+
828
+ def validate
829
+ end
830
+
831
+ end
832
+
833
+ class Get_type_result
834
+ include ::Thrift::Struct
835
+ SUCCESS = 0
836
+ O2 = 1
837
+
838
+ ::Thrift::Struct.field_accessor self, :success, :o2
839
+ FIELDS = {
840
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Type},
841
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
842
+ }
843
+
844
+ def struct_fields; FIELDS; end
845
+
846
+ def validate
847
+ end
848
+
849
+ end
850
+
851
+ class Create_type_args
852
+ include ::Thrift::Struct
853
+ TYPE = 1
854
+
855
+ ::Thrift::Struct.field_accessor self, :type
856
+ FIELDS = {
857
+ TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'type', :class => Type}
858
+ }
859
+
860
+ def struct_fields; FIELDS; end
861
+
862
+ def validate
863
+ end
864
+
865
+ end
866
+
867
+ class Create_type_result
868
+ include ::Thrift::Struct
869
+ SUCCESS = 0
870
+ O1 = 1
871
+ O2 = 2
872
+ O3 = 3
873
+
874
+ ::Thrift::Struct.field_accessor self, :success, :o1, :o2, :o3
875
+ FIELDS = {
876
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
877
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException},
878
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException},
879
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}
880
+ }
881
+
882
+ def struct_fields; FIELDS; end
883
+
884
+ def validate
885
+ end
886
+
887
+ end
888
+
889
+ class Drop_type_args
890
+ include ::Thrift::Struct
891
+ TYPE = 1
892
+
893
+ ::Thrift::Struct.field_accessor self, :type
894
+ FIELDS = {
895
+ TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'}
896
+ }
897
+
898
+ def struct_fields; FIELDS; end
899
+
900
+ def validate
901
+ end
902
+
903
+ end
904
+
905
+ class Drop_type_result
906
+ include ::Thrift::Struct
907
+ SUCCESS = 0
908
+ O2 = 1
909
+
910
+ ::Thrift::Struct.field_accessor self, :success, :o2
911
+ FIELDS = {
912
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
913
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
914
+ }
915
+
916
+ def struct_fields; FIELDS; end
917
+
918
+ def validate
919
+ end
920
+
921
+ end
922
+
923
+ class Get_type_all_args
924
+ include ::Thrift::Struct
925
+ NAME = 1
926
+
927
+ ::Thrift::Struct.field_accessor self, :name
928
+ FIELDS = {
929
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}
930
+ }
931
+
932
+ def struct_fields; FIELDS; end
933
+
934
+ def validate
935
+ end
936
+
937
+ end
938
+
939
+ class Get_type_all_result
940
+ include ::Thrift::Struct
941
+ SUCCESS = 0
942
+ O2 = 1
943
+
944
+ ::Thrift::Struct.field_accessor self, :success, :o2
945
+ FIELDS = {
946
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => Type}},
947
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
948
+ }
949
+
950
+ def struct_fields; FIELDS; end
951
+
952
+ def validate
953
+ end
954
+
955
+ end
956
+
957
+ class Get_fields_args
958
+ include ::Thrift::Struct
959
+ DB_NAME = 1
960
+ TABLE_NAME = 2
961
+
962
+ ::Thrift::Struct.field_accessor self, :db_name, :table_name
963
+ FIELDS = {
964
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
965
+ TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}
966
+ }
967
+
968
+ def struct_fields; FIELDS; end
969
+
970
+ def validate
971
+ end
972
+
973
+ end
974
+
975
+ class Get_fields_result
976
+ include ::Thrift::Struct
977
+ SUCCESS = 0
978
+ O1 = 1
979
+ O2 = 2
980
+ O3 = 3
981
+
982
+ ::Thrift::Struct.field_accessor self, :success, :o1, :o2, :o3
983
+ FIELDS = {
984
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}},
985
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException},
986
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => UnknownTableException},
987
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException}
988
+ }
989
+
990
+ def struct_fields; FIELDS; end
991
+
992
+ def validate
993
+ end
994
+
995
+ end
996
+
997
+ class Get_schema_args
998
+ include ::Thrift::Struct
999
+ DB_NAME = 1
1000
+ TABLE_NAME = 2
1001
+
1002
+ ::Thrift::Struct.field_accessor self, :db_name, :table_name
1003
+ FIELDS = {
1004
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
1005
+ TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}
1006
+ }
1007
+
1008
+ def struct_fields; FIELDS; end
1009
+
1010
+ def validate
1011
+ end
1012
+
1013
+ end
1014
+
1015
+ class Get_schema_result
1016
+ include ::Thrift::Struct
1017
+ SUCCESS = 0
1018
+ O1 = 1
1019
+ O2 = 2
1020
+ O3 = 3
1021
+
1022
+ ::Thrift::Struct.field_accessor self, :success, :o1, :o2, :o3
1023
+ FIELDS = {
1024
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}},
1025
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException},
1026
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => UnknownTableException},
1027
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException}
1028
+ }
1029
+
1030
+ def struct_fields; FIELDS; end
1031
+
1032
+ def validate
1033
+ end
1034
+
1035
+ end
1036
+
1037
+ class Create_table_args
1038
+ include ::Thrift::Struct
1039
+ TBL = 1
1040
+
1041
+ ::Thrift::Struct.field_accessor self, :tbl
1042
+ FIELDS = {
1043
+ TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => Table}
1044
+ }
1045
+
1046
+ def struct_fields; FIELDS; end
1047
+
1048
+ def validate
1049
+ end
1050
+
1051
+ end
1052
+
1053
+ class Create_table_result
1054
+ include ::Thrift::Struct
1055
+ O1 = 1
1056
+ O2 = 2
1057
+ O3 = 3
1058
+ O4 = 4
1059
+
1060
+ ::Thrift::Struct.field_accessor self, :o1, :o2, :o3, :o4
1061
+ FIELDS = {
1062
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException},
1063
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException},
1064
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException},
1065
+ O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => NoSuchObjectException}
1066
+ }
1067
+
1068
+ def struct_fields; FIELDS; end
1069
+
1070
+ def validate
1071
+ end
1072
+
1073
+ end
1074
+
1075
+ class Drop_table_args
1076
+ include ::Thrift::Struct
1077
+ DBNAME = 1
1078
+ NAME = 2
1079
+ DELETEDATA = 3
1080
+
1081
+ ::Thrift::Struct.field_accessor self, :dbname, :name, :deleteData
1082
+ FIELDS = {
1083
+ DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
1084
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
1085
+ DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'}
1086
+ }
1087
+
1088
+ def struct_fields; FIELDS; end
1089
+
1090
+ def validate
1091
+ end
1092
+
1093
+ end
1094
+
1095
+ class Drop_table_result
1096
+ include ::Thrift::Struct
1097
+ O1 = 1
1098
+ O3 = 2
1099
+
1100
+ ::Thrift::Struct.field_accessor self, :o1, :o3
1101
+ FIELDS = {
1102
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException},
1103
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}
1104
+ }
1105
+
1106
+ def struct_fields; FIELDS; end
1107
+
1108
+ def validate
1109
+ end
1110
+
1111
+ end
1112
+
1113
+ class Get_tables_args
1114
+ include ::Thrift::Struct
1115
+ DB_NAME = 1
1116
+ PATTERN = 2
1117
+
1118
+ ::Thrift::Struct.field_accessor self, :db_name, :pattern
1119
+ FIELDS = {
1120
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
1121
+ PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'}
1122
+ }
1123
+
1124
+ def struct_fields; FIELDS; end
1125
+
1126
+ def validate
1127
+ end
1128
+
1129
+ end
1130
+
1131
+ class Get_tables_result
1132
+ include ::Thrift::Struct
1133
+ SUCCESS = 0
1134
+ O1 = 1
1135
+
1136
+ ::Thrift::Struct.field_accessor self, :success, :o1
1137
+ FIELDS = {
1138
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
1139
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}
1140
+ }
1141
+
1142
+ def struct_fields; FIELDS; end
1143
+
1144
+ def validate
1145
+ end
1146
+
1147
+ end
1148
+
1149
+ class Get_table_args
1150
+ include ::Thrift::Struct
1151
+ DBNAME = 1
1152
+ TBL_NAME = 2
1153
+
1154
+ ::Thrift::Struct.field_accessor self, :dbname, :tbl_name
1155
+ FIELDS = {
1156
+ DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
1157
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}
1158
+ }
1159
+
1160
+ def struct_fields; FIELDS; end
1161
+
1162
+ def validate
1163
+ end
1164
+
1165
+ end
1166
+
1167
+ class Get_table_result
1168
+ include ::Thrift::Struct
1169
+ SUCCESS = 0
1170
+ O1 = 1
1171
+ O2 = 2
1172
+
1173
+ ::Thrift::Struct.field_accessor self, :success, :o1, :o2
1174
+ FIELDS = {
1175
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Table},
1176
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException},
1177
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException}
1178
+ }
1179
+
1180
+ def struct_fields; FIELDS; end
1181
+
1182
+ def validate
1183
+ end
1184
+
1185
+ end
1186
+
1187
+ class Alter_table_args
1188
+ include ::Thrift::Struct
1189
+ DBNAME = 1
1190
+ TBL_NAME = 2
1191
+ NEW_TBL = 3
1192
+
1193
+ ::Thrift::Struct.field_accessor self, :dbname, :tbl_name, :new_tbl
1194
+ FIELDS = {
1195
+ DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
1196
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
1197
+ NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => Table}
1198
+ }
1199
+
1200
+ def struct_fields; FIELDS; end
1201
+
1202
+ def validate
1203
+ end
1204
+
1205
+ end
1206
+
1207
+ class Alter_table_result
1208
+ include ::Thrift::Struct
1209
+ O1 = 1
1210
+ O2 = 2
1211
+
1212
+ ::Thrift::Struct.field_accessor self, :o1, :o2
1213
+ FIELDS = {
1214
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException},
1215
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
1216
+ }
1217
+
1218
+ def struct_fields; FIELDS; end
1219
+
1220
+ def validate
1221
+ end
1222
+
1223
+ end
1224
+
1225
+ class Add_partition_args
1226
+ include ::Thrift::Struct
1227
+ NEW_PART = 1
1228
+
1229
+ ::Thrift::Struct.field_accessor self, :new_part
1230
+ FIELDS = {
1231
+ NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition}
1232
+ }
1233
+
1234
+ def struct_fields; FIELDS; end
1235
+
1236
+ def validate
1237
+ end
1238
+
1239
+ end
1240
+
1241
+ class Add_partition_result
1242
+ include ::Thrift::Struct
1243
+ SUCCESS = 0
1244
+ O1 = 1
1245
+ O2 = 2
1246
+ O3 = 3
1247
+
1248
+ ::Thrift::Struct.field_accessor self, :success, :o1, :o2, :o3
1249
+ FIELDS = {
1250
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition},
1251
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException},
1252
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException},
1253
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}
1254
+ }
1255
+
1256
+ def struct_fields; FIELDS; end
1257
+
1258
+ def validate
1259
+ end
1260
+
1261
+ end
1262
+
1263
+ class Append_partition_args
1264
+ include ::Thrift::Struct
1265
+ DB_NAME = 1
1266
+ TBL_NAME = 2
1267
+ PART_VALS = 3
1268
+
1269
+ ::Thrift::Struct.field_accessor self, :db_name, :tbl_name, :part_vals
1270
+ FIELDS = {
1271
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
1272
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
1273
+ PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}
1274
+ }
1275
+
1276
+ def struct_fields; FIELDS; end
1277
+
1278
+ def validate
1279
+ end
1280
+
1281
+ end
1282
+
1283
+ class Append_partition_result
1284
+ include ::Thrift::Struct
1285
+ SUCCESS = 0
1286
+ O1 = 1
1287
+ O2 = 2
1288
+ O3 = 3
1289
+
1290
+ ::Thrift::Struct.field_accessor self, :success, :o1, :o2, :o3
1291
+ FIELDS = {
1292
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition},
1293
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException},
1294
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException},
1295
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}
1296
+ }
1297
+
1298
+ def struct_fields; FIELDS; end
1299
+
1300
+ def validate
1301
+ end
1302
+
1303
+ end
1304
+
1305
+ class Drop_partition_args
1306
+ include ::Thrift::Struct
1307
+ DB_NAME = 1
1308
+ TBL_NAME = 2
1309
+ PART_VALS = 3
1310
+ DELETEDATA = 4
1311
+
1312
+ ::Thrift::Struct.field_accessor self, :db_name, :tbl_name, :part_vals, :deleteData
1313
+ FIELDS = {
1314
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
1315
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
1316
+ PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}},
1317
+ DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'}
1318
+ }
1319
+
1320
+ def struct_fields; FIELDS; end
1321
+
1322
+ def validate
1323
+ end
1324
+
1325
+ end
1326
+
1327
+ class Drop_partition_result
1328
+ include ::Thrift::Struct
1329
+ SUCCESS = 0
1330
+ O1 = 1
1331
+ O2 = 2
1332
+
1333
+ ::Thrift::Struct.field_accessor self, :success, :o1, :o2
1334
+ FIELDS = {
1335
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
1336
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException},
1337
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
1338
+ }
1339
+
1340
+ def struct_fields; FIELDS; end
1341
+
1342
+ def validate
1343
+ end
1344
+
1345
+ end
1346
+
1347
+ class Get_partition_args
1348
+ include ::Thrift::Struct
1349
+ DB_NAME = 1
1350
+ TBL_NAME = 2
1351
+ PART_VALS = 3
1352
+
1353
+ ::Thrift::Struct.field_accessor self, :db_name, :tbl_name, :part_vals
1354
+ FIELDS = {
1355
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
1356
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
1357
+ PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}
1358
+ }
1359
+
1360
+ def struct_fields; FIELDS; end
1361
+
1362
+ def validate
1363
+ end
1364
+
1365
+ end
1366
+
1367
+ class Get_partition_result
1368
+ include ::Thrift::Struct
1369
+ SUCCESS = 0
1370
+ O1 = 1
1371
+
1372
+ ::Thrift::Struct.field_accessor self, :success, :o1
1373
+ FIELDS = {
1374
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition},
1375
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}
1376
+ }
1377
+
1378
+ def struct_fields; FIELDS; end
1379
+
1380
+ def validate
1381
+ end
1382
+
1383
+ end
1384
+
1385
+ class Get_partitions_args
1386
+ include ::Thrift::Struct
1387
+ DB_NAME = 1
1388
+ TBL_NAME = 2
1389
+ MAX_PARTS = 3
1390
+
1391
+ ::Thrift::Struct.field_accessor self, :db_name, :tbl_name, :max_parts
1392
+ FIELDS = {
1393
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
1394
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
1395
+ MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1}
1396
+ }
1397
+
1398
+ def struct_fields; FIELDS; end
1399
+
1400
+ def validate
1401
+ end
1402
+
1403
+ end
1404
+
1405
+ class Get_partitions_result
1406
+ include ::Thrift::Struct
1407
+ SUCCESS = 0
1408
+ O1 = 1
1409
+ O2 = 2
1410
+
1411
+ ::Thrift::Struct.field_accessor self, :success, :o1, :o2
1412
+ FIELDS = {
1413
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}},
1414
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException},
1415
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
1416
+ }
1417
+
1418
+ def struct_fields; FIELDS; end
1419
+
1420
+ def validate
1421
+ end
1422
+
1423
+ end
1424
+
1425
+ class Get_partition_names_args
1426
+ include ::Thrift::Struct
1427
+ DB_NAME = 1
1428
+ TBL_NAME = 2
1429
+ MAX_PARTS = 3
1430
+
1431
+ ::Thrift::Struct.field_accessor self, :db_name, :tbl_name, :max_parts
1432
+ FIELDS = {
1433
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
1434
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
1435
+ MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1}
1436
+ }
1437
+
1438
+ def struct_fields; FIELDS; end
1439
+
1440
+ def validate
1441
+ end
1442
+
1443
+ end
1444
+
1445
+ class Get_partition_names_result
1446
+ include ::Thrift::Struct
1447
+ SUCCESS = 0
1448
+ O2 = 1
1449
+
1450
+ ::Thrift::Struct.field_accessor self, :success, :o2
1451
+ FIELDS = {
1452
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
1453
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
1454
+ }
1455
+
1456
+ def struct_fields; FIELDS; end
1457
+
1458
+ def validate
1459
+ end
1460
+
1461
+ end
1462
+
1463
+ class Alter_partition_args
1464
+ include ::Thrift::Struct
1465
+ DB_NAME = 1
1466
+ TBL_NAME = 2
1467
+ NEW_PART = 3
1468
+
1469
+ ::Thrift::Struct.field_accessor self, :db_name, :tbl_name, :new_part
1470
+ FIELDS = {
1471
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
1472
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
1473
+ NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition}
1474
+ }
1475
+
1476
+ def struct_fields; FIELDS; end
1477
+
1478
+ def validate
1479
+ end
1480
+
1481
+ end
1482
+
1483
+ class Alter_partition_result
1484
+ include ::Thrift::Struct
1485
+ O1 = 1
1486
+ O2 = 2
1487
+
1488
+ ::Thrift::Struct.field_accessor self, :o1, :o2
1489
+ FIELDS = {
1490
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException},
1491
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}
1492
+ }
1493
+
1494
+ def struct_fields; FIELDS; end
1495
+
1496
+ def validate
1497
+ end
1498
+
1499
+ end
1500
+
1501
+ end
1502
+