impala 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +2 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +28 -0
  5. data/Rakefile +15 -0
  6. data/impala.gemspec +25 -0
  7. data/lib/impala.rb +33 -0
  8. data/lib/impala/connection.rb +93 -0
  9. data/lib/impala/cursor.rb +86 -0
  10. data/lib/impala/protocol.rb +6 -0
  11. data/lib/impala/protocol/beeswax_constants.rb +14 -0
  12. data/lib/impala/protocol/beeswax_service.rb +747 -0
  13. data/lib/impala/protocol/beeswax_types.rb +192 -0
  14. data/lib/impala/protocol/data_constants.rb +12 -0
  15. data/lib/impala/protocol/data_sinks_constants.rb +12 -0
  16. data/lib/impala/protocol/data_sinks_types.rb +107 -0
  17. data/lib/impala/protocol/data_types.rb +77 -0
  18. data/lib/impala/protocol/descriptors_constants.rb +12 -0
  19. data/lib/impala/protocol/descriptors_types.rb +266 -0
  20. data/lib/impala/protocol/exprs_constants.rb +12 -0
  21. data/lib/impala/protocol/exprs_types.rb +345 -0
  22. data/lib/impala/protocol/facebook_service.rb +706 -0
  23. data/lib/impala/protocol/fb303_constants.rb +14 -0
  24. data/lib/impala/protocol/fb303_types.rb +24 -0
  25. data/lib/impala/protocol/frontend_constants.rb +12 -0
  26. data/lib/impala/protocol/frontend_types.rb +347 -0
  27. data/lib/impala/protocol/hive_metastore_constants.rb +52 -0
  28. data/lib/impala/protocol/hive_metastore_types.rb +697 -0
  29. data/lib/impala/protocol/impala_internal_service.rb +244 -0
  30. data/lib/impala/protocol/impala_internal_service_constants.rb +12 -0
  31. data/lib/impala/protocol/impala_internal_service_types.rb +362 -0
  32. data/lib/impala/protocol/impala_plan_service.rb +310 -0
  33. data/lib/impala/protocol/impala_plan_service_constants.rb +12 -0
  34. data/lib/impala/protocol/impala_plan_service_types.rb +36 -0
  35. data/lib/impala/protocol/impala_service.rb +260 -0
  36. data/lib/impala/protocol/impala_service_constants.rb +12 -0
  37. data/lib/impala/protocol/impala_service_types.rb +46 -0
  38. data/lib/impala/protocol/java_constants_constants.rb +42 -0
  39. data/lib/impala/protocol/java_constants_types.rb +14 -0
  40. data/lib/impala/protocol/opcodes_constants.rb +12 -0
  41. data/lib/impala/protocol/opcodes_types.rb +309 -0
  42. data/lib/impala/protocol/partitions_constants.rb +12 -0
  43. data/lib/impala/protocol/partitions_types.rb +44 -0
  44. data/lib/impala/protocol/plan_nodes_constants.rb +12 -0
  45. data/lib/impala/protocol/plan_nodes_types.rb +345 -0
  46. data/lib/impala/protocol/planner_constants.rb +12 -0
  47. data/lib/impala/protocol/planner_types.rb +78 -0
  48. data/lib/impala/protocol/runtime_profile_constants.rb +12 -0
  49. data/lib/impala/protocol/runtime_profile_types.rb +97 -0
  50. data/lib/impala/protocol/state_store_service.rb +244 -0
  51. data/lib/impala/protocol/state_store_service_constants.rb +12 -0
  52. data/lib/impala/protocol/state_store_service_types.rb +185 -0
  53. data/lib/impala/protocol/state_store_subscriber_service.rb +82 -0
  54. data/lib/impala/protocol/state_store_subscriber_service_constants.rb +12 -0
  55. data/lib/impala/protocol/state_store_subscriber_service_types.rb +67 -0
  56. data/lib/impala/protocol/statestore_types_constants.rb +12 -0
  57. data/lib/impala/protocol/statestore_types_types.rb +77 -0
  58. data/lib/impala/protocol/status_constants.rb +12 -0
  59. data/lib/impala/protocol/status_types.rb +44 -0
  60. data/lib/impala/protocol/thrift_hive_metastore.rb +4707 -0
  61. data/lib/impala/protocol/types_constants.rb +12 -0
  62. data/lib/impala/protocol/types_types.rb +86 -0
  63. data/lib/impala/version.rb +3 -0
  64. data/thrift/Data.thrift +52 -0
  65. data/thrift/DataSinks.thrift +61 -0
  66. data/thrift/Descriptors.thrift +115 -0
  67. data/thrift/Exprs.thrift +134 -0
  68. data/thrift/Frontend.thrift +193 -0
  69. data/thrift/ImpalaInternalService.thrift +265 -0
  70. data/thrift/ImpalaPlanService.thrift +44 -0
  71. data/thrift/ImpalaService.thrift +105 -0
  72. data/thrift/JavaConstants.thrift +60 -0
  73. data/thrift/Opcodes.thrift +317 -0
  74. data/thrift/Partitions.thrift +41 -0
  75. data/thrift/PlanNodes.thrift +184 -0
  76. data/thrift/Planner.thrift +72 -0
  77. data/thrift/RuntimeProfile.thrift +58 -0
  78. data/thrift/StateStoreService.thrift +121 -0
  79. data/thrift/StateStoreSubscriberService.thrift +64 -0
  80. data/thrift/StatestoreTypes.thrift +50 -0
  81. data/thrift/Status.thrift +31 -0
  82. data/thrift/Types.thrift +71 -0
  83. data/thrift/beeswax.thrift +175 -0
  84. data/thrift/fb303.thrift +112 -0
  85. data/thrift/hive_metastore.thrift +528 -0
  86. metadata +206 -0
