sequel-impala 1.0.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.
Files changed (86) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +3 -0
  3. data/LICENSE +462 -0
  4. data/README.rdoc +39 -0
  5. data/Rakefile +39 -0
  6. data/lib/driver/commons-logging-1.2.jar +0 -0
  7. data/lib/driver/hadoop-common-2.6.0.jar +0 -0
  8. data/lib/driver/hadoop-core-2.6.0.jar +0 -0
  9. data/lib/driver/hive-exec-1.1.0.jar +0 -0
  10. data/lib/driver/hive-jdbc-1.1.0.jar +0 -0
  11. data/lib/driver/hive-metastore-1.1.0.jar +0 -0
  12. data/lib/driver/hive-service-1.1.0.jar +0 -0
  13. data/lib/driver/httpclient-4.3.jar +0 -0
  14. data/lib/driver/httpcore-4.3.jar +0 -0
  15. data/lib/driver/libfb303-0.9.0.jar +0 -0
  16. data/lib/driver/slf4j-api-1.7.5.jar +0 -0
  17. data/lib/impala.rb +47 -0
  18. data/lib/impala/connection.rb +117 -0
  19. data/lib/impala/cursor.rb +157 -0
  20. data/lib/impala/protocol.rb +8 -0
  21. data/lib/impala/protocol/beeswax_constants.rb +15 -0
  22. data/lib/impala/protocol/beeswax_service.rb +766 -0
  23. data/lib/impala/protocol/beeswax_types.rb +193 -0
  24. data/lib/impala/protocol/cli_service_constants.rb +60 -0
  25. data/lib/impala/protocol/cli_service_types.rb +1452 -0
  26. data/lib/impala/protocol/facebook_service.rb +706 -0
  27. data/lib/impala/protocol/fb303_constants.rb +15 -0
  28. data/lib/impala/protocol/fb303_types.rb +25 -0
  29. data/lib/impala/protocol/hive_metastore_constants.rb +53 -0
  30. data/lib/impala/protocol/hive_metastore_types.rb +698 -0
  31. data/lib/impala/protocol/impala_hive_server2_service.rb +29 -0
  32. data/lib/impala/protocol/impala_service.rb +377 -0
  33. data/lib/impala/protocol/impala_service_constants.rb +13 -0
  34. data/lib/impala/protocol/impala_service_types.rb +90 -0
  35. data/lib/impala/protocol/status_constants.rb +13 -0
  36. data/lib/impala/protocol/status_types.rb +46 -0
  37. data/lib/impala/protocol/t_c_l_i_service.rb +948 -0
  38. data/lib/impala/protocol/thrift_hive_metastore.rb +4707 -0
  39. data/lib/impala/version.rb +3 -0
  40. data/lib/jdbc/hive2.rb +46 -0
  41. data/lib/sequel/adapters/impala.rb +123 -0
  42. data/lib/sequel/adapters/jdbc/hive2.rb +26 -0
  43. data/lib/sequel/adapters/shared/impala.rb +635 -0
  44. data/lib/sequel/extensions/csv_to_parquet.rb +112 -0
  45. data/spec/database_test.rb +56 -0
  46. data/spec/dataset_test.rb +1268 -0
  47. data/spec/files/bad_down_migration/001_create_alt_basic.rb +4 -0
  48. data/spec/files/bad_down_migration/002_create_alt_advanced.rb +4 -0
  49. data/spec/files/bad_timestamped_migrations/1273253849_create_sessions.rb +9 -0
  50. data/spec/files/bad_timestamped_migrations/1273253851_create_nodes.rb +9 -0
  51. data/spec/files/bad_timestamped_migrations/1273253853_3_create_users.rb +3 -0
  52. data/spec/files/bad_up_migration/001_create_alt_basic.rb +4 -0
  53. data/spec/files/bad_up_migration/002_create_alt_advanced.rb +3 -0
  54. data/spec/files/convert_to_timestamp_migrations/001_create_sessions.rb +9 -0
  55. data/spec/files/convert_to_timestamp_migrations/002_create_nodes.rb +9 -0
  56. data/spec/files/convert_to_timestamp_migrations/003_3_create_users.rb +4 -0
  57. data/spec/files/convert_to_timestamp_migrations/1273253850_create_artists.rb +9 -0
  58. data/spec/files/convert_to_timestamp_migrations/1273253852_create_albums.rb +9 -0
  59. data/spec/files/duplicate_timestamped_migrations/1273253849_create_sessions.rb +9 -0
  60. data/spec/files/duplicate_timestamped_migrations/1273253853_create_nodes.rb +9 -0
  61. data/spec/files/duplicate_timestamped_migrations/1273253853_create_users.rb +4 -0
  62. data/spec/files/integer_migrations/001_create_sessions.rb +9 -0
  63. data/spec/files/integer_migrations/002_create_nodes.rb +9 -0
  64. data/spec/files/integer_migrations/003_3_create_users.rb +4 -0
  65. data/spec/files/interleaved_timestamped_migrations/1273253849_create_sessions.rb +9 -0
  66. data/spec/files/interleaved_timestamped_migrations/1273253850_create_artists.rb +9 -0
  67. data/spec/files/interleaved_timestamped_migrations/1273253851_create_nodes.rb +9 -0
  68. data/spec/files/interleaved_timestamped_migrations/1273253852_create_albums.rb +9 -0
  69. data/spec/files/interleaved_timestamped_migrations/1273253853_3_create_users.rb +4 -0
  70. data/spec/files/reversible_migrations/001_reversible.rb +5 -0
  71. data/spec/files/reversible_migrations/002_reversible.rb +5 -0
  72. data/spec/files/reversible_migrations/003_reversible.rb +5 -0
  73. data/spec/files/reversible_migrations/004_reversible.rb +5 -0
  74. data/spec/files/reversible_migrations/005_reversible.rb +10 -0
  75. data/spec/files/timestamped_migrations/1273253849_create_sessions.rb +9 -0
  76. data/spec/files/timestamped_migrations/1273253851_create_nodes.rb +9 -0
  77. data/spec/files/timestamped_migrations/1273253853_3_create_users.rb +4 -0
  78. data/spec/impala_test.rb +285 -0
  79. data/spec/migrator_test.rb +240 -0
  80. data/spec/plugin_test.rb +91 -0
  81. data/spec/prepared_statement_test.rb +327 -0
  82. data/spec/schema_test.rb +356 -0
  83. data/spec/spec_helper.rb +15 -0
  84. data/spec/timezone_test.rb +86 -0
  85. data/spec/type_test.rb +99 -0
  86. metadata +239 -0
