rbhive 0.1.1 → 0.1.3
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.
- data/lib/thrift/facebook_service.rb +53 -40
- data/lib/thrift/hive_metastore_constants.rb +9 -0
- data/lib/thrift/hive_metastore_types.rb +89 -51
- data/lib/thrift/hive_service_types.rb +10 -10
- data/lib/thrift/queryplan_constants.rb +8 -0
- data/lib/thrift/queryplan_types.rb +253 -0
- data/lib/thrift/reflection_limited_types.rb +12 -12
- data/lib/thrift/serde_constants.rb +2 -0
- data/lib/thrift/thrift_hive.rb +88 -23
- data/lib/thrift/thrift_hive_metastore.rb +1255 -150
- metadata +16 -5
@@ -0,0 +1,253 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
|
8
|
+
module AdjacencyType
|
9
|
+
CONJUNCTIVE = 0
|
10
|
+
DISJUNCTIVE = 1
|
11
|
+
VALUE_MAP = {0 => "CONJUNCTIVE", 1 => "DISJUNCTIVE"}
|
12
|
+
VALID_VALUES = Set.new([CONJUNCTIVE, DISJUNCTIVE]).freeze
|
13
|
+
end
|
14
|
+
|
15
|
+
module NodeType
|
16
|
+
OPERATOR = 0
|
17
|
+
STAGE = 1
|
18
|
+
VALUE_MAP = {0 => "OPERATOR", 1 => "STAGE"}
|
19
|
+
VALID_VALUES = Set.new([OPERATOR, STAGE]).freeze
|
20
|
+
end
|
21
|
+
|
22
|
+
module OperatorType
|
23
|
+
JOIN = 0
|
24
|
+
MAPJOIN = 1
|
25
|
+
EXTRACT = 2
|
26
|
+
FILTER = 3
|
27
|
+
FORWARD = 4
|
28
|
+
GROUPBY = 5
|
29
|
+
LIMIT = 6
|
30
|
+
SCRIPT = 7
|
31
|
+
SELECT = 8
|
32
|
+
TABLESCAN = 9
|
33
|
+
FILESINK = 10
|
34
|
+
REDUCESINK = 11
|
35
|
+
UNION = 12
|
36
|
+
UDTF = 13
|
37
|
+
LATERALVIEWJOIN = 14
|
38
|
+
LATERALVIEWFORWARD = 15
|
39
|
+
VALUE_MAP = {0 => "JOIN", 1 => "MAPJOIN", 2 => "EXTRACT", 3 => "FILTER", 4 => "FORWARD", 5 => "GROUPBY", 6 => "LIMIT", 7 => "SCRIPT", 8 => "SELECT", 9 => "TABLESCAN", 10 => "FILESINK", 11 => "REDUCESINK", 12 => "UNION", 13 => "UDTF", 14 => "LATERALVIEWJOIN", 15 => "LATERALVIEWFORWARD"}
|
40
|
+
VALID_VALUES = Set.new([JOIN, MAPJOIN, EXTRACT, FILTER, FORWARD, GROUPBY, LIMIT, SCRIPT, SELECT, TABLESCAN, FILESINK, REDUCESINK, UNION, UDTF, LATERALVIEWJOIN, LATERALVIEWFORWARD]).freeze
|
41
|
+
end
|
42
|
+
|
43
|
+
module TaskType
|
44
|
+
MAP = 0
|
45
|
+
REDUCE = 1
|
46
|
+
OTHER = 2
|
47
|
+
VALUE_MAP = {0 => "MAP", 1 => "REDUCE", 2 => "OTHER"}
|
48
|
+
VALID_VALUES = Set.new([MAP, REDUCE, OTHER]).freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
module StageType
|
52
|
+
CONDITIONAL = 0
|
53
|
+
COPY = 1
|
54
|
+
DDL = 2
|
55
|
+
MAPRED = 3
|
56
|
+
EXPLAIN = 4
|
57
|
+
FETCH = 5
|
58
|
+
FUNC = 6
|
59
|
+
MAPREDLOCAL = 7
|
60
|
+
MOVE = 8
|
61
|
+
VALUE_MAP = {0 => "CONDITIONAL", 1 => "COPY", 2 => "DDL", 3 => "MAPRED", 4 => "EXPLAIN", 5 => "FETCH", 6 => "FUNC", 7 => "MAPREDLOCAL", 8 => "MOVE"}
|
62
|
+
VALID_VALUES = Set.new([CONDITIONAL, COPY, DDL, MAPRED, EXPLAIN, FETCH, FUNC, MAPREDLOCAL, MOVE]).freeze
|
63
|
+
end
|
64
|
+
|
65
|
+
class Adjacency
|
66
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
67
|
+
NODE = 1
|
68
|
+
CHILDREN = 2
|
69
|
+
ADJACENCYTYPE = 3
|
70
|
+
|
71
|
+
FIELDS = {
|
72
|
+
NODE => {:type => ::Thrift::Types::STRING, :name => 'node'},
|
73
|
+
CHILDREN => {:type => ::Thrift::Types::LIST, :name => 'children', :element => {:type => ::Thrift::Types::STRING}},
|
74
|
+
ADJACENCYTYPE => {:type => ::Thrift::Types::I32, :name => 'adjacencyType', :enum_class => AdjacencyType}
|
75
|
+
}
|
76
|
+
|
77
|
+
def struct_fields; FIELDS; end
|
78
|
+
|
79
|
+
def validate
|
80
|
+
unless @adjacencyType.nil? || AdjacencyType::VALID_VALUES.include?(@adjacencyType)
|
81
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field adjacencyType!')
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
::Thrift::Struct.generate_accessors self
|
86
|
+
end
|
87
|
+
|
88
|
+
class Graph
|
89
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
90
|
+
NODETYPE = 1
|
91
|
+
ROOTS = 2
|
92
|
+
ADJACENCYLIST = 3
|
93
|
+
|
94
|
+
FIELDS = {
|
95
|
+
NODETYPE => {:type => ::Thrift::Types::I32, :name => 'nodeType', :enum_class => NodeType},
|
96
|
+
ROOTS => {:type => ::Thrift::Types::LIST, :name => 'roots', :element => {:type => ::Thrift::Types::STRING}},
|
97
|
+
ADJACENCYLIST => {:type => ::Thrift::Types::LIST, :name => 'adjacencyList', :element => {:type => ::Thrift::Types::STRUCT, :class => Adjacency}}
|
98
|
+
}
|
99
|
+
|
100
|
+
def struct_fields; FIELDS; end
|
101
|
+
|
102
|
+
def validate
|
103
|
+
unless @nodeType.nil? || NodeType::VALID_VALUES.include?(@nodeType)
|
104
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field nodeType!')
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
::Thrift::Struct.generate_accessors self
|
109
|
+
end
|
110
|
+
|
111
|
+
class Operator
|
112
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
113
|
+
OPERATORID = 1
|
114
|
+
OPERATORTYPE = 2
|
115
|
+
OPERATORATTRIBUTES = 3
|
116
|
+
OPERATORCOUNTERS = 4
|
117
|
+
DONE = 5
|
118
|
+
STARTED = 6
|
119
|
+
|
120
|
+
FIELDS = {
|
121
|
+
OPERATORID => {:type => ::Thrift::Types::STRING, :name => 'operatorId'},
|
122
|
+
OPERATORTYPE => {:type => ::Thrift::Types::I32, :name => 'operatorType', :enum_class => OperatorType},
|
123
|
+
OPERATORATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'operatorAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
|
124
|
+
OPERATORCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'operatorCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
|
125
|
+
DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
|
126
|
+
STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
|
127
|
+
}
|
128
|
+
|
129
|
+
def struct_fields; FIELDS; end
|
130
|
+
|
131
|
+
def validate
|
132
|
+
unless @operatorType.nil? || OperatorType::VALID_VALUES.include?(@operatorType)
|
133
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operatorType!')
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
::Thrift::Struct.generate_accessors self
|
138
|
+
end
|
139
|
+
|
140
|
+
class Task
|
141
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
142
|
+
TASKID = 1
|
143
|
+
TASKTYPE = 2
|
144
|
+
TASKATTRIBUTES = 3
|
145
|
+
TASKCOUNTERS = 4
|
146
|
+
OPERATORGRAPH = 5
|
147
|
+
OPERATORLIST = 6
|
148
|
+
DONE = 7
|
149
|
+
STARTED = 8
|
150
|
+
|
151
|
+
FIELDS = {
|
152
|
+
TASKID => {:type => ::Thrift::Types::STRING, :name => 'taskId'},
|
153
|
+
TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => TaskType},
|
154
|
+
TASKATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'taskAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
|
155
|
+
TASKCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'taskCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
|
156
|
+
OPERATORGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'operatorGraph', :class => Graph, :optional => true},
|
157
|
+
OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => Operator}, :optional => true},
|
158
|
+
DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
|
159
|
+
STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
|
160
|
+
}
|
161
|
+
|
162
|
+
def struct_fields; FIELDS; end
|
163
|
+
|
164
|
+
def validate
|
165
|
+
unless @taskType.nil? || TaskType::VALID_VALUES.include?(@taskType)
|
166
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field taskType!')
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
::Thrift::Struct.generate_accessors self
|
171
|
+
end
|
172
|
+
|
173
|
+
class Stage
|
174
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
175
|
+
STAGEID = 1
|
176
|
+
STAGETYPE = 2
|
177
|
+
STAGEATTRIBUTES = 3
|
178
|
+
STAGECOUNTERS = 4
|
179
|
+
TASKLIST = 5
|
180
|
+
DONE = 6
|
181
|
+
STARTED = 7
|
182
|
+
|
183
|
+
FIELDS = {
|
184
|
+
STAGEID => {:type => ::Thrift::Types::STRING, :name => 'stageId'},
|
185
|
+
STAGETYPE => {:type => ::Thrift::Types::I32, :name => 'stageType', :enum_class => StageType},
|
186
|
+
STAGEATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'stageAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
|
187
|
+
STAGECOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'stageCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
|
188
|
+
TASKLIST => {:type => ::Thrift::Types::LIST, :name => 'taskList', :element => {:type => ::Thrift::Types::STRUCT, :class => Task}},
|
189
|
+
DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
|
190
|
+
STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
|
191
|
+
}
|
192
|
+
|
193
|
+
def struct_fields; FIELDS; end
|
194
|
+
|
195
|
+
def validate
|
196
|
+
unless @stageType.nil? || StageType::VALID_VALUES.include?(@stageType)
|
197
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field stageType!')
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
::Thrift::Struct.generate_accessors self
|
202
|
+
end
|
203
|
+
|
204
|
+
class Query
|
205
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
206
|
+
QUERYID = 1
|
207
|
+
QUERYTYPE = 2
|
208
|
+
QUERYATTRIBUTES = 3
|
209
|
+
QUERYCOUNTERS = 4
|
210
|
+
STAGEGRAPH = 5
|
211
|
+
STAGELIST = 6
|
212
|
+
DONE = 7
|
213
|
+
STARTED = 8
|
214
|
+
|
215
|
+
FIELDS = {
|
216
|
+
QUERYID => {:type => ::Thrift::Types::STRING, :name => 'queryId'},
|
217
|
+
QUERYTYPE => {:type => ::Thrift::Types::STRING, :name => 'queryType'},
|
218
|
+
QUERYATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'queryAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
|
219
|
+
QUERYCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'queryCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
|
220
|
+
STAGEGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'stageGraph', :class => Graph},
|
221
|
+
STAGELIST => {:type => ::Thrift::Types::LIST, :name => 'stageList', :element => {:type => ::Thrift::Types::STRUCT, :class => Stage}},
|
222
|
+
DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
|
223
|
+
STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
|
224
|
+
}
|
225
|
+
|
226
|
+
def struct_fields; FIELDS; end
|
227
|
+
|
228
|
+
def validate
|
229
|
+
end
|
230
|
+
|
231
|
+
::Thrift::Struct.generate_accessors self
|
232
|
+
end
|
233
|
+
|
234
|
+
class QueryPlan
|
235
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
236
|
+
QUERIES = 1
|
237
|
+
DONE = 2
|
238
|
+
STARTED = 3
|
239
|
+
|
240
|
+
FIELDS = {
|
241
|
+
QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => Query}},
|
242
|
+
DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
|
243
|
+
STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
|
244
|
+
}
|
245
|
+
|
246
|
+
def struct_fields; FIELDS; end
|
247
|
+
|
248
|
+
def validate
|
249
|
+
end
|
250
|
+
|
251
|
+
::Thrift::Struct.generate_accessors self
|
252
|
+
end
|
253
|
+
|
@@ -25,11 +25,10 @@ module TTypeTag
|
|
25
25
|
end
|
26
26
|
|
27
27
|
class SimpleType
|
28
|
-
include ::Thrift::Struct
|
28
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
29
29
|
TTYPE = 1
|
30
30
|
NAME = 2
|
31
31
|
|
32
|
-
::Thrift::Struct.field_accessor self, :ttype, :name
|
33
32
|
FIELDS = {
|
34
33
|
TTYPE => {:type => ::Thrift::Types::I32, :name => 'ttype', :enum_class => TTypeTag},
|
35
34
|
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}
|
@@ -43,15 +42,15 @@ class SimpleType
|
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
45
|
+
::Thrift::Struct.generate_accessors self
|
46
46
|
end
|
47
47
|
|
48
48
|
class ContainerType
|
49
|
-
include ::Thrift::Struct
|
49
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
50
50
|
TTYPE = 1
|
51
51
|
SUBTYPE1 = 2
|
52
52
|
SUBTYPE2 = 3
|
53
53
|
|
54
|
-
::Thrift::Struct.field_accessor self, :ttype, :subtype1, :subtype2
|
55
54
|
FIELDS = {
|
56
55
|
TTYPE => {:type => ::Thrift::Types::I32, :name => 'ttype', :enum_class => TTypeTag},
|
57
56
|
SUBTYPE1 => {:type => ::Thrift::Types::STRUCT, :name => 'subtype1', :class => SimpleType},
|
@@ -66,15 +65,15 @@ class ContainerType
|
|
66
65
|
end
|
67
66
|
end
|
68
67
|
|
68
|
+
::Thrift::Struct.generate_accessors self
|
69
69
|
end
|
70
70
|
|
71
71
|
class ThriftType
|
72
|
-
include ::Thrift::Struct
|
72
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
73
73
|
IS_CONTAINER = 1
|
74
74
|
SIMPLE_TYPE = 2
|
75
75
|
CONTAINER_TYPE = 3
|
76
76
|
|
77
|
-
::Thrift::Struct.field_accessor self, :is_container, :simple_type, :container_type
|
78
77
|
FIELDS = {
|
79
78
|
IS_CONTAINER => {:type => ::Thrift::Types::BOOL, :name => 'is_container'},
|
80
79
|
SIMPLE_TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'simple_type', :class => SimpleType, :optional => true},
|
@@ -86,15 +85,15 @@ class ThriftType
|
|
86
85
|
def validate
|
87
86
|
end
|
88
87
|
|
88
|
+
::Thrift::Struct.generate_accessors self
|
89
89
|
end
|
90
90
|
|
91
91
|
class Argument
|
92
|
-
include ::Thrift::Struct
|
92
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
93
93
|
KEY = 1
|
94
94
|
NAME = 2
|
95
95
|
TYPE = 3
|
96
96
|
|
97
|
-
::Thrift::Struct.field_accessor self, :key, :name, :type
|
98
97
|
FIELDS = {
|
99
98
|
KEY => {:type => ::Thrift::Types::I16, :name => 'key'},
|
100
99
|
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
@@ -106,15 +105,15 @@ class Argument
|
|
106
105
|
def validate
|
107
106
|
end
|
108
107
|
|
108
|
+
::Thrift::Struct.generate_accessors self
|
109
109
|
end
|
110
110
|
|
111
111
|
class Method
|
112
|
-
include ::Thrift::Struct
|
112
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
113
113
|
NAME = 1
|
114
114
|
RETURN_TYPE = 2
|
115
115
|
ARGUMENTS = 3
|
116
116
|
|
117
|
-
::Thrift::Struct.field_accessor self, :name, :return_type, :arguments
|
118
117
|
FIELDS = {
|
119
118
|
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
120
119
|
RETURN_TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'return_type', :class => ThriftType},
|
@@ -126,15 +125,15 @@ class Method
|
|
126
125
|
def validate
|
127
126
|
end
|
128
127
|
|
128
|
+
::Thrift::Struct.generate_accessors self
|
129
129
|
end
|
130
130
|
|
131
131
|
class Service
|
132
|
-
include ::Thrift::Struct
|
132
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
133
133
|
NAME = 1
|
134
134
|
METHODS = 2
|
135
135
|
FULLY_REFLECTED = 3
|
136
136
|
|
137
|
-
::Thrift::Struct.field_accessor self, :name, :methods, :fully_reflected
|
138
137
|
FIELDS = {
|
139
138
|
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
140
139
|
METHODS => {:type => ::Thrift::Types::LIST, :name => 'methods', :element => {:type => ::Thrift::Types::STRUCT, :class => Method}},
|
@@ -146,5 +145,6 @@ class Service
|
|
146
145
|
def validate
|
147
146
|
end
|
148
147
|
|
148
|
+
::Thrift::Struct.generate_accessors self
|
149
149
|
end
|
150
150
|
|
@@ -20,6 +20,8 @@ SERIALIZATION_LAST_COLUMN_TAKES_REST = %q"serialization.last.column.takes.rest"
|
|
20
20
|
|
21
21
|
SERIALIZATION_SORT_ORDER = %q"serialization.sort.order"
|
22
22
|
|
23
|
+
SERIALIZATION_USE_JSON_OBJECTS = %q"serialization.use.json.object"
|
24
|
+
|
23
25
|
FIELD_DELIM = %q"field.delim"
|
24
26
|
|
25
27
|
COLLECTION_DELIM = %q"colelction.delim"
|
data/lib/thrift/thrift_hive.rb
CHANGED
@@ -123,6 +123,22 @@ module ThriftHive
|
|
123
123
|
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getClusterStatus failed: unknown result')
|
124
124
|
end
|
125
125
|
|
126
|
+
def getQueryPlan()
|
127
|
+
send_getQueryPlan()
|
128
|
+
return recv_getQueryPlan()
|
129
|
+
end
|
130
|
+
|
131
|
+
def send_getQueryPlan()
|
132
|
+
send_message('getQueryPlan', GetQueryPlan_args)
|
133
|
+
end
|
134
|
+
|
135
|
+
def recv_getQueryPlan()
|
136
|
+
result = receive_message(GetQueryPlan_result)
|
137
|
+
return result.success unless result.success.nil?
|
138
|
+
raise result.ex unless result.ex.nil?
|
139
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getQueryPlan failed: unknown result')
|
140
|
+
end
|
141
|
+
|
126
142
|
end
|
127
143
|
|
128
144
|
class Processor < ThriftHiveMetastore::Processor
|
@@ -205,15 +221,25 @@ module ThriftHive
|
|
205
221
|
write_result(result, oprot, 'getClusterStatus', seqid)
|
206
222
|
end
|
207
223
|
|
224
|
+
def process_getQueryPlan(seqid, iprot, oprot)
|
225
|
+
args = read_args(iprot, GetQueryPlan_args)
|
226
|
+
result = GetQueryPlan_result.new()
|
227
|
+
begin
|
228
|
+
result.success = @handler.getQueryPlan()
|
229
|
+
rescue HiveServerException => ex
|
230
|
+
result.ex = ex
|
231
|
+
end
|
232
|
+
write_result(result, oprot, 'getQueryPlan', seqid)
|
233
|
+
end
|
234
|
+
|
208
235
|
end
|
209
236
|
|
210
237
|
# HELPER FUNCTIONS AND STRUCTURES
|
211
238
|
|
212
239
|
class Execute_args
|
213
|
-
include ::Thrift::Struct
|
240
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
214
241
|
QUERY = 1
|
215
242
|
|
216
|
-
::Thrift::Struct.field_accessor self, :query
|
217
243
|
FIELDS = {
|
218
244
|
QUERY => {:type => ::Thrift::Types::STRING, :name => 'query'}
|
219
245
|
}
|
@@ -223,13 +249,13 @@ module ThriftHive
|
|
223
249
|
def validate
|
224
250
|
end
|
225
251
|
|
252
|
+
::Thrift::Struct.generate_accessors self
|
226
253
|
end
|
227
254
|
|
228
255
|
class Execute_result
|
229
|
-
include ::Thrift::Struct
|
256
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
230
257
|
EX = 1
|
231
258
|
|
232
|
-
::Thrift::Struct.field_accessor self, :ex
|
233
259
|
FIELDS = {
|
234
260
|
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
|
235
261
|
}
|
@@ -239,10 +265,11 @@ module ThriftHive
|
|
239
265
|
def validate
|
240
266
|
end
|
241
267
|
|
268
|
+
::Thrift::Struct.generate_accessors self
|
242
269
|
end
|
243
270
|
|
244
271
|
class FetchOne_args
|
245
|
-
include ::Thrift::Struct
|
272
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
246
273
|
|
247
274
|
FIELDS = {
|
248
275
|
|
@@ -253,14 +280,14 @@ module ThriftHive
|
|
253
280
|
def validate
|
254
281
|
end
|
255
282
|
|
283
|
+
::Thrift::Struct.generate_accessors self
|
256
284
|
end
|
257
285
|
|
258
286
|
class FetchOne_result
|
259
|
-
include ::Thrift::Struct
|
287
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
260
288
|
SUCCESS = 0
|
261
289
|
EX = 1
|
262
290
|
|
263
|
-
::Thrift::Struct.field_accessor self, :success, :ex
|
264
291
|
FIELDS = {
|
265
292
|
SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
|
266
293
|
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
|
@@ -271,13 +298,13 @@ module ThriftHive
|
|
271
298
|
def validate
|
272
299
|
end
|
273
300
|
|
301
|
+
::Thrift::Struct.generate_accessors self
|
274
302
|
end
|
275
303
|
|
276
304
|
class FetchN_args
|
277
|
-
include ::Thrift::Struct
|
305
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
278
306
|
NUMROWS = 1
|
279
307
|
|
280
|
-
::Thrift::Struct.field_accessor self, :numRows
|
281
308
|
FIELDS = {
|
282
309
|
NUMROWS => {:type => ::Thrift::Types::I32, :name => 'numRows'}
|
283
310
|
}
|
@@ -287,14 +314,14 @@ module ThriftHive
|
|
287
314
|
def validate
|
288
315
|
end
|
289
316
|
|
317
|
+
::Thrift::Struct.generate_accessors self
|
290
318
|
end
|
291
319
|
|
292
320
|
class FetchN_result
|
293
|
-
include ::Thrift::Struct
|
321
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
294
322
|
SUCCESS = 0
|
295
323
|
EX = 1
|
296
324
|
|
297
|
-
::Thrift::Struct.field_accessor self, :success, :ex
|
298
325
|
FIELDS = {
|
299
326
|
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
|
300
327
|
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
|
@@ -305,10 +332,11 @@ module ThriftHive
|
|
305
332
|
def validate
|
306
333
|
end
|
307
334
|
|
335
|
+
::Thrift::Struct.generate_accessors self
|
308
336
|
end
|
309
337
|
|
310
338
|
class FetchAll_args
|
311
|
-
include ::Thrift::Struct
|
339
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
312
340
|
|
313
341
|
FIELDS = {
|
314
342
|
|
@@ -319,14 +347,14 @@ module ThriftHive
|
|
319
347
|
def validate
|
320
348
|
end
|
321
349
|
|
350
|
+
::Thrift::Struct.generate_accessors self
|
322
351
|
end
|
323
352
|
|
324
353
|
class FetchAll_result
|
325
|
-
include ::Thrift::Struct
|
354
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
326
355
|
SUCCESS = 0
|
327
356
|
EX = 1
|
328
357
|
|
329
|
-
::Thrift::Struct.field_accessor self, :success, :ex
|
330
358
|
FIELDS = {
|
331
359
|
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
|
332
360
|
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
|
@@ -337,10 +365,11 @@ module ThriftHive
|
|
337
365
|
def validate
|
338
366
|
end
|
339
367
|
|
368
|
+
::Thrift::Struct.generate_accessors self
|
340
369
|
end
|
341
370
|
|
342
371
|
class GetSchema_args
|
343
|
-
include ::Thrift::Struct
|
372
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
344
373
|
|
345
374
|
FIELDS = {
|
346
375
|
|
@@ -351,14 +380,14 @@ module ThriftHive
|
|
351
380
|
def validate
|
352
381
|
end
|
353
382
|
|
383
|
+
::Thrift::Struct.generate_accessors self
|
354
384
|
end
|
355
385
|
|
356
386
|
class GetSchema_result
|
357
|
-
include ::Thrift::Struct
|
387
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
358
388
|
SUCCESS = 0
|
359
389
|
EX = 1
|
360
390
|
|
361
|
-
::Thrift::Struct.field_accessor self, :success, :ex
|
362
391
|
FIELDS = {
|
363
392
|
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema},
|
364
393
|
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
|
@@ -369,10 +398,11 @@ module ThriftHive
|
|
369
398
|
def validate
|
370
399
|
end
|
371
400
|
|
401
|
+
::Thrift::Struct.generate_accessors self
|
372
402
|
end
|
373
403
|
|
374
404
|
class GetThriftSchema_args
|
375
|
-
include ::Thrift::Struct
|
405
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
376
406
|
|
377
407
|
FIELDS = {
|
378
408
|
|
@@ -383,14 +413,14 @@ module ThriftHive
|
|
383
413
|
def validate
|
384
414
|
end
|
385
415
|
|
416
|
+
::Thrift::Struct.generate_accessors self
|
386
417
|
end
|
387
418
|
|
388
419
|
class GetThriftSchema_result
|
389
|
-
include ::Thrift::Struct
|
420
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
390
421
|
SUCCESS = 0
|
391
422
|
EX = 1
|
392
423
|
|
393
|
-
::Thrift::Struct.field_accessor self, :success, :ex
|
394
424
|
FIELDS = {
|
395
425
|
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema},
|
396
426
|
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
|
@@ -401,10 +431,11 @@ module ThriftHive
|
|
401
431
|
def validate
|
402
432
|
end
|
403
433
|
|
434
|
+
::Thrift::Struct.generate_accessors self
|
404
435
|
end
|
405
436
|
|
406
437
|
class GetClusterStatus_args
|
407
|
-
include ::Thrift::Struct
|
438
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
408
439
|
|
409
440
|
FIELDS = {
|
410
441
|
|
@@ -415,14 +446,14 @@ module ThriftHive
|
|
415
446
|
def validate
|
416
447
|
end
|
417
448
|
|
449
|
+
::Thrift::Struct.generate_accessors self
|
418
450
|
end
|
419
451
|
|
420
452
|
class GetClusterStatus_result
|
421
|
-
include ::Thrift::Struct
|
453
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
422
454
|
SUCCESS = 0
|
423
455
|
EX = 1
|
424
456
|
|
425
|
-
::Thrift::Struct.field_accessor self, :success, :ex
|
426
457
|
FIELDS = {
|
427
458
|
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => HiveClusterStatus},
|
428
459
|
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
|
@@ -433,6 +464,40 @@ module ThriftHive
|
|
433
464
|
def validate
|
434
465
|
end
|
435
466
|
|
467
|
+
::Thrift::Struct.generate_accessors self
|
468
|
+
end
|
469
|
+
|
470
|
+
class GetQueryPlan_args
|
471
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
472
|
+
|
473
|
+
FIELDS = {
|
474
|
+
|
475
|
+
}
|
476
|
+
|
477
|
+
def struct_fields; FIELDS; end
|
478
|
+
|
479
|
+
def validate
|
480
|
+
end
|
481
|
+
|
482
|
+
::Thrift::Struct.generate_accessors self
|
483
|
+
end
|
484
|
+
|
485
|
+
class GetQueryPlan_result
|
486
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
487
|
+
SUCCESS = 0
|
488
|
+
EX = 1
|
489
|
+
|
490
|
+
FIELDS = {
|
491
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => QueryPlan},
|
492
|
+
EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
|
493
|
+
}
|
494
|
+
|
495
|
+
def struct_fields; FIELDS; end
|
496
|
+
|
497
|
+
def validate
|
498
|
+
end
|
499
|
+
|
500
|
+
::Thrift::Struct.generate_accessors self
|
436
501
|
end
|
437
502
|
|
438
503
|
end
|