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,13 @@
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 'status_types'
9
+
10
+ module Impala
11
+ module Protocol
12
+ end
13
+ end
@@ -0,0 +1,46 @@
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
+
9
+ module Impala
10
+ module Protocol
11
+ module TStatusCode
12
+ OK = 0
13
+ CANCELLED = 1
14
+ ANALYSIS_ERROR = 2
15
+ NOT_IMPLEMENTED_ERROR = 3
16
+ RUNTIME_ERROR = 4
17
+ MEM_LIMIT_EXCEEDED = 5
18
+ INTERNAL_ERROR = 6
19
+ VALUE_MAP = {0 => "OK", 1 => "CANCELLED", 2 => "ANALYSIS_ERROR", 3 => "NOT_IMPLEMENTED_ERROR", 4 => "RUNTIME_ERROR", 5 => "MEM_LIMIT_EXCEEDED", 6 => "INTERNAL_ERROR"}
20
+ VALID_VALUES = Set.new([OK, CANCELLED, ANALYSIS_ERROR, NOT_IMPLEMENTED_ERROR, RUNTIME_ERROR, MEM_LIMIT_EXCEEDED, INTERNAL_ERROR]).freeze
21
+ end
22
+
23
+ class TStatus
24
+ include ::Thrift::Struct, ::Thrift::Struct_Union
25
+ STATUS_CODE = 1
26
+ ERROR_MSGS = 2
27
+
28
+ FIELDS = {
29
+ STATUS_CODE => {:type => ::Thrift::Types::I32, :name => 'status_code', :enum_class => ::Impala::Protocol::TStatusCode},
30
+ ERROR_MSGS => {:type => ::Thrift::Types::LIST, :name => 'error_msgs', :element => {:type => ::Thrift::Types::STRING}}
31
+ }
32
+
33
+ def struct_fields; FIELDS; end
34
+
35
+ def validate
36
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status_code is unset!') unless @status_code
37
+ unless @status_code.nil? || ::Impala::Protocol::TStatusCode::VALID_VALUES.include?(@status_code)
38
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field status_code!')
39
+ end
40
+ end
41
+
42
+ ::Thrift::Struct.generate_accessors self
43
+ end
44
+
45
+ end
46
+ end
@@ -0,0 +1,948 @@
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 'cli_service_types'
9
+
10
+ module Impala
11
+ module Protocol
12
+ module Hive
13
+ module TCLIService
14
+ class Client
15
+ include ::Thrift::Client
16
+
17
+ def OpenSession(req)
18
+ send_OpenSession(req)
19
+ return recv_OpenSession()
20
+ end
21
+
22
+ def send_OpenSession(req)
23
+ send_message('OpenSession', OpenSession_args, :req => req)
24
+ end
25
+
26
+ def recv_OpenSession()
27
+ result = receive_message(OpenSession_result)
28
+ return result.success unless result.success.nil?
29
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'OpenSession failed: unknown result')
30
+ end
31
+
32
+ def CloseSession(req)
33
+ send_CloseSession(req)
34
+ return recv_CloseSession()
35
+ end
36
+
37
+ def send_CloseSession(req)
38
+ send_message('CloseSession', CloseSession_args, :req => req)
39
+ end
40
+
41
+ def recv_CloseSession()
42
+ result = receive_message(CloseSession_result)
43
+ return result.success unless result.success.nil?
44
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'CloseSession failed: unknown result')
45
+ end
46
+
47
+ def GetInfo(req)
48
+ send_GetInfo(req)
49
+ return recv_GetInfo()
50
+ end
51
+
52
+ def send_GetInfo(req)
53
+ send_message('GetInfo', GetInfo_args, :req => req)
54
+ end
55
+
56
+ def recv_GetInfo()
57
+ result = receive_message(GetInfo_result)
58
+ return result.success unless result.success.nil?
59
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetInfo failed: unknown result')
60
+ end
61
+
62
+ def ExecuteStatement(req)
63
+ send_ExecuteStatement(req)
64
+ return recv_ExecuteStatement()
65
+ end
66
+
67
+ def send_ExecuteStatement(req)
68
+ send_message('ExecuteStatement', ExecuteStatement_args, :req => req)
69
+ end
70
+
71
+ def recv_ExecuteStatement()
72
+ result = receive_message(ExecuteStatement_result)
73
+ return result.success unless result.success.nil?
74
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ExecuteStatement failed: unknown result')
75
+ end
76
+
77
+ def GetTypeInfo(req)
78
+ send_GetTypeInfo(req)
79
+ return recv_GetTypeInfo()
80
+ end
81
+
82
+ def send_GetTypeInfo(req)
83
+ send_message('GetTypeInfo', GetTypeInfo_args, :req => req)
84
+ end
85
+
86
+ def recv_GetTypeInfo()
87
+ result = receive_message(GetTypeInfo_result)
88
+ return result.success unless result.success.nil?
89
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetTypeInfo failed: unknown result')
90
+ end
91
+
92
+ def GetCatalogs(req)
93
+ send_GetCatalogs(req)
94
+ return recv_GetCatalogs()
95
+ end
96
+
97
+ def send_GetCatalogs(req)
98
+ send_message('GetCatalogs', GetCatalogs_args, :req => req)
99
+ end
100
+
101
+ def recv_GetCatalogs()
102
+ result = receive_message(GetCatalogs_result)
103
+ return result.success unless result.success.nil?
104
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetCatalogs failed: unknown result')
105
+ end
106
+
107
+ def GetSchemas(req)
108
+ send_GetSchemas(req)
109
+ return recv_GetSchemas()
110
+ end
111
+
112
+ def send_GetSchemas(req)
113
+ send_message('GetSchemas', GetSchemas_args, :req => req)
114
+ end
115
+
116
+ def recv_GetSchemas()
117
+ result = receive_message(GetSchemas_result)
118
+ return result.success unless result.success.nil?
119
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetSchemas failed: unknown result')
120
+ end
121
+
122
+ def GetTables(req)
123
+ send_GetTables(req)
124
+ return recv_GetTables()
125
+ end
126
+
127
+ def send_GetTables(req)
128
+ send_message('GetTables', GetTables_args, :req => req)
129
+ end
130
+
131
+ def recv_GetTables()
132
+ result = receive_message(GetTables_result)
133
+ return result.success unless result.success.nil?
134
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetTables failed: unknown result')
135
+ end
136
+
137
+ def GetTableTypes(req)
138
+ send_GetTableTypes(req)
139
+ return recv_GetTableTypes()
140
+ end
141
+
142
+ def send_GetTableTypes(req)
143
+ send_message('GetTableTypes', GetTableTypes_args, :req => req)
144
+ end
145
+
146
+ def recv_GetTableTypes()
147
+ result = receive_message(GetTableTypes_result)
148
+ return result.success unless result.success.nil?
149
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetTableTypes failed: unknown result')
150
+ end
151
+
152
+ def GetColumns(req)
153
+ send_GetColumns(req)
154
+ return recv_GetColumns()
155
+ end
156
+
157
+ def send_GetColumns(req)
158
+ send_message('GetColumns', GetColumns_args, :req => req)
159
+ end
160
+
161
+ def recv_GetColumns()
162
+ result = receive_message(GetColumns_result)
163
+ return result.success unless result.success.nil?
164
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetColumns failed: unknown result')
165
+ end
166
+
167
+ def GetFunctions(req)
168
+ send_GetFunctions(req)
169
+ return recv_GetFunctions()
170
+ end
171
+
172
+ def send_GetFunctions(req)
173
+ send_message('GetFunctions', GetFunctions_args, :req => req)
174
+ end
175
+
176
+ def recv_GetFunctions()
177
+ result = receive_message(GetFunctions_result)
178
+ return result.success unless result.success.nil?
179
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetFunctions failed: unknown result')
180
+ end
181
+
182
+ def GetOperationStatus(req)
183
+ send_GetOperationStatus(req)
184
+ return recv_GetOperationStatus()
185
+ end
186
+
187
+ def send_GetOperationStatus(req)
188
+ send_message('GetOperationStatus', GetOperationStatus_args, :req => req)
189
+ end
190
+
191
+ def recv_GetOperationStatus()
192
+ result = receive_message(GetOperationStatus_result)
193
+ return result.success unless result.success.nil?
194
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetOperationStatus failed: unknown result')
195
+ end
196
+
197
+ def CancelOperation(req)
198
+ send_CancelOperation(req)
199
+ return recv_CancelOperation()
200
+ end
201
+
202
+ def send_CancelOperation(req)
203
+ send_message('CancelOperation', CancelOperation_args, :req => req)
204
+ end
205
+
206
+ def recv_CancelOperation()
207
+ result = receive_message(CancelOperation_result)
208
+ return result.success unless result.success.nil?
209
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'CancelOperation failed: unknown result')
210
+ end
211
+
212
+ def CloseOperation(req)
213
+ send_CloseOperation(req)
214
+ return recv_CloseOperation()
215
+ end
216
+
217
+ def send_CloseOperation(req)
218
+ send_message('CloseOperation', CloseOperation_args, :req => req)
219
+ end
220
+
221
+ def recv_CloseOperation()
222
+ result = receive_message(CloseOperation_result)
223
+ return result.success unless result.success.nil?
224
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'CloseOperation failed: unknown result')
225
+ end
226
+
227
+ def GetResultSetMetadata(req)
228
+ send_GetResultSetMetadata(req)
229
+ return recv_GetResultSetMetadata()
230
+ end
231
+
232
+ def send_GetResultSetMetadata(req)
233
+ send_message('GetResultSetMetadata', GetResultSetMetadata_args, :req => req)
234
+ end
235
+
236
+ def recv_GetResultSetMetadata()
237
+ result = receive_message(GetResultSetMetadata_result)
238
+ return result.success unless result.success.nil?
239
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetResultSetMetadata failed: unknown result')
240
+ end
241
+
242
+ def FetchResults(req)
243
+ send_FetchResults(req)
244
+ return recv_FetchResults()
245
+ end
246
+
247
+ def send_FetchResults(req)
248
+ send_message('FetchResults', FetchResults_args, :req => req)
249
+ end
250
+
251
+ def recv_FetchResults()
252
+ result = receive_message(FetchResults_result)
253
+ return result.success unless result.success.nil?
254
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'FetchResults failed: unknown result')
255
+ end
256
+
257
+ def GetLog(req)
258
+ send_GetLog(req)
259
+ return recv_GetLog()
260
+ end
261
+
262
+ def send_GetLog(req)
263
+ send_message('GetLog', GetLog_args, :req => req)
264
+ end
265
+
266
+ def recv_GetLog()
267
+ result = receive_message(GetLog_result)
268
+ return result.success unless result.success.nil?
269
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetLog failed: unknown result')
270
+ end
271
+
272
+ end
273
+
274
+ class Processor
275
+ include ::Thrift::Processor
276
+
277
+ def process_OpenSession(seqid, iprot, oprot)
278
+ args = read_args(iprot, OpenSession_args)
279
+ result = OpenSession_result.new()
280
+ result.success = @handler.OpenSession(args.req)
281
+ write_result(result, oprot, 'OpenSession', seqid)
282
+ end
283
+
284
+ def process_CloseSession(seqid, iprot, oprot)
285
+ args = read_args(iprot, CloseSession_args)
286
+ result = CloseSession_result.new()
287
+ result.success = @handler.CloseSession(args.req)
288
+ write_result(result, oprot, 'CloseSession', seqid)
289
+ end
290
+
291
+ def process_GetInfo(seqid, iprot, oprot)
292
+ args = read_args(iprot, GetInfo_args)
293
+ result = GetInfo_result.new()
294
+ result.success = @handler.GetInfo(args.req)
295
+ write_result(result, oprot, 'GetInfo', seqid)
296
+ end
297
+
298
+ def process_ExecuteStatement(seqid, iprot, oprot)
299
+ args = read_args(iprot, ExecuteStatement_args)
300
+ result = ExecuteStatement_result.new()
301
+ result.success = @handler.ExecuteStatement(args.req)
302
+ write_result(result, oprot, 'ExecuteStatement', seqid)
303
+ end
304
+
305
+ def process_GetTypeInfo(seqid, iprot, oprot)
306
+ args = read_args(iprot, GetTypeInfo_args)
307
+ result = GetTypeInfo_result.new()
308
+ result.success = @handler.GetTypeInfo(args.req)
309
+ write_result(result, oprot, 'GetTypeInfo', seqid)
310
+ end
311
+
312
+ def process_GetCatalogs(seqid, iprot, oprot)
313
+ args = read_args(iprot, GetCatalogs_args)
314
+ result = GetCatalogs_result.new()
315
+ result.success = @handler.GetCatalogs(args.req)
316
+ write_result(result, oprot, 'GetCatalogs', seqid)
317
+ end
318
+
319
+ def process_GetSchemas(seqid, iprot, oprot)
320
+ args = read_args(iprot, GetSchemas_args)
321
+ result = GetSchemas_result.new()
322
+ result.success = @handler.GetSchemas(args.req)
323
+ write_result(result, oprot, 'GetSchemas', seqid)
324
+ end
325
+
326
+ def process_GetTables(seqid, iprot, oprot)
327
+ args = read_args(iprot, GetTables_args)
328
+ result = GetTables_result.new()
329
+ result.success = @handler.GetTables(args.req)
330
+ write_result(result, oprot, 'GetTables', seqid)
331
+ end
332
+
333
+ def process_GetTableTypes(seqid, iprot, oprot)
334
+ args = read_args(iprot, GetTableTypes_args)
335
+ result = GetTableTypes_result.new()
336
+ result.success = @handler.GetTableTypes(args.req)
337
+ write_result(result, oprot, 'GetTableTypes', seqid)
338
+ end
339
+
340
+ def process_GetColumns(seqid, iprot, oprot)
341
+ args = read_args(iprot, GetColumns_args)
342
+ result = GetColumns_result.new()
343
+ result.success = @handler.GetColumns(args.req)
344
+ write_result(result, oprot, 'GetColumns', seqid)
345
+ end
346
+
347
+ def process_GetFunctions(seqid, iprot, oprot)
348
+ args = read_args(iprot, GetFunctions_args)
349
+ result = GetFunctions_result.new()
350
+ result.success = @handler.GetFunctions(args.req)
351
+ write_result(result, oprot, 'GetFunctions', seqid)
352
+ end
353
+
354
+ def process_GetOperationStatus(seqid, iprot, oprot)
355
+ args = read_args(iprot, GetOperationStatus_args)
356
+ result = GetOperationStatus_result.new()
357
+ result.success = @handler.GetOperationStatus(args.req)
358
+ write_result(result, oprot, 'GetOperationStatus', seqid)
359
+ end
360
+
361
+ def process_CancelOperation(seqid, iprot, oprot)
362
+ args = read_args(iprot, CancelOperation_args)
363
+ result = CancelOperation_result.new()
364
+ result.success = @handler.CancelOperation(args.req)
365
+ write_result(result, oprot, 'CancelOperation', seqid)
366
+ end
367
+
368
+ def process_CloseOperation(seqid, iprot, oprot)
369
+ args = read_args(iprot, CloseOperation_args)
370
+ result = CloseOperation_result.new()
371
+ result.success = @handler.CloseOperation(args.req)
372
+ write_result(result, oprot, 'CloseOperation', seqid)
373
+ end
374
+
375
+ def process_GetResultSetMetadata(seqid, iprot, oprot)
376
+ args = read_args(iprot, GetResultSetMetadata_args)
377
+ result = GetResultSetMetadata_result.new()
378
+ result.success = @handler.GetResultSetMetadata(args.req)
379
+ write_result(result, oprot, 'GetResultSetMetadata', seqid)
380
+ end
381
+
382
+ def process_FetchResults(seqid, iprot, oprot)
383
+ args = read_args(iprot, FetchResults_args)
384
+ result = FetchResults_result.new()
385
+ result.success = @handler.FetchResults(args.req)
386
+ write_result(result, oprot, 'FetchResults', seqid)
387
+ end
388
+
389
+ def process_GetLog(seqid, iprot, oprot)
390
+ args = read_args(iprot, GetLog_args)
391
+ result = GetLog_result.new()
392
+ result.success = @handler.GetLog(args.req)
393
+ write_result(result, oprot, 'GetLog', seqid)
394
+ end
395
+
396
+ end
397
+
398
+ # HELPER FUNCTIONS AND STRUCTURES
399
+
400
+ class OpenSession_args
401
+ include ::Thrift::Struct, ::Thrift::Struct_Union
402
+ REQ = 1
403
+
404
+ FIELDS = {
405
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TOpenSessionReq}
406
+ }
407
+
408
+ def struct_fields; FIELDS; end
409
+
410
+ def validate
411
+ end
412
+
413
+ ::Thrift::Struct.generate_accessors self
414
+ end
415
+
416
+ class OpenSession_result
417
+ include ::Thrift::Struct, ::Thrift::Struct_Union
418
+ SUCCESS = 0
419
+
420
+ FIELDS = {
421
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TOpenSessionResp}
422
+ }
423
+
424
+ def struct_fields; FIELDS; end
425
+
426
+ def validate
427
+ end
428
+
429
+ ::Thrift::Struct.generate_accessors self
430
+ end
431
+
432
+ class CloseSession_args
433
+ include ::Thrift::Struct, ::Thrift::Struct_Union
434
+ REQ = 1
435
+
436
+ FIELDS = {
437
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TCloseSessionReq}
438
+ }
439
+
440
+ def struct_fields; FIELDS; end
441
+
442
+ def validate
443
+ end
444
+
445
+ ::Thrift::Struct.generate_accessors self
446
+ end
447
+
448
+ class CloseSession_result
449
+ include ::Thrift::Struct, ::Thrift::Struct_Union
450
+ SUCCESS = 0
451
+
452
+ FIELDS = {
453
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TCloseSessionResp}
454
+ }
455
+
456
+ def struct_fields; FIELDS; end
457
+
458
+ def validate
459
+ end
460
+
461
+ ::Thrift::Struct.generate_accessors self
462
+ end
463
+
464
+ class GetInfo_args
465
+ include ::Thrift::Struct, ::Thrift::Struct_Union
466
+ REQ = 1
467
+
468
+ FIELDS = {
469
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetInfoReq}
470
+ }
471
+
472
+ def struct_fields; FIELDS; end
473
+
474
+ def validate
475
+ end
476
+
477
+ ::Thrift::Struct.generate_accessors self
478
+ end
479
+
480
+ class GetInfo_result
481
+ include ::Thrift::Struct, ::Thrift::Struct_Union
482
+ SUCCESS = 0
483
+
484
+ FIELDS = {
485
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetInfoResp}
486
+ }
487
+
488
+ def struct_fields; FIELDS; end
489
+
490
+ def validate
491
+ end
492
+
493
+ ::Thrift::Struct.generate_accessors self
494
+ end
495
+
496
+ class ExecuteStatement_args
497
+ include ::Thrift::Struct, ::Thrift::Struct_Union
498
+ REQ = 1
499
+
500
+ FIELDS = {
501
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TExecuteStatementReq}
502
+ }
503
+
504
+ def struct_fields; FIELDS; end
505
+
506
+ def validate
507
+ end
508
+
509
+ ::Thrift::Struct.generate_accessors self
510
+ end
511
+
512
+ class ExecuteStatement_result
513
+ include ::Thrift::Struct, ::Thrift::Struct_Union
514
+ SUCCESS = 0
515
+
516
+ FIELDS = {
517
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TExecuteStatementResp}
518
+ }
519
+
520
+ def struct_fields; FIELDS; end
521
+
522
+ def validate
523
+ end
524
+
525
+ ::Thrift::Struct.generate_accessors self
526
+ end
527
+
528
+ class GetTypeInfo_args
529
+ include ::Thrift::Struct, ::Thrift::Struct_Union
530
+ REQ = 1
531
+
532
+ FIELDS = {
533
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetTypeInfoReq}
534
+ }
535
+
536
+ def struct_fields; FIELDS; end
537
+
538
+ def validate
539
+ end
540
+
541
+ ::Thrift::Struct.generate_accessors self
542
+ end
543
+
544
+ class GetTypeInfo_result
545
+ include ::Thrift::Struct, ::Thrift::Struct_Union
546
+ SUCCESS = 0
547
+
548
+ FIELDS = {
549
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetTypeInfoResp}
550
+ }
551
+
552
+ def struct_fields; FIELDS; end
553
+
554
+ def validate
555
+ end
556
+
557
+ ::Thrift::Struct.generate_accessors self
558
+ end
559
+
560
+ class GetCatalogs_args
561
+ include ::Thrift::Struct, ::Thrift::Struct_Union
562
+ REQ = 1
563
+
564
+ FIELDS = {
565
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetCatalogsReq}
566
+ }
567
+
568
+ def struct_fields; FIELDS; end
569
+
570
+ def validate
571
+ end
572
+
573
+ ::Thrift::Struct.generate_accessors self
574
+ end
575
+
576
+ class GetCatalogs_result
577
+ include ::Thrift::Struct, ::Thrift::Struct_Union
578
+ SUCCESS = 0
579
+
580
+ FIELDS = {
581
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetCatalogsResp}
582
+ }
583
+
584
+ def struct_fields; FIELDS; end
585
+
586
+ def validate
587
+ end
588
+
589
+ ::Thrift::Struct.generate_accessors self
590
+ end
591
+
592
+ class GetSchemas_args
593
+ include ::Thrift::Struct, ::Thrift::Struct_Union
594
+ REQ = 1
595
+
596
+ FIELDS = {
597
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetSchemasReq}
598
+ }
599
+
600
+ def struct_fields; FIELDS; end
601
+
602
+ def validate
603
+ end
604
+
605
+ ::Thrift::Struct.generate_accessors self
606
+ end
607
+
608
+ class GetSchemas_result
609
+ include ::Thrift::Struct, ::Thrift::Struct_Union
610
+ SUCCESS = 0
611
+
612
+ FIELDS = {
613
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetSchemasResp}
614
+ }
615
+
616
+ def struct_fields; FIELDS; end
617
+
618
+ def validate
619
+ end
620
+
621
+ ::Thrift::Struct.generate_accessors self
622
+ end
623
+
624
+ class GetTables_args
625
+ include ::Thrift::Struct, ::Thrift::Struct_Union
626
+ REQ = 1
627
+
628
+ FIELDS = {
629
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetTablesReq}
630
+ }
631
+
632
+ def struct_fields; FIELDS; end
633
+
634
+ def validate
635
+ end
636
+
637
+ ::Thrift::Struct.generate_accessors self
638
+ end
639
+
640
+ class GetTables_result
641
+ include ::Thrift::Struct, ::Thrift::Struct_Union
642
+ SUCCESS = 0
643
+
644
+ FIELDS = {
645
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetTablesResp}
646
+ }
647
+
648
+ def struct_fields; FIELDS; end
649
+
650
+ def validate
651
+ end
652
+
653
+ ::Thrift::Struct.generate_accessors self
654
+ end
655
+
656
+ class GetTableTypes_args
657
+ include ::Thrift::Struct, ::Thrift::Struct_Union
658
+ REQ = 1
659
+
660
+ FIELDS = {
661
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetTableTypesReq}
662
+ }
663
+
664
+ def struct_fields; FIELDS; end
665
+
666
+ def validate
667
+ end
668
+
669
+ ::Thrift::Struct.generate_accessors self
670
+ end
671
+
672
+ class GetTableTypes_result
673
+ include ::Thrift::Struct, ::Thrift::Struct_Union
674
+ SUCCESS = 0
675
+
676
+ FIELDS = {
677
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetTableTypesResp}
678
+ }
679
+
680
+ def struct_fields; FIELDS; end
681
+
682
+ def validate
683
+ end
684
+
685
+ ::Thrift::Struct.generate_accessors self
686
+ end
687
+
688
+ class GetColumns_args
689
+ include ::Thrift::Struct, ::Thrift::Struct_Union
690
+ REQ = 1
691
+
692
+ FIELDS = {
693
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetColumnsReq}
694
+ }
695
+
696
+ def struct_fields; FIELDS; end
697
+
698
+ def validate
699
+ end
700
+
701
+ ::Thrift::Struct.generate_accessors self
702
+ end
703
+
704
+ class GetColumns_result
705
+ include ::Thrift::Struct, ::Thrift::Struct_Union
706
+ SUCCESS = 0
707
+
708
+ FIELDS = {
709
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetColumnsResp}
710
+ }
711
+
712
+ def struct_fields; FIELDS; end
713
+
714
+ def validate
715
+ end
716
+
717
+ ::Thrift::Struct.generate_accessors self
718
+ end
719
+
720
+ class GetFunctions_args
721
+ include ::Thrift::Struct, ::Thrift::Struct_Union
722
+ REQ = 1
723
+
724
+ FIELDS = {
725
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetFunctionsReq}
726
+ }
727
+
728
+ def struct_fields; FIELDS; end
729
+
730
+ def validate
731
+ end
732
+
733
+ ::Thrift::Struct.generate_accessors self
734
+ end
735
+
736
+ class GetFunctions_result
737
+ include ::Thrift::Struct, ::Thrift::Struct_Union
738
+ SUCCESS = 0
739
+
740
+ FIELDS = {
741
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetFunctionsResp}
742
+ }
743
+
744
+ def struct_fields; FIELDS; end
745
+
746
+ def validate
747
+ end
748
+
749
+ ::Thrift::Struct.generate_accessors self
750
+ end
751
+
752
+ class GetOperationStatus_args
753
+ include ::Thrift::Struct, ::Thrift::Struct_Union
754
+ REQ = 1
755
+
756
+ FIELDS = {
757
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetOperationStatusReq}
758
+ }
759
+
760
+ def struct_fields; FIELDS; end
761
+
762
+ def validate
763
+ end
764
+
765
+ ::Thrift::Struct.generate_accessors self
766
+ end
767
+
768
+ class GetOperationStatus_result
769
+ include ::Thrift::Struct, ::Thrift::Struct_Union
770
+ SUCCESS = 0
771
+
772
+ FIELDS = {
773
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetOperationStatusResp}
774
+ }
775
+
776
+ def struct_fields; FIELDS; end
777
+
778
+ def validate
779
+ end
780
+
781
+ ::Thrift::Struct.generate_accessors self
782
+ end
783
+
784
+ class CancelOperation_args
785
+ include ::Thrift::Struct, ::Thrift::Struct_Union
786
+ REQ = 1
787
+
788
+ FIELDS = {
789
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TCancelOperationReq}
790
+ }
791
+
792
+ def struct_fields; FIELDS; end
793
+
794
+ def validate
795
+ end
796
+
797
+ ::Thrift::Struct.generate_accessors self
798
+ end
799
+
800
+ class CancelOperation_result
801
+ include ::Thrift::Struct, ::Thrift::Struct_Union
802
+ SUCCESS = 0
803
+
804
+ FIELDS = {
805
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TCancelOperationResp}
806
+ }
807
+
808
+ def struct_fields; FIELDS; end
809
+
810
+ def validate
811
+ end
812
+
813
+ ::Thrift::Struct.generate_accessors self
814
+ end
815
+
816
+ class CloseOperation_args
817
+ include ::Thrift::Struct, ::Thrift::Struct_Union
818
+ REQ = 1
819
+
820
+ FIELDS = {
821
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TCloseOperationReq}
822
+ }
823
+
824
+ def struct_fields; FIELDS; end
825
+
826
+ def validate
827
+ end
828
+
829
+ ::Thrift::Struct.generate_accessors self
830
+ end
831
+
832
+ class CloseOperation_result
833
+ include ::Thrift::Struct, ::Thrift::Struct_Union
834
+ SUCCESS = 0
835
+
836
+ FIELDS = {
837
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TCloseOperationResp}
838
+ }
839
+
840
+ def struct_fields; FIELDS; end
841
+
842
+ def validate
843
+ end
844
+
845
+ ::Thrift::Struct.generate_accessors self
846
+ end
847
+
848
+ class GetResultSetMetadata_args
849
+ include ::Thrift::Struct, ::Thrift::Struct_Union
850
+ REQ = 1
851
+
852
+ FIELDS = {
853
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetResultSetMetadataReq}
854
+ }
855
+
856
+ def struct_fields; FIELDS; end
857
+
858
+ def validate
859
+ end
860
+
861
+ ::Thrift::Struct.generate_accessors self
862
+ end
863
+
864
+ class GetResultSetMetadata_result
865
+ include ::Thrift::Struct, ::Thrift::Struct_Union
866
+ SUCCESS = 0
867
+
868
+ FIELDS = {
869
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetResultSetMetadataResp}
870
+ }
871
+
872
+ def struct_fields; FIELDS; end
873
+
874
+ def validate
875
+ end
876
+
877
+ ::Thrift::Struct.generate_accessors self
878
+ end
879
+
880
+ class FetchResults_args
881
+ include ::Thrift::Struct, ::Thrift::Struct_Union
882
+ REQ = 1
883
+
884
+ FIELDS = {
885
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TFetchResultsReq}
886
+ }
887
+
888
+ def struct_fields; FIELDS; end
889
+
890
+ def validate
891
+ end
892
+
893
+ ::Thrift::Struct.generate_accessors self
894
+ end
895
+
896
+ class FetchResults_result
897
+ include ::Thrift::Struct, ::Thrift::Struct_Union
898
+ SUCCESS = 0
899
+
900
+ FIELDS = {
901
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TFetchResultsResp}
902
+ }
903
+
904
+ def struct_fields; FIELDS; end
905
+
906
+ def validate
907
+ end
908
+
909
+ ::Thrift::Struct.generate_accessors self
910
+ end
911
+
912
+ class GetLog_args
913
+ include ::Thrift::Struct, ::Thrift::Struct_Union
914
+ REQ = 1
915
+
916
+ FIELDS = {
917
+ REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::Impala::Protocol::Hive::TGetLogReq}
918
+ }
919
+
920
+ def struct_fields; FIELDS; end
921
+
922
+ def validate
923
+ end
924
+
925
+ ::Thrift::Struct.generate_accessors self
926
+ end
927
+
928
+ class GetLog_result
929
+ include ::Thrift::Struct, ::Thrift::Struct_Union
930
+ SUCCESS = 0
931
+
932
+ FIELDS = {
933
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Hive::TGetLogResp}
934
+ }
935
+
936
+ def struct_fields; FIELDS; end
937
+
938
+ def validate
939
+ end
940
+
941
+ ::Thrift::Struct.generate_accessors self
942
+ end
943
+
944
+ end
945
+
946
+ end
947
+ end
948
+ end