@@ -0,0 +1,766 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'beeswax_types'
9
+
10
+ module Impala
11
+ module Protocol
12
+ module Beeswax
13
+ module BeeswaxService
14
+ class Client
15
+ include ::Thrift::Client
16
+
17
+ def query(query)
18
+ send_query(query)
19
+ return recv_query()
20
+ end
21
+
22
+ def send_query(query)
23
+ send_message('query', Query_args, :query => query)
24
+ end
25
+
26
+ def recv_query()
27
+ result = receive_message(Query_result)
28
+ return result.success unless result.success.nil?
29
+ raise result.error unless result.error.nil?
30
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'query failed: unknown result')
31
+ end
32
+
33
+ def recv_result()
34
+ result = receive_message(Query_result)
35
+ raise result.error unless result.error.nil?
36
+ return result if result.ready
37
+ end
38
+
39
+ def executeAndWait2(query, clientCtx)
40
+ send_query(query)
41
+ sleep_time = 0.015625
42
+ max_sleep_time = 1
43
+ until result = recv_result
44
+ sleep(sleep_time)
45
+ sleep_time *= 2 unless sleep_time >= max_sleep_time
46
+ end
47
+ result.success
48
+ send_executeAndWait(query, clientCtx)
49
+ return recv_executeAndWait()
50
+ end
51
+
52
+ def executeAndWait(query, clientCtx)
53
+ send_executeAndWait(query, clientCtx)
54
+ return recv_executeAndWait()
55
+ end
56
+
57
+ def send_executeAndWait(query, clientCtx)
58
+ send_message('executeAndWait', ExecuteAndWait_args, :query => query, :clientCtx => clientCtx)
59
+ end
60
+
61
+ def recv_executeAndWait()
62
+ result = receive_message(ExecuteAndWait_result)
63
+ return result.success unless result.success.nil?
64
+ raise result.error unless result.error.nil?
65
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'executeAndWait failed: unknown result')
66
+ end
67
+
68
+ def explain(query)
69
+ send_explain(query)
70
+ return recv_explain()
71
+ end
72
+
73
+ def send_explain(query)
74
+ send_message('explain', Explain_args, :query => query)
75
+ end
76
+
77
+ def recv_explain()
78
+ result = receive_message(Explain_result)
79
+ return result.success unless result.success.nil?
80
+ raise result.error unless result.error.nil?
81
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'explain failed: unknown result')
82
+ end
83
+
84
+ def fetch(query_id, start_over, fetch_size)
85
+ send_fetch(query_id, start_over, fetch_size)
86
+ return recv_fetch()
87
+ end
88
+
89
+ def send_fetch(query_id, start_over, fetch_size)
90
+ send_message('fetch', Fetch_args, :query_id => query_id, :start_over => start_over, :fetch_size => fetch_size)
91
+ end
92
+
93
+ def recv_fetch()
94
+ result = receive_message(Fetch_result)
95
+ return result.success unless result.success.nil?
96
+ raise result.error unless result.error.nil?
97
+ raise result.error2 unless result.error2.nil?
98
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetch failed: unknown result')
99
+ end
100
+
101
+ def get_state(handle)
102
+ send_get_state(handle)
103
+ return recv_get_state()
104
+ end
105
+
106
+ def send_get_state(handle)
107
+ send_message('get_state', Get_state_args, :handle => handle)
108
+ end
109
+
110
+ def recv_get_state()
111
+ result = receive_message(Get_state_result)
112
+ return result.success unless result.success.nil?
113
+ raise result.error unless result.error.nil?
114
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_state failed: unknown result')
115
+ end
116
+
117
+ def get_results_metadata(handle)
118
+ send_get_results_metadata(handle)
119
+ return recv_get_results_metadata()
120
+ end
121
+
122
+ def send_get_results_metadata(handle)
123
+ send_message('get_results_metadata', Get_results_metadata_args, :handle => handle)
124
+ end
125
+
126
+ def recv_get_results_metadata()
127
+ result = receive_message(Get_results_metadata_result)
128
+ return result.success unless result.success.nil?
129
+ raise result.error unless result.error.nil?
130
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_results_metadata failed: unknown result')
131
+ end
132
+
133
+ def echo(s)
134
+ send_echo(s)
135
+ return recv_echo()
136
+ end
137
+
138
+ def send_echo(s)
139
+ send_message('echo', Echo_args, :s => s)
140
+ end
141
+
142
+ def recv_echo()
143
+ result = receive_message(Echo_result)
144
+ return result.success unless result.success.nil?
145
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'echo failed: unknown result')
146
+ end
147
+
148
+ def dump_config()
149
+ send_dump_config()
150
+ return recv_dump_config()
151
+ end
152
+
153
+ def send_dump_config()
154
+ send_message('dump_config', Dump_config_args)
155
+ end
156
+
157
+ def recv_dump_config()
158
+ result = receive_message(Dump_config_result)
159
+ return result.success unless result.success.nil?
160
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'dump_config failed: unknown result')
161
+ end
162
+
163
+ def get_log(context)
164
+ send_get_log(context)
165
+ return recv_get_log()
166
+ end
167
+
168
+ def send_get_log(context)
169
+ send_message('get_log', Get_log_args, :context => context)
170
+ end
171
+
172
+ def recv_get_log()
173
+ result = receive_message(Get_log_result)
174
+ return result.success unless result.success.nil?
175
+ raise result.error unless result.error.nil?
176
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_log failed: unknown result')
177
+ end
178
+
179
+ def get_default_configuration(include_hadoop)
180
+ send_get_default_configuration(include_hadoop)
181
+ return recv_get_default_configuration()
182
+ end
183
+
184
+ def send_get_default_configuration(include_hadoop)
185
+ send_message('get_default_configuration', Get_default_configuration_args, :include_hadoop => include_hadoop)
186
+ end
187
+
188
+ def recv_get_default_configuration()
189
+ result = receive_message(Get_default_configuration_result)
190
+ return result.success unless result.success.nil?
191
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_default_configuration failed: unknown result')
192
+ end
193
+
194
+ def close(handle)
195
+ send_close(handle)
196
+ recv_close()
197
+ end
198
+
199
+ def send_close(handle)
200
+ send_message('close', Close_args, :handle => handle)
201
+ end
202
+
203
+ def recv_close()
204
+ result = receive_message(Close_result)
205
+ raise result.error unless result.error.nil?
206
+ raise result.error2 unless result.error2.nil?
207
+ return
208
+ end
209
+
210
+ def clean(log_context)
211
+ send_clean(log_context)
212
+ recv_clean()
213
+ end
214
+
215
+ def send_clean(log_context)
216
+ send_message('clean', Clean_args, :log_context => log_context)
217
+ end
218
+
219
+ def recv_clean()
220
+ result = receive_message(Clean_result)
221
+ return
222
+ end
223
+
224
+ end
225
+
226
+ class Processor
227
+ include ::Thrift::Processor
228
+
229
+ def process_query(seqid, iprot, oprot)
230
+ args = read_args(iprot, Query_args)
231
+ result = Query_result.new()
232
+ begin
233
+ result.success = @handler.query(args.query)
234
+ rescue ::Impala::Protocol::Beeswax::BeeswaxException => error
235
+ result.error = error
236
+ end
237
+ write_result(result, oprot, 'query', seqid)
238
+ end
239
+
240
+ def process_executeAndWait(seqid, iprot, oprot)
241
+ args = read_args(iprot, ExecuteAndWait_args)
242
+ result = ExecuteAndWait_result.new()
243
+ begin
244
+ result.success = @handler.executeAndWait(args.query, args.clientCtx)
245
+ rescue ::Impala::Protocol::Beeswax::BeeswaxException => error
246
+ result.error = error
247
+ end
248
+ write_result(result, oprot, 'executeAndWait', seqid)
249
+ end
250
+
251
+ def process_explain(seqid, iprot, oprot)
252
+ args = read_args(iprot, Explain_args)
253
+ result = Explain_result.new()
254
+ begin
255
+ result.success = @handler.explain(args.query)
256
+ rescue ::Impala::Protocol::Beeswax::BeeswaxException => error
257
+ result.error = error
258
+ end
259
+ write_result(result, oprot, 'explain', seqid)
260
+ end
261
+
262
+ def process_fetch(seqid, iprot, oprot)
263
+ args = read_args(iprot, Fetch_args)
264
+ result = Fetch_result.new()
265
+ begin
266
+ result.success = @handler.fetch(args.query_id, args.start_over, args.fetch_size)
267
+ rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error
268
+ result.error = error
269
+ rescue ::Impala::Protocol::Beeswax::BeeswaxException => error2
270
+ result.error2 = error2
271
+ end
272
+ write_result(result, oprot, 'fetch', seqid)
273
+ end
274
+
275
+ def process_get_state(seqid, iprot, oprot)
276
+ args = read_args(iprot, Get_state_args)
277
+ result = Get_state_result.new()
278
+ begin
279
+ result.success = @handler.get_state(args.handle)
280
+ rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error
281
+ result.error = error
282
+ end
283
+ write_result(result, oprot, 'get_state', seqid)
284
+ end
285
+
286
+ def process_get_results_metadata(seqid, iprot, oprot)
287
+ args = read_args(iprot, Get_results_metadata_args)
288
+ result = Get_results_metadata_result.new()
289
+ begin
290
+ result.success = @handler.get_results_metadata(args.handle)
291
+ rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error
292
+ result.error = error
293
+ end
294
+ write_result(result, oprot, 'get_results_metadata', seqid)
295
+ end
296
+
297
+ def process_echo(seqid, iprot, oprot)
298
+ args = read_args(iprot, Echo_args)
299
+ result = Echo_result.new()
300
+ result.success = @handler.echo(args.s)
301
+ write_result(result, oprot, 'echo', seqid)
302
+ end
303
+
304
+ def process_dump_config(seqid, iprot, oprot)
305
+ args = read_args(iprot, Dump_config_args)
306
+ result = Dump_config_result.new()
307
+ result.success = @handler.dump_config()
308
+ write_result(result, oprot, 'dump_config', seqid)
309
+ end
310
+
311
+ def process_get_log(seqid, iprot, oprot)
312
+ args = read_args(iprot, Get_log_args)
313
+ result = Get_log_result.new()
314
+ begin
315
+ result.success = @handler.get_log(args.context)
316
+ rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error
317
+ result.error = error
318
+ end
319
+ write_result(result, oprot, 'get_log', seqid)
320
+ end
321
+
322
+ def process_get_default_configuration(seqid, iprot, oprot)
323
+ args = read_args(iprot, Get_default_configuration_args)
324
+ result = Get_default_configuration_result.new()
325
+ result.success = @handler.get_default_configuration(args.include_hadoop)
326
+ write_result(result, oprot, 'get_default_configuration', seqid)
327
+ end
328
+
329
+ def process_close(seqid, iprot, oprot)
330
+ args = read_args(iprot, Close_args)
331
+ result = Close_result.new()
332
+ begin
333
+ @handler.close(args.handle)
334
+ rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error
335
+ result.error = error
336
+ rescue ::Impala::Protocol::Beeswax::BeeswaxException => error2
337
+ result.error2 = error2
338
+ end
339
+ write_result(result, oprot, 'close', seqid)
340
+ end
341
+
342
+ def process_clean(seqid, iprot, oprot)
343
+ args = read_args(iprot, Clean_args)
344
+ result = Clean_result.new()
345
+ @handler.clean(args.log_context)
346
+ write_result(result, oprot, 'clean', seqid)
347
+ end
348
+
349
+ end
350
+
351
+ # HELPER FUNCTIONS AND STRUCTURES
352
+
353
+ class Query_args
354
+ include ::Thrift::Struct, ::Thrift::Struct_Union
355
+ QUERY = 1
356
+
357
+ FIELDS = {
358
+ QUERY => {:type => ::Thrift::Types::STRUCT, :name => 'query', :class => ::Impala::Protocol::Beeswax::Query}
359
+ }
360
+
361
+ def struct_fields; FIELDS; end
362
+
363
+ def validate
364
+ end
365
+
366
+ ::Thrift::Struct.generate_accessors self
367
+ end
368
+
369
+ class Query_result
370
+ include ::Thrift::Struct, ::Thrift::Struct_Union
371
+ SUCCESS = 0
372
+ ERROR = 1
373
+
374
+ FIELDS = {
375
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Beeswax::QueryHandle},
376
+ ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::BeeswaxException}
377
+ }
378
+
379
+ def struct_fields; FIELDS; end
380
+
381
+ def validate
382
+ end
383
+
384
+ ::Thrift::Struct.generate_accessors self
385
+ end
386
+
387
+ class ExecuteAndWait_args
388
+ include ::Thrift::Struct, ::Thrift::Struct_Union
389
+ QUERY = 1
390
+ CLIENTCTX = 2
391
+
392
+ FIELDS = {
393
+ QUERY => {:type => ::Thrift::Types::STRUCT, :name => 'query', :class => ::Impala::Protocol::Beeswax::Query},
394
+ CLIENTCTX => {:type => ::Thrift::Types::STRING, :name => 'clientCtx'}
395
+ }
396
+
397
+ def struct_fields; FIELDS; end
398
+
399
+ def validate
400
+ end
401
+
402
+ ::Thrift::Struct.generate_accessors self
403
+ end
404
+
405
+ class ExecuteAndWait_result
406
+ include ::Thrift::Struct, ::Thrift::Struct_Union
407
+ SUCCESS = 0
408
+ ERROR = 1
409
+
410
+ FIELDS = {
411
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Beeswax::QueryHandle},
412
+ ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::BeeswaxException}
413
+ }
414
+
415
+ def struct_fields; FIELDS; end
416
+
417
+ def validate
418
+ end
419
+
420
+ ::Thrift::Struct.generate_accessors self
421
+ end
422
+
423
+ class Explain_args
424
+ include ::Thrift::Struct, ::Thrift::Struct_Union
425
+ QUERY = 1
426
+
427
+ FIELDS = {
428
+ QUERY => {:type => ::Thrift::Types::STRUCT, :name => 'query', :class => ::Impala::Protocol::Beeswax::Query}
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 Explain_result
440
+ include ::Thrift::Struct, ::Thrift::Struct_Union
441
+ SUCCESS = 0
442
+ ERROR = 1
443
+
444
+ FIELDS = {
445
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Beeswax::QueryExplanation},
446
+ ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::BeeswaxException}
447
+ }
448
+
449
+ def struct_fields; FIELDS; end
450
+
451
+ def validate
452
+ end
453
+
454
+ ::Thrift::Struct.generate_accessors self
455
+ end
456
+
457
+ class Fetch_args
458
+ include ::Thrift::Struct, ::Thrift::Struct_Union
459
+ QUERY_ID = 1
460
+ START_OVER = 2
461
+ FETCH_SIZE = 3
462
+
463
+ FIELDS = {
464
+ QUERY_ID => {:type => ::Thrift::Types::STRUCT, :name => 'query_id', :class => ::Impala::Protocol::Beeswax::QueryHandle},
465
+ START_OVER => {:type => ::Thrift::Types::BOOL, :name => 'start_over'},
466
+ FETCH_SIZE => {:type => ::Thrift::Types::I32, :name => 'fetch_size', :default => -1}
467
+ }
468
+
469
+ def struct_fields; FIELDS; end
470
+
471
+ def validate
472
+ end
473
+
474
+ ::Thrift::Struct.generate_accessors self
475
+ end
476
+
477
+ class Fetch_result
478
+ include ::Thrift::Struct, ::Thrift::Struct_Union
479
+ SUCCESS = 0
480
+ ERROR = 1
481
+ ERROR2 = 2
482
+
483
+ FIELDS = {
484
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Beeswax::Results},
485
+ ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException},
486
+ ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Impala::Protocol::Beeswax::BeeswaxException}
487
+ }
488
+
489
+ def struct_fields; FIELDS; end
490
+
491
+ def validate
492
+ end
493
+
494
+ ::Thrift::Struct.generate_accessors self
495
+ end
496
+
497
+ class Get_state_args
498
+ include ::Thrift::Struct, ::Thrift::Struct_Union
499
+ HANDLE = 1
500
+
501
+ FIELDS = {
502
+ HANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'handle', :class => ::Impala::Protocol::Beeswax::QueryHandle}
503
+ }
504
+
505
+ def struct_fields; FIELDS; end
506
+
507
+ def validate
508
+ end
509
+
510
+ ::Thrift::Struct.generate_accessors self
511
+ end
512
+
513
+ class Get_state_result
514
+ include ::Thrift::Struct, ::Thrift::Struct_Union
515
+ SUCCESS = 0
516
+ ERROR = 1
517
+
518
+ FIELDS = {
519
+ SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success', :enum_class => ::Impala::Protocol::Beeswax::QueryState},
520
+ ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException}
521
+ }
522
+
523
+ def struct_fields; FIELDS; end
524
+
525
+ def validate
526
+ unless @success.nil? || ::Impala::Protocol::Beeswax::QueryState::VALID_VALUES.include?(@success)
527
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field success!')
528
+ end
529
+ end
530
+
531
+ ::Thrift::Struct.generate_accessors self
532
+ end
533
+
534
+ class Get_results_metadata_args
535
+ include ::Thrift::Struct, ::Thrift::Struct_Union
536
+ HANDLE = 1
537
+
538
+ FIELDS = {
539
+ HANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'handle', :class => ::Impala::Protocol::Beeswax::QueryHandle}
540
+ }
541
+
542
+ def struct_fields; FIELDS; end
543
+
544
+ def validate
545
+ end
546
+
547
+ ::Thrift::Struct.generate_accessors self
548
+ end
549
+
550
+ class Get_results_metadata_result
551
+ include ::Thrift::Struct, ::Thrift::Struct_Union
552
+ SUCCESS = 0
553
+ ERROR = 1
554
+
555
+ FIELDS = {
556
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Beeswax::ResultsMetadata},
557
+ ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException}
558
+ }
559
+
560
+ def struct_fields; FIELDS; end
561
+
562
+ def validate
563
+ end
564
+
565
+ ::Thrift::Struct.generate_accessors self
566
+ end
567
+
568
+ class Echo_args
569
+ include ::Thrift::Struct, ::Thrift::Struct_Union
570
+ S = 1
571
+
572
+ FIELDS = {
573
+ S => {:type => ::Thrift::Types::STRING, :name => 's'}
574
+ }
575
+
576
+ def struct_fields; FIELDS; end
577
+
578
+ def validate
579
+ end
580
+
581
+ ::Thrift::Struct.generate_accessors self
582
+ end
583
+
584
+ class Echo_result
585
+ include ::Thrift::Struct, ::Thrift::Struct_Union
586
+ SUCCESS = 0
587
+
588
+ FIELDS = {
589
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
590
+ }
591
+
592
+ def struct_fields; FIELDS; end
593
+
594
+ def validate
595
+ end
596
+
597
+ ::Thrift::Struct.generate_accessors self
598
+ end
599
+
600
+ class Dump_config_args
601
+ include ::Thrift::Struct, ::Thrift::Struct_Union
602
+
603
+ FIELDS = {
604
+
605
+ }
606
+
607
+ def struct_fields; FIELDS; end
608
+
609
+ def validate
610
+ end
611
+
612
+ ::Thrift::Struct.generate_accessors self
613
+ end
614
+
615
+ class Dump_config_result
616
+ include ::Thrift::Struct, ::Thrift::Struct_Union
617
+ SUCCESS = 0
618
+
619
+ FIELDS = {
620
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
621
+ }
622
+
623
+ def struct_fields; FIELDS; end
624
+
625
+ def validate
626
+ end
627
+
628
+ ::Thrift::Struct.generate_accessors self
629
+ end
630
+
631
+ class Get_log_args
632
+ include ::Thrift::Struct, ::Thrift::Struct_Union
633
+ CONTEXT = 1
634
+
635
+ FIELDS = {
636
+ CONTEXT => {:type => ::Thrift::Types::STRING, :name => 'context'}
637
+ }
638
+
639
+ def struct_fields; FIELDS; end
640
+
641
+ def validate
642
+ end
643
+
644
+ ::Thrift::Struct.generate_accessors self
645
+ end
646
+
647
+ class Get_log_result
648
+ include ::Thrift::Struct, ::Thrift::Struct_Union
649
+ SUCCESS = 0
650
+ ERROR = 1
651
+
652
+ FIELDS = {
653
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
654
+ ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException}
655
+ }
656
+
657
+ def struct_fields; FIELDS; end
658
+
659
+ def validate
660
+ end
661
+
662
+ ::Thrift::Struct.generate_accessors self
663
+ end
664
+
665
+ class Get_default_configuration_args
666
+ include ::Thrift::Struct, ::Thrift::Struct_Union
667
+ INCLUDE_HADOOP = 1
668
+
669
+ FIELDS = {
670
+ INCLUDE_HADOOP => {:type => ::Thrift::Types::BOOL, :name => 'include_hadoop'}
671
+ }
672
+
673
+ def struct_fields; FIELDS; end
674
+
675
+ def validate
676
+ end
677
+
678
+ ::Thrift::Struct.generate_accessors self
679
+ end
680
+
681
+ class Get_default_configuration_result
682
+ include ::Thrift::Struct, ::Thrift::Struct_Union
683
+ SUCCESS = 0
684
+
685
+ FIELDS = {
686
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Impala::Protocol::Beeswax::ConfigVariable}}
687
+ }
688
+
689
+ def struct_fields; FIELDS; end
690
+
691
+ def validate
692
+ end
693
+
694
+ ::Thrift::Struct.generate_accessors self
695
+ end
696
+
697
+ class Close_args
698
+ include ::Thrift::Struct, ::Thrift::Struct_Union
699
+ HANDLE = 1
700
+
701
+ FIELDS = {
702
+ HANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'handle', :class => ::Impala::Protocol::Beeswax::QueryHandle}
703
+ }
704
+
705
+ def struct_fields; FIELDS; end
706
+
707
+ def validate
708
+ end
709
+
710
+ ::Thrift::Struct.generate_accessors self
711
+ end
712
+
713
+ class Close_result
714
+ include ::Thrift::Struct, ::Thrift::Struct_Union
715
+ ERROR = 1
716
+ ERROR2 = 2
717
+
718
+ FIELDS = {
719
+ ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException},
720
+ ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Impala::Protocol::Beeswax::BeeswaxException}
721
+ }
722
+
723
+ def struct_fields; FIELDS; end
724
+
725
+ def validate
726
+ end
727
+
728
+ ::Thrift::Struct.generate_accessors self
729
+ end
730
+
731
+ class Clean_args
732
+ include ::Thrift::Struct, ::Thrift::Struct_Union
733
+ LOG_CONTEXT = 1
734
+
735
+ FIELDS = {
736
+ LOG_CONTEXT => {:type => ::Thrift::Types::STRING, :name => 'log_context'}
737
+ }
738
+
739
+ def struct_fields; FIELDS; end
740
+
741
+ def validate
742
+ end
743
+
744
+ ::Thrift::Struct.generate_accessors self
745
+ end
746
+
747
+ class Clean_result
748
+ include ::Thrift::Struct, ::Thrift::Struct_Union
749
+
750
+ FIELDS = {
751
+
752
+ }
753
+
754
+ def struct_fields; FIELDS; end
755
+
756
+ def validate
757
+ end
758
+
759
+ ::Thrift::Struct.generate_accessors self
760
+ end
761
+
762
+ end
763
+
764
+ end
765
+ end
766
+ end