@@ -0,0 +1,12 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'exprs_types'
8
+
9
+ module Impala
10
+ module Protocol
11
+ end
12
+ end
@@ -0,0 +1,345 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'types_types'
8
+ require 'opcodes_types'
9
+
10
+
11
+ module Impala
12
+ module Protocol
13
+ module TExprNodeType
14
+ AGG_EXPR = 0
15
+ ARITHMETIC_EXPR = 1
16
+ BINARY_PRED = 2
17
+ BOOL_LITERAL = 3
18
+ CASE_EXPR = 4
19
+ CAST_EXPR = 5
20
+ COMPOUND_PRED = 6
21
+ DATE_LITERAL = 7
22
+ FLOAT_LITERAL = 8
23
+ FUNCTION_CALL = 9
24
+ INT_LITERAL = 10
25
+ IN_PRED = 11
26
+ IS_NULL_PRED = 12
27
+ LIKE_PRED = 13
28
+ LITERAL_PRED = 14
29
+ NULL_LITERAL = 15
30
+ SLOT_REF = 16
31
+ STRING_LITERAL = 17
32
+ VALUE_MAP = { 0 => "AGG_EXPR", 1 => "ARITHMETIC_EXPR", 2 => "BINARY_PRED", 3 => "BOOL_LITERAL", 4 => "CASE_EXPR", 5 => "CAST_EXPR", 6 => "COMPOUND_PRED", 7 => "DATE_LITERAL", 8 => "FLOAT_LITERAL", 9 => "FUNCTION_CALL", 10 => "INT_LITERAL", 11 => "IN_PRED", 12 => "IS_NULL_PRED", 13 => "LIKE_PRED", 14 => "LITERAL_PRED", 15 => "NULL_LITERAL", 16 => "SLOT_REF", 17 => "STRING_LITERAL" }
33
+ VALID_VALUES = Set.new([AGG_EXPR, ARITHMETIC_EXPR, BINARY_PRED, BOOL_LITERAL, CASE_EXPR, CAST_EXPR, COMPOUND_PRED, DATE_LITERAL, FLOAT_LITERAL, FUNCTION_CALL, INT_LITERAL, IN_PRED, IS_NULL_PRED, LIKE_PRED, LITERAL_PRED, NULL_LITERAL, SLOT_REF, STRING_LITERAL]).freeze
34
+ end
35
+
36
+ module TAggregationOp
37
+ INVALID = 0
38
+ COUNT = 1
39
+ MAX = 2
40
+ DISTINCT_PC = 3
41
+ MERGE_PC = 4
42
+ DISTINCT_PCSA = 5
43
+ MERGE_PCSA = 6
44
+ MIN = 7
45
+ SUM = 8
46
+ VALUE_MAP = { 0 => "INVALID", 1 => "COUNT", 2 => "MAX", 3 => "DISTINCT_PC", 4 => "MERGE_PC", 5 => "DISTINCT_PCSA", 6 => "MERGE_PCSA", 7 => "MIN", 8 => "SUM" }
47
+ VALID_VALUES = Set.new([INVALID, COUNT, MAX, DISTINCT_PC, MERGE_PC, DISTINCT_PCSA, MERGE_PCSA, MIN, SUM]).freeze
48
+ end
49
+
50
+ class TAggregateExpr
51
+ include ::Thrift::Struct, ::Thrift::Struct_Union
52
+ IS_STAR = 1
53
+ IS_DISTINCT = 2
54
+ OP = 3
55
+
56
+ FIELDS = {
57
+ IS_STAR => { :type => ::Thrift::Types::BOOL, :name => 'is_star' },
58
+ IS_DISTINCT => { :type => ::Thrift::Types::BOOL, :name => 'is_distinct' },
59
+ OP => { :type => ::Thrift::Types::I32, :name => 'op', :enum_class => Impala::Protocol::TAggregationOp }
60
+ }
61
+
62
+ def struct_fields; FIELDS; end
63
+
64
+ def validate
65
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_star is unset!') if @is_star.nil?
66
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_distinct is unset!') if @is_distinct.nil?
67
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field op is unset!') unless @op
68
+ unless @op.nil? || Impala::Protocol::TAggregationOp::VALID_VALUES.include?(@op)
69
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
70
+ end
71
+ end
72
+
73
+ ::Thrift::Struct.generate_accessors self
74
+ end
75
+
76
+ class TBoolLiteral
77
+ include ::Thrift::Struct, ::Thrift::Struct_Union
78
+ VALUE = 1
79
+
80
+ FIELDS = {
81
+ VALUE => { :type => ::Thrift::Types::BOOL, :name => 'value' }
82
+ }
83
+
84
+ def struct_fields; FIELDS; end
85
+
86
+ def validate
87
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') if @value.nil?
88
+ end
89
+
90
+ ::Thrift::Struct.generate_accessors self
91
+ end
92
+
93
+ class TCaseExpr
94
+ include ::Thrift::Struct, ::Thrift::Struct_Union
95
+ HAS_CASE_EXPR = 1
96
+ HAS_ELSE_EXPR = 2
97
+
98
+ FIELDS = {
99
+ HAS_CASE_EXPR => { :type => ::Thrift::Types::BOOL, :name => 'has_case_expr' },
100
+ HAS_ELSE_EXPR => { :type => ::Thrift::Types::BOOL, :name => 'has_else_expr' }
101
+ }
102
+
103
+ def struct_fields; FIELDS; end
104
+
105
+ def validate
106
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field has_case_expr is unset!') if @has_case_expr.nil?
107
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field has_else_expr is unset!') if @has_else_expr.nil?
108
+ end
109
+
110
+ ::Thrift::Struct.generate_accessors self
111
+ end
112
+
113
+ class TDateLiteral
114
+ include ::Thrift::Struct, ::Thrift::Struct_Union
115
+ VALUE = 1
116
+
117
+ FIELDS = {
118
+ VALUE => { :type => ::Thrift::Types::I64, :name => 'value' }
119
+ }
120
+
121
+ def struct_fields; FIELDS; end
122
+
123
+ def validate
124
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
125
+ end
126
+
127
+ ::Thrift::Struct.generate_accessors self
128
+ end
129
+
130
+ class TFloatLiteral
131
+ include ::Thrift::Struct, ::Thrift::Struct_Union
132
+ VALUE = 1
133
+
134
+ FIELDS = {
135
+ VALUE => { :type => ::Thrift::Types::DOUBLE, :name => 'value' }
136
+ }
137
+
138
+ def struct_fields; FIELDS; end
139
+
140
+ def validate
141
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
142
+ end
143
+
144
+ ::Thrift::Struct.generate_accessors self
145
+ end
146
+
147
+ class TIntLiteral
148
+ include ::Thrift::Struct, ::Thrift::Struct_Union
149
+ VALUE = 1
150
+
151
+ FIELDS = {
152
+ VALUE => { :type => ::Thrift::Types::I64, :name => 'value' }
153
+ }
154
+
155
+ def struct_fields; FIELDS; end
156
+
157
+ def validate
158
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
159
+ end
160
+
161
+ ::Thrift::Struct.generate_accessors self
162
+ end
163
+
164
+ class TInPredicate
165
+ include ::Thrift::Struct, ::Thrift::Struct_Union
166
+ IS_NOT_IN = 1
167
+
168
+ FIELDS = {
169
+ IS_NOT_IN => { :type => ::Thrift::Types::BOOL, :name => 'is_not_in' }
170
+ }
171
+
172
+ def struct_fields; FIELDS; end
173
+
174
+ def validate
175
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_not_in is unset!') if @is_not_in.nil?
176
+ end
177
+
178
+ ::Thrift::Struct.generate_accessors self
179
+ end
180
+
181
+ class TIsNullPredicate
182
+ include ::Thrift::Struct, ::Thrift::Struct_Union
183
+ IS_NOT_NULL = 1
184
+
185
+ FIELDS = {
186
+ IS_NOT_NULL => { :type => ::Thrift::Types::BOOL, :name => 'is_not_null' }
187
+ }
188
+
189
+ def struct_fields; FIELDS; end
190
+
191
+ def validate
192
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_not_null is unset!') if @is_not_null.nil?
193
+ end
194
+
195
+ ::Thrift::Struct.generate_accessors self
196
+ end
197
+
198
+ class TLikePredicate
199
+ include ::Thrift::Struct, ::Thrift::Struct_Union
200
+ ESCAPE_CHAR = 1
201
+
202
+ FIELDS = {
203
+ ESCAPE_CHAR => { :type => ::Thrift::Types::STRING, :name => 'escape_char' }
204
+ }
205
+
206
+ def struct_fields; FIELDS; end
207
+
208
+ def validate
209
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field escape_char is unset!') unless @escape_char
210
+ end
211
+
212
+ ::Thrift::Struct.generate_accessors self
213
+ end
214
+
215
+ class TLiteralPredicate
216
+ include ::Thrift::Struct, ::Thrift::Struct_Union
217
+ VALUE = 1
218
+ IS_NULL = 2
219
+
220
+ FIELDS = {
221
+ VALUE => { :type => ::Thrift::Types::BOOL, :name => 'value' },
222
+ IS_NULL => { :type => ::Thrift::Types::BOOL, :name => 'is_null' }
223
+ }
224
+
225
+ def struct_fields; FIELDS; end
226
+
227
+ def validate
228
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') if @value.nil?
229
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_null is unset!') if @is_null.nil?
230
+ end
231
+
232
+ ::Thrift::Struct.generate_accessors self
233
+ end
234
+
235
+ class TSlotRef
236
+ include ::Thrift::Struct, ::Thrift::Struct_Union
237
+ SLOT_ID = 1
238
+
239
+ FIELDS = {
240
+ SLOT_ID => { :type => ::Thrift::Types::I32, :name => 'slot_id' }
241
+ }
242
+
243
+ def struct_fields; FIELDS; end
244
+
245
+ def validate
246
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field slot_id is unset!') unless @slot_id
247
+ end
248
+
249
+ ::Thrift::Struct.generate_accessors self
250
+ end
251
+
252
+ class TStringLiteral
253
+ include ::Thrift::Struct, ::Thrift::Struct_Union
254
+ VALUE = 1
255
+
256
+ FIELDS = {
257
+ VALUE => { :type => ::Thrift::Types::STRING, :name => 'value' }
258
+ }
259
+
260
+ def struct_fields; FIELDS; end
261
+
262
+ def validate
263
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
264
+ end
265
+
266
+ ::Thrift::Struct.generate_accessors self
267
+ end
268
+
269
+ class TExprNode
270
+ include ::Thrift::Struct, ::Thrift::Struct_Union
271
+ NODE_TYPE = 1
272
+ TYPE = 2
273
+ OPCODE = 3
274
+ NUM_CHILDREN = 4
275
+ AGG_EXPR = 5
276
+ BOOL_LITERAL = 6
277
+ CASE_EXPR = 7
278
+ DATE_LITERAL = 8
279
+ FLOAT_LITERAL = 9
280
+ INT_LITERAL = 10
281
+ IN_PREDICATE = 11
282
+ IS_NULL_PRED = 12
283
+ LIKE_PRED = 13
284
+ LITERAL_PRED = 14
285
+ SLOT_REF = 15
286
+ STRING_LITERAL = 16
287
+
288
+ FIELDS = {
289
+ NODE_TYPE => { :type => ::Thrift::Types::I32, :name => 'node_type', :enum_class => Impala::Protocol::TExprNodeType },
290
+ TYPE => { :type => ::Thrift::Types::I32, :name => 'type', :enum_class => Impala::Protocol::TPrimitiveType },
291
+ OPCODE => { :type => ::Thrift::Types::I32, :name => 'opcode', :optional => true, :enum_class => Impala::Protocol::TExprOpcode },
292
+ NUM_CHILDREN => { :type => ::Thrift::Types::I32, :name => 'num_children' },
293
+ AGG_EXPR => { :type => ::Thrift::Types::STRUCT, :name => 'agg_expr', :class => Impala::Protocol::TAggregateExpr, :optional => true },
294
+ BOOL_LITERAL => { :type => ::Thrift::Types::STRUCT, :name => 'bool_literal', :class => Impala::Protocol::TBoolLiteral, :optional => true },
295
+ CASE_EXPR => { :type => ::Thrift::Types::STRUCT, :name => 'case_expr', :class => Impala::Protocol::TCaseExpr, :optional => true },
296
+ DATE_LITERAL => { :type => ::Thrift::Types::STRUCT, :name => 'date_literal', :class => Impala::Protocol::TDateLiteral, :optional => true },
297
+ FLOAT_LITERAL => { :type => ::Thrift::Types::STRUCT, :name => 'float_literal', :class => Impala::Protocol::TFloatLiteral, :optional => true },
298
+ INT_LITERAL => { :type => ::Thrift::Types::STRUCT, :name => 'int_literal', :class => Impala::Protocol::TIntLiteral, :optional => true },
299
+ IN_PREDICATE => { :type => ::Thrift::Types::STRUCT, :name => 'in_predicate', :class => Impala::Protocol::TInPredicate, :optional => true },
300
+ IS_NULL_PRED => { :type => ::Thrift::Types::STRUCT, :name => 'is_null_pred', :class => Impala::Protocol::TIsNullPredicate, :optional => true },
301
+ LIKE_PRED => { :type => ::Thrift::Types::STRUCT, :name => 'like_pred', :class => Impala::Protocol::TLikePredicate, :optional => true },
302
+ LITERAL_PRED => { :type => ::Thrift::Types::STRUCT, :name => 'literal_pred', :class => Impala::Protocol::TLiteralPredicate, :optional => true },
303
+ SLOT_REF => { :type => ::Thrift::Types::STRUCT, :name => 'slot_ref', :class => Impala::Protocol::TSlotRef, :optional => true },
304
+ STRING_LITERAL => { :type => ::Thrift::Types::STRUCT, :name => 'string_literal', :class => Impala::Protocol::TStringLiteral, :optional => true }
305
+ }
306
+
307
+ def struct_fields; FIELDS; end
308
+
309
+ def validate
310
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field node_type is unset!') unless @node_type
311
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
312
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_children is unset!') unless @num_children
313
+ unless @node_type.nil? || Impala::Protocol::TExprNodeType::VALID_VALUES.include?(@node_type)
314
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field node_type!')
315
+ end
316
+ unless @type.nil? || Impala::Protocol::TPrimitiveType::VALID_VALUES.include?(@type)
317
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
318
+ end
319
+ unless @opcode.nil? || Impala::Protocol::TExprOpcode::VALID_VALUES.include?(@opcode)
320
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field opcode!')
321
+ end
322
+ end
323
+
324
+ ::Thrift::Struct.generate_accessors self
325
+ end
326
+
327
+ class TExpr
328
+ include ::Thrift::Struct, ::Thrift::Struct_Union
329
+ NODES = 1
330
+
331
+ FIELDS = {
332
+ NODES => { :type => ::Thrift::Types::LIST, :name => 'nodes', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExprNode } }
333
+ }
334
+
335
+ def struct_fields; FIELDS; end
336
+
337
+ def validate
338
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nodes is unset!') unless @nodes
339
+ end
340
+
341
+ ::Thrift::Struct.generate_accessors self
342
+ end
343
+
344
+ end
345
+ end
@@ -0,0 +1,706 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.8.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'fb303_types'
9
+
10
+ module Impala
11
+ module Protocol
12
+ module Fb303
13
+ module FacebookService
14
+ class Client
15
+ include ::Thrift::Client
16
+
17
+ def getName()
18
+ send_getName()
19
+ return recv_getName()
20
+ end
21
+
22
+ def send_getName()
23
+ send_message('getName', GetName_args)
24
+ end
25
+
26
+ def recv_getName()
27
+ result = receive_message(GetName_result)
28
+ return result.success unless result.success.nil?
29
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getName failed: unknown result')
30
+ end
31
+
32
+ def getVersion()
33
+ send_getVersion()
34
+ return recv_getVersion()
35
+ end
36
+
37
+ def send_getVersion()
38
+ send_message('getVersion', GetVersion_args)
39
+ end
40
+
41
+ def recv_getVersion()
42
+ result = receive_message(GetVersion_result)
43
+ return result.success unless result.success.nil?
44
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getVersion failed: unknown result')
45
+ end
46
+
47
+ def getStatus()
48
+ send_getStatus()
49
+ return recv_getStatus()
50
+ end
51
+
52
+ def send_getStatus()
53
+ send_message('getStatus', GetStatus_args)
54
+ end
55
+
56
+ def recv_getStatus()
57
+ result = receive_message(GetStatus_result)
58
+ return result.success unless result.success.nil?
59
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getStatus failed: unknown result')
60
+ end
61
+
62
+ def getStatusDetails()
63
+ send_getStatusDetails()
64
+ return recv_getStatusDetails()
65
+ end
66
+
67
+ def send_getStatusDetails()
68
+ send_message('getStatusDetails', GetStatusDetails_args)
69
+ end
70
+
71
+ def recv_getStatusDetails()
72
+ result = receive_message(GetStatusDetails_result)
73
+ return result.success unless result.success.nil?
74
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getStatusDetails failed: unknown result')
75
+ end
76
+
77
+ def getCounters()
78
+ send_getCounters()
79
+ return recv_getCounters()
80
+ end
81
+
82
+ def send_getCounters()
83
+ send_message('getCounters', GetCounters_args)
84
+ end
85
+
86
+ def recv_getCounters()
87
+ result = receive_message(GetCounters_result)
88
+ return result.success unless result.success.nil?
89
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getCounters failed: unknown result')
90
+ end
91
+
92
+ def getCounter(key)
93
+ send_getCounter(key)
94
+ return recv_getCounter()
95
+ end
96
+
97
+ def send_getCounter(key)
98
+ send_message('getCounter', GetCounter_args, :key => key)
99
+ end
100
+
101
+ def recv_getCounter()
102
+ result = receive_message(GetCounter_result)
103
+ return result.success unless result.success.nil?
104
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getCounter failed: unknown result')
105
+ end
106
+
107
+ def setOption(key, value)
108
+ send_setOption(key, value)
109
+ recv_setOption()
110
+ end
111
+
112
+ def send_setOption(key, value)
113
+ send_message('setOption', SetOption_args, :key => key, :value => value)
114
+ end
115
+
116
+ def recv_setOption()
117
+ result = receive_message(SetOption_result)
118
+ return
119
+ end
120
+
121
+ def getOption(key)
122
+ send_getOption(key)
123
+ return recv_getOption()
124
+ end
125
+
126
+ def send_getOption(key)
127
+ send_message('getOption', GetOption_args, :key => key)
128
+ end
129
+
130
+ def recv_getOption()
131
+ result = receive_message(GetOption_result)
132
+ return result.success unless result.success.nil?
133
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getOption failed: unknown result')
134
+ end
135
+
136
+ def getOptions()
137
+ send_getOptions()
138
+ return recv_getOptions()
139
+ end
140
+
141
+ def send_getOptions()
142
+ send_message('getOptions', GetOptions_args)
143
+ end
144
+
145
+ def recv_getOptions()
146
+ result = receive_message(GetOptions_result)
147
+ return result.success unless result.success.nil?
148
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getOptions failed: unknown result')
149
+ end
150
+
151
+ def getCpuProfile(profileDurationInSec)
152
+ send_getCpuProfile(profileDurationInSec)
153
+ return recv_getCpuProfile()
154
+ end
155
+
156
+ def send_getCpuProfile(profileDurationInSec)
157
+ send_message('getCpuProfile', GetCpuProfile_args, :profileDurationInSec => profileDurationInSec)
158
+ end
159
+
160
+ def recv_getCpuProfile()
161
+ result = receive_message(GetCpuProfile_result)
162
+ return result.success unless result.success.nil?
163
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getCpuProfile failed: unknown result')
164
+ end
165
+
166
+ def aliveSince()
167
+ send_aliveSince()
168
+ return recv_aliveSince()
169
+ end
170
+
171
+ def send_aliveSince()
172
+ send_message('aliveSince', AliveSince_args)
173
+ end
174
+
175
+ def recv_aliveSince()
176
+ result = receive_message(AliveSince_result)
177
+ return result.success unless result.success.nil?
178
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'aliveSince failed: unknown result')
179
+ end
180
+
181
+ def reinitialize()
182
+ send_reinitialize()
183
+ end
184
+
185
+ def send_reinitialize()
186
+ send_message('reinitialize', Reinitialize_args)
187
+ end
188
+ def shutdown()
189
+ send_shutdown()
190
+ end
191
+
192
+ def send_shutdown()
193
+ send_message('shutdown', Shutdown_args)
194
+ end
195
+ end
196
+
197
+ class Processor
198
+ include ::Thrift::Processor
199
+
200
+ def process_getName(seqid, iprot, oprot)
201
+ args = read_args(iprot, GetName_args)
202
+ result = GetName_result.new()
203
+ result.success = @handler.getName()
204
+ write_result(result, oprot, 'getName', seqid)
205
+ end
206
+
207
+ def process_getVersion(seqid, iprot, oprot)
208
+ args = read_args(iprot, GetVersion_args)
209
+ result = GetVersion_result.new()
210
+ result.success = @handler.getVersion()
211
+ write_result(result, oprot, 'getVersion', seqid)
212
+ end
213
+
214
+ def process_getStatus(seqid, iprot, oprot)
215
+ args = read_args(iprot, GetStatus_args)
216
+ result = GetStatus_result.new()
217
+ result.success = @handler.getStatus()
218
+ write_result(result, oprot, 'getStatus', seqid)
219
+ end
220
+
221
+ def process_getStatusDetails(seqid, iprot, oprot)
222
+ args = read_args(iprot, GetStatusDetails_args)
223
+ result = GetStatusDetails_result.new()
224
+ result.success = @handler.getStatusDetails()
225
+ write_result(result, oprot, 'getStatusDetails', seqid)
226
+ end
227
+
228
+ def process_getCounters(seqid, iprot, oprot)
229
+ args = read_args(iprot, GetCounters_args)
230
+ result = GetCounters_result.new()
231
+ result.success = @handler.getCounters()
232
+ write_result(result, oprot, 'getCounters', seqid)
233
+ end
234
+
235
+ def process_getCounter(seqid, iprot, oprot)
236
+ args = read_args(iprot, GetCounter_args)
237
+ result = GetCounter_result.new()
238
+ result.success = @handler.getCounter(args.key)
239
+ write_result(result, oprot, 'getCounter', seqid)
240
+ end
241
+
242
+ def process_setOption(seqid, iprot, oprot)
243
+ args = read_args(iprot, SetOption_args)
244
+ result = SetOption_result.new()
245
+ @handler.setOption(args.key, args.value)
246
+ write_result(result, oprot, 'setOption', seqid)
247
+ end
248
+
249
+ def process_getOption(seqid, iprot, oprot)
250
+ args = read_args(iprot, GetOption_args)
251
+ result = GetOption_result.new()
252
+ result.success = @handler.getOption(args.key)
253
+ write_result(result, oprot, 'getOption', seqid)
254
+ end
255
+
256
+ def process_getOptions(seqid, iprot, oprot)
257
+ args = read_args(iprot, GetOptions_args)
258
+ result = GetOptions_result.new()
259
+ result.success = @handler.getOptions()
260
+ write_result(result, oprot, 'getOptions', seqid)
261
+ end
262
+
263
+ def process_getCpuProfile(seqid, iprot, oprot)
264
+ args = read_args(iprot, GetCpuProfile_args)
265
+ result = GetCpuProfile_result.new()
266
+ result.success = @handler.getCpuProfile(args.profileDurationInSec)
267
+ write_result(result, oprot, 'getCpuProfile', seqid)
268
+ end
269
+
270
+ def process_aliveSince(seqid, iprot, oprot)
271
+ args = read_args(iprot, AliveSince_args)
272
+ result = AliveSince_result.new()
273
+ result.success = @handler.aliveSince()
274
+ write_result(result, oprot, 'aliveSince', seqid)
275
+ end
276
+
277
+ def process_reinitialize(seqid, iprot, oprot)
278
+ args = read_args(iprot, Reinitialize_args)
279
+ @handler.reinitialize()
280
+ return
281
+ end
282
+
283
+ def process_shutdown(seqid, iprot, oprot)
284
+ args = read_args(iprot, Shutdown_args)
285
+ @handler.shutdown()
286
+ return
287
+ end
288
+
289
+ end
290
+
291
+ # HELPER FUNCTIONS AND STRUCTURES
292
+
293
+ class GetName_args
294
+ include ::Thrift::Struct, ::Thrift::Struct_Union
295
+
296
+ FIELDS = {
297
+
298
+ }
299
+
300
+ def struct_fields; FIELDS; end
301
+
302
+ def validate
303
+ end
304
+
305
+ ::Thrift::Struct.generate_accessors self
306
+ end
307
+
308
+ class GetName_result
309
+ include ::Thrift::Struct, ::Thrift::Struct_Union
310
+ SUCCESS = 0
311
+
312
+ FIELDS = {
313
+ SUCCESS => { :type => ::Thrift::Types::STRING, :name => 'success' }
314
+ }
315
+
316
+ def struct_fields; FIELDS; end
317
+
318
+ def validate
319
+ end
320
+
321
+ ::Thrift::Struct.generate_accessors self
322
+ end
323
+
324
+ class GetVersion_args
325
+ include ::Thrift::Struct, ::Thrift::Struct_Union
326
+
327
+ FIELDS = {
328
+
329
+ }
330
+
331
+ def struct_fields; FIELDS; end
332
+
333
+ def validate
334
+ end
335
+
336
+ ::Thrift::Struct.generate_accessors self
337
+ end
338
+
339
+ class GetVersion_result
340
+ include ::Thrift::Struct, ::Thrift::Struct_Union
341
+ SUCCESS = 0
342
+
343
+ FIELDS = {
344
+ SUCCESS => { :type => ::Thrift::Types::STRING, :name => 'success' }
345
+ }
346
+
347
+ def struct_fields; FIELDS; end
348
+
349
+ def validate
350
+ end
351
+
352
+ ::Thrift::Struct.generate_accessors self
353
+ end
354
+
355
+ class GetStatus_args
356
+ include ::Thrift::Struct, ::Thrift::Struct_Union
357
+
358
+ FIELDS = {
359
+
360
+ }
361
+
362
+ def struct_fields; FIELDS; end
363
+
364
+ def validate
365
+ end
366
+
367
+ ::Thrift::Struct.generate_accessors self
368
+ end
369
+
370
+ class GetStatus_result
371
+ include ::Thrift::Struct, ::Thrift::Struct_Union
372
+ SUCCESS = 0
373
+
374
+ FIELDS = {
375
+ SUCCESS => { :type => ::Thrift::Types::I32, :name => 'success', :enum_class => Impala::Protocol::Fb303::Fb_status }
376
+ }
377
+
378
+ def struct_fields; FIELDS; end
379
+
380
+ def validate
381
+ unless @success.nil? || Impala::Protocol::Fb303::Fb_status::VALID_VALUES.include?(@success)
382
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field success!')
383
+ end
384
+ end
385
+
386
+ ::Thrift::Struct.generate_accessors self
387
+ end
388
+
389
+ class GetStatusDetails_args
390
+ include ::Thrift::Struct, ::Thrift::Struct_Union
391
+
392
+ FIELDS = {
393
+
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 GetStatusDetails_result
405
+ include ::Thrift::Struct, ::Thrift::Struct_Union
406
+ SUCCESS = 0
407
+
408
+ FIELDS = {
409
+ SUCCESS => { :type => ::Thrift::Types::STRING, :name => 'success' }
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 GetCounters_args
421
+ include ::Thrift::Struct, ::Thrift::Struct_Union
422
+
423
+ FIELDS = {
424
+
425
+ }
426
+
427
+ def struct_fields; FIELDS; end
428
+
429
+ def validate
430
+ end
431
+
432
+ ::Thrift::Struct.generate_accessors self
433
+ end
434
+
435
+ class GetCounters_result
436
+ include ::Thrift::Struct, ::Thrift::Struct_Union
437
+ SUCCESS = 0
438
+
439
+ FIELDS = {
440
+ SUCCESS => { :type => ::Thrift::Types::MAP, :name => 'success', :key => { :type => ::Thrift::Types::STRING }, :value => { :type => ::Thrift::Types::I64 } }
441
+ }
442
+
443
+ def struct_fields; FIELDS; end
444
+
445
+ def validate
446
+ end
447
+
448
+ ::Thrift::Struct.generate_accessors self
449
+ end
450
+
451
+ class GetCounter_args
452
+ include ::Thrift::Struct, ::Thrift::Struct_Union
453
+ KEY = 1
454
+
455
+ FIELDS = {
456
+ KEY => { :type => ::Thrift::Types::STRING, :name => 'key' }
457
+ }
458
+
459
+ def struct_fields; FIELDS; end
460
+
461
+ def validate
462
+ end
463
+
464
+ ::Thrift::Struct.generate_accessors self
465
+ end
466
+
467
+ class GetCounter_result
468
+ include ::Thrift::Struct, ::Thrift::Struct_Union
469
+ SUCCESS = 0
470
+
471
+ FIELDS = {
472
+ SUCCESS => { :type => ::Thrift::Types::I64, :name => 'success' }
473
+ }
474
+
475
+ def struct_fields; FIELDS; end
476
+
477
+ def validate
478
+ end
479
+
480
+ ::Thrift::Struct.generate_accessors self
481
+ end
482
+
483
+ class SetOption_args
484
+ include ::Thrift::Struct, ::Thrift::Struct_Union
485
+ KEY = 1
486
+ VALUE = 2
487
+
488
+ FIELDS = {
489
+ KEY => { :type => ::Thrift::Types::STRING, :name => 'key' },
490
+ VALUE => { :type => ::Thrift::Types::STRING, :name => 'value' }
491
+ }
492
+
493
+ def struct_fields; FIELDS; end
494
+
495
+ def validate
496
+ end
497
+
498
+ ::Thrift::Struct.generate_accessors self
499
+ end
500
+
501
+ class SetOption_result
502
+ include ::Thrift::Struct, ::Thrift::Struct_Union
503
+
504
+ FIELDS = {
505
+
506
+ }
507
+
508
+ def struct_fields; FIELDS; end
509
+
510
+ def validate
511
+ end
512
+
513
+ ::Thrift::Struct.generate_accessors self
514
+ end
515
+
516
+ class GetOption_args
517
+ include ::Thrift::Struct, ::Thrift::Struct_Union
518
+ KEY = 1
519
+
520
+ FIELDS = {
521
+ KEY => { :type => ::Thrift::Types::STRING, :name => 'key' }
522
+ }
523
+
524
+ def struct_fields; FIELDS; end
525
+
526
+ def validate
527
+ end
528
+
529
+ ::Thrift::Struct.generate_accessors self
530
+ end
531
+
532
+ class GetOption_result
533
+ include ::Thrift::Struct, ::Thrift::Struct_Union
534
+ SUCCESS = 0
535
+
536
+ FIELDS = {
537
+ SUCCESS => { :type => ::Thrift::Types::STRING, :name => 'success' }
538
+ }
539
+
540
+ def struct_fields; FIELDS; end
541
+
542
+ def validate
543
+ end
544
+
545
+ ::Thrift::Struct.generate_accessors self
546
+ end
547
+
548
+ class GetOptions_args
549
+ include ::Thrift::Struct, ::Thrift::Struct_Union
550
+
551
+ FIELDS = {
552
+
553
+ }
554
+
555
+ def struct_fields; FIELDS; end
556
+
557
+ def validate
558
+ end
559
+
560
+ ::Thrift::Struct.generate_accessors self
561
+ end
562
+
563
+ class GetOptions_result
564
+ include ::Thrift::Struct, ::Thrift::Struct_Union
565
+ SUCCESS = 0
566
+
567
+ FIELDS = {
568
+ SUCCESS => { :type => ::Thrift::Types::MAP, :name => 'success', :key => { :type => ::Thrift::Types::STRING }, :value => { :type => ::Thrift::Types::STRING } }
569
+ }
570
+
571
+ def struct_fields; FIELDS; end
572
+
573
+ def validate
574
+ end
575
+
576
+ ::Thrift::Struct.generate_accessors self
577
+ end
578
+
579
+ class GetCpuProfile_args
580
+ include ::Thrift::Struct, ::Thrift::Struct_Union
581
+ PROFILEDURATIONINSEC = 1
582
+
583
+ FIELDS = {
584
+ PROFILEDURATIONINSEC => { :type => ::Thrift::Types::I32, :name => 'profileDurationInSec' }
585
+ }
586
+
587
+ def struct_fields; FIELDS; end
588
+
589
+ def validate
590
+ end
591
+
592
+ ::Thrift::Struct.generate_accessors self
593
+ end
594
+
595
+ class GetCpuProfile_result
596
+ include ::Thrift::Struct, ::Thrift::Struct_Union
597
+ SUCCESS = 0
598
+
599
+ FIELDS = {
600
+ SUCCESS => { :type => ::Thrift::Types::STRING, :name => 'success' }
601
+ }
602
+
603
+ def struct_fields; FIELDS; end
604
+
605
+ def validate
606
+ end
607
+
608
+ ::Thrift::Struct.generate_accessors self
609
+ end
610
+
611
+ class AliveSince_args
612
+ include ::Thrift::Struct, ::Thrift::Struct_Union
613
+
614
+ FIELDS = {
615
+
616
+ }
617
+
618
+ def struct_fields; FIELDS; end
619
+
620
+ def validate
621
+ end
622
+
623
+ ::Thrift::Struct.generate_accessors self
624
+ end
625
+
626
+ class AliveSince_result
627
+ include ::Thrift::Struct, ::Thrift::Struct_Union
628
+ SUCCESS = 0
629
+
630
+ FIELDS = {
631
+ SUCCESS => { :type => ::Thrift::Types::I64, :name => 'success' }
632
+ }
633
+
634
+ def struct_fields; FIELDS; end
635
+
636
+ def validate
637
+ end
638
+
639
+ ::Thrift::Struct.generate_accessors self
640
+ end
641
+
642
+ class Reinitialize_args
643
+ include ::Thrift::Struct, ::Thrift::Struct_Union
644
+
645
+ FIELDS = {
646
+
647
+ }
648
+
649
+ def struct_fields; FIELDS; end
650
+
651
+ def validate
652
+ end
653
+
654
+ ::Thrift::Struct.generate_accessors self
655
+ end
656
+
657
+ class Reinitialize_result
658
+ include ::Thrift::Struct, ::Thrift::Struct_Union
659
+
660
+ FIELDS = {
661
+
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 Shutdown_args
673
+ include ::Thrift::Struct, ::Thrift::Struct_Union
674
+
675
+ FIELDS = {
676
+
677
+ }
678
+
679
+ def struct_fields; FIELDS; end
680
+
681
+ def validate
682
+ end
683
+
684
+ ::Thrift::Struct.generate_accessors self
685
+ end
686
+
687
+ class Shutdown_result
688
+ include ::Thrift::Struct, ::Thrift::Struct_Union
689
+
690
+ FIELDS = {
691
+
692
+ }
693
+
694
+ def struct_fields; FIELDS; end
695
+
696
+ def validate
697
+ end
698
+
699
+ ::Thrift::Struct.generate_accessors self
700
+ end
701
+
702
+ end
703
+
704
+ end
705
+ end
706
+ end