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