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.
- data/.gitignore +17 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +22 -0
- data/README.md +28 -0
- data/Rakefile +15 -0
- data/impala.gemspec +25 -0
- data/lib/impala.rb +33 -0
- data/lib/impala/connection.rb +93 -0
- data/lib/impala/cursor.rb +86 -0
- data/lib/impala/protocol.rb +6 -0
- data/lib/impala/protocol/beeswax_constants.rb +14 -0
- data/lib/impala/protocol/beeswax_service.rb +747 -0
- data/lib/impala/protocol/beeswax_types.rb +192 -0
- data/lib/impala/protocol/data_constants.rb +12 -0
- data/lib/impala/protocol/data_sinks_constants.rb +12 -0
- data/lib/impala/protocol/data_sinks_types.rb +107 -0
- data/lib/impala/protocol/data_types.rb +77 -0
- data/lib/impala/protocol/descriptors_constants.rb +12 -0
- data/lib/impala/protocol/descriptors_types.rb +266 -0
- data/lib/impala/protocol/exprs_constants.rb +12 -0
- data/lib/impala/protocol/exprs_types.rb +345 -0
- data/lib/impala/protocol/facebook_service.rb +706 -0
- data/lib/impala/protocol/fb303_constants.rb +14 -0
- data/lib/impala/protocol/fb303_types.rb +24 -0
- data/lib/impala/protocol/frontend_constants.rb +12 -0
- data/lib/impala/protocol/frontend_types.rb +347 -0
- data/lib/impala/protocol/hive_metastore_constants.rb +52 -0
- data/lib/impala/protocol/hive_metastore_types.rb +697 -0
- data/lib/impala/protocol/impala_internal_service.rb +244 -0
- data/lib/impala/protocol/impala_internal_service_constants.rb +12 -0
- data/lib/impala/protocol/impala_internal_service_types.rb +362 -0
- data/lib/impala/protocol/impala_plan_service.rb +310 -0
- data/lib/impala/protocol/impala_plan_service_constants.rb +12 -0
- data/lib/impala/protocol/impala_plan_service_types.rb +36 -0
- data/lib/impala/protocol/impala_service.rb +260 -0
- data/lib/impala/protocol/impala_service_constants.rb +12 -0
- data/lib/impala/protocol/impala_service_types.rb +46 -0
- data/lib/impala/protocol/java_constants_constants.rb +42 -0
- data/lib/impala/protocol/java_constants_types.rb +14 -0
- data/lib/impala/protocol/opcodes_constants.rb +12 -0
- data/lib/impala/protocol/opcodes_types.rb +309 -0
- data/lib/impala/protocol/partitions_constants.rb +12 -0
- data/lib/impala/protocol/partitions_types.rb +44 -0
- data/lib/impala/protocol/plan_nodes_constants.rb +12 -0
- data/lib/impala/protocol/plan_nodes_types.rb +345 -0
- data/lib/impala/protocol/planner_constants.rb +12 -0
- data/lib/impala/protocol/planner_types.rb +78 -0
- data/lib/impala/protocol/runtime_profile_constants.rb +12 -0
- data/lib/impala/protocol/runtime_profile_types.rb +97 -0
- data/lib/impala/protocol/state_store_service.rb +244 -0
- data/lib/impala/protocol/state_store_service_constants.rb +12 -0
- data/lib/impala/protocol/state_store_service_types.rb +185 -0
- data/lib/impala/protocol/state_store_subscriber_service.rb +82 -0
- data/lib/impala/protocol/state_store_subscriber_service_constants.rb +12 -0
- data/lib/impala/protocol/state_store_subscriber_service_types.rb +67 -0
- data/lib/impala/protocol/statestore_types_constants.rb +12 -0
- data/lib/impala/protocol/statestore_types_types.rb +77 -0
- data/lib/impala/protocol/status_constants.rb +12 -0
- data/lib/impala/protocol/status_types.rb +44 -0
- data/lib/impala/protocol/thrift_hive_metastore.rb +4707 -0
- data/lib/impala/protocol/types_constants.rb +12 -0
- data/lib/impala/protocol/types_types.rb +86 -0
- data/lib/impala/version.rb +3 -0
- data/thrift/Data.thrift +52 -0
- data/thrift/DataSinks.thrift +61 -0
- data/thrift/Descriptors.thrift +115 -0
- data/thrift/Exprs.thrift +134 -0
- data/thrift/Frontend.thrift +193 -0
- data/thrift/ImpalaInternalService.thrift +265 -0
- data/thrift/ImpalaPlanService.thrift +44 -0
- data/thrift/ImpalaService.thrift +105 -0
- data/thrift/JavaConstants.thrift +60 -0
- data/thrift/Opcodes.thrift +317 -0
- data/thrift/Partitions.thrift +41 -0
- data/thrift/PlanNodes.thrift +184 -0
- data/thrift/Planner.thrift +72 -0
- data/thrift/RuntimeProfile.thrift +58 -0
- data/thrift/StateStoreService.thrift +121 -0
- data/thrift/StateStoreSubscriberService.thrift +64 -0
- data/thrift/StatestoreTypes.thrift +50 -0
- data/thrift/Status.thrift +31 -0
- data/thrift/Types.thrift +71 -0
- data/thrift/beeswax.thrift +175 -0
- data/thrift/fb303.thrift +112 -0
- data/thrift/hive_metastore.thrift +528 -0
- metadata +206 -0
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
|
|
8
|
+
module Impala
|
|
9
|
+
module Protocol
|
|
10
|
+
module Fb303
|
|
11
|
+
module Fb_status
|
|
12
|
+
DEAD = 0
|
|
13
|
+
STARTING = 1
|
|
14
|
+
ALIVE = 2
|
|
15
|
+
STOPPING = 3
|
|
16
|
+
STOPPED = 4
|
|
17
|
+
WARNING = 5
|
|
18
|
+
VALUE_MAP = { 0 => "DEAD", 1 => "STARTING", 2 => "ALIVE", 3 => "STOPPING", 4 => "STOPPED", 5 => "WARNING" }
|
|
19
|
+
VALID_VALUES = Set.new([DEAD, STARTING, ALIVE, STOPPING, STOPPED, WARNING]).freeze
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,347 @@
|
|
|
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 'impala_internal_service_types'
|
|
9
|
+
require 'plan_nodes_types'
|
|
10
|
+
require 'planner_types'
|
|
11
|
+
require 'descriptors_types'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
module Impala
|
|
15
|
+
module Protocol
|
|
16
|
+
module TDdlType
|
|
17
|
+
SHOW_TABLES = 0
|
|
18
|
+
SHOW_DBS = 1
|
|
19
|
+
USE = 2
|
|
20
|
+
DESCRIBE = 3
|
|
21
|
+
VALUE_MAP = { 0 => "SHOW_TABLES", 1 => "SHOW_DBS", 2 => "USE", 3 => "DESCRIBE" }
|
|
22
|
+
VALID_VALUES = Set.new([SHOW_TABLES, SHOW_DBS, USE, DESCRIBE]).freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class TGetTablesParams
|
|
26
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
27
|
+
DB = 1
|
|
28
|
+
PATTERN = 2
|
|
29
|
+
|
|
30
|
+
FIELDS = {
|
|
31
|
+
DB => { :type => ::Thrift::Types::STRING, :name => 'db', :optional => true },
|
|
32
|
+
PATTERN => { :type => ::Thrift::Types::STRING, :name => 'pattern', :optional => true }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
def struct_fields; FIELDS; end
|
|
36
|
+
|
|
37
|
+
def validate
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
::Thrift::Struct.generate_accessors self
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
class TGetTablesResult
|
|
44
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
45
|
+
TABLES = 1
|
|
46
|
+
|
|
47
|
+
FIELDS = {
|
|
48
|
+
TABLES => { :type => ::Thrift::Types::LIST, :name => 'tables', :element => { :type => ::Thrift::Types::STRING } }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def struct_fields; FIELDS; end
|
|
52
|
+
|
|
53
|
+
def validate
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
::Thrift::Struct.generate_accessors self
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
class TGetDbsParams
|
|
60
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
61
|
+
PATTERN = 1
|
|
62
|
+
|
|
63
|
+
FIELDS = {
|
|
64
|
+
PATTERN => { :type => ::Thrift::Types::STRING, :name => 'pattern', :optional => true }
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
def struct_fields; FIELDS; end
|
|
68
|
+
|
|
69
|
+
def validate
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
::Thrift::Struct.generate_accessors self
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
class TGetDbsResult
|
|
76
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
77
|
+
DBS = 1
|
|
78
|
+
|
|
79
|
+
FIELDS = {
|
|
80
|
+
DBS => { :type => ::Thrift::Types::LIST, :name => 'dbs', :element => { :type => ::Thrift::Types::STRING } }
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
def struct_fields; FIELDS; end
|
|
84
|
+
|
|
85
|
+
def validate
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
::Thrift::Struct.generate_accessors self
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
class TColumnDesc
|
|
92
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
93
|
+
COLUMNNAME = 1
|
|
94
|
+
COLUMNTYPE = 2
|
|
95
|
+
|
|
96
|
+
FIELDS = {
|
|
97
|
+
COLUMNNAME => { :type => ::Thrift::Types::STRING, :name => 'columnName' },
|
|
98
|
+
COLUMNTYPE => { :type => ::Thrift::Types::I32, :name => 'columnType', :enum_class => Impala::Protocol::TPrimitiveType }
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
def struct_fields; FIELDS; end
|
|
102
|
+
|
|
103
|
+
def validate
|
|
104
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnName is unset!') unless @columnName
|
|
105
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnType is unset!') unless @columnType
|
|
106
|
+
unless @columnType.nil? || Impala::Protocol::TPrimitiveType::VALID_VALUES.include?(@columnType)
|
|
107
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field columnType!')
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
::Thrift::Struct.generate_accessors self
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
class TDescribeTableParams
|
|
115
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
116
|
+
DB = 1
|
|
117
|
+
TABLE_NAME = 2
|
|
118
|
+
|
|
119
|
+
FIELDS = {
|
|
120
|
+
DB => { :type => ::Thrift::Types::STRING, :name => 'db', :optional => true },
|
|
121
|
+
TABLE_NAME => { :type => ::Thrift::Types::STRING, :name => 'table_name' }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
def struct_fields; FIELDS; end
|
|
125
|
+
|
|
126
|
+
def validate
|
|
127
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_name is unset!') unless @table_name
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
::Thrift::Struct.generate_accessors self
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
class TDescribeTableResult
|
|
134
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
135
|
+
COLUMNS = 1
|
|
136
|
+
|
|
137
|
+
FIELDS = {
|
|
138
|
+
COLUMNS => { :type => ::Thrift::Types::LIST, :name => 'columns', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TColumnDesc } }
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
def struct_fields; FIELDS; end
|
|
142
|
+
|
|
143
|
+
def validate
|
|
144
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
::Thrift::Struct.generate_accessors self
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
class TSessionState
|
|
151
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
152
|
+
DATABASE = 1
|
|
153
|
+
|
|
154
|
+
FIELDS = {
|
|
155
|
+
DATABASE => { :type => ::Thrift::Types::STRING, :name => 'database' }
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
def struct_fields; FIELDS; end
|
|
159
|
+
|
|
160
|
+
def validate
|
|
161
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field database is unset!') unless @database
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
::Thrift::Struct.generate_accessors self
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
class TClientRequest
|
|
168
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
169
|
+
STMT = 1
|
|
170
|
+
QUERYOPTIONS = 2
|
|
171
|
+
SESSIONSTATE = 3
|
|
172
|
+
|
|
173
|
+
FIELDS = {
|
|
174
|
+
STMT => { :type => ::Thrift::Types::STRING, :name => 'stmt' },
|
|
175
|
+
QUERYOPTIONS => { :type => ::Thrift::Types::STRUCT, :name => 'queryOptions', :class => Impala::Protocol::TQueryOptions },
|
|
176
|
+
SESSIONSTATE => { :type => ::Thrift::Types::STRUCT, :name => 'sessionState', :class => Impala::Protocol::TSessionState }
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
def struct_fields; FIELDS; end
|
|
180
|
+
|
|
181
|
+
def validate
|
|
182
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field stmt is unset!') unless @stmt
|
|
183
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field queryOptions is unset!') unless @queryOptions
|
|
184
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionState is unset!') unless @sessionState
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
::Thrift::Struct.generate_accessors self
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
class TResultSetMetadata
|
|
191
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
192
|
+
COLUMNDESCS = 1
|
|
193
|
+
|
|
194
|
+
FIELDS = {
|
|
195
|
+
COLUMNDESCS => { :type => ::Thrift::Types::LIST, :name => 'columnDescs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TColumnDesc } }
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
def struct_fields; FIELDS; end
|
|
199
|
+
|
|
200
|
+
def validate
|
|
201
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnDescs is unset!') unless @columnDescs
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
::Thrift::Struct.generate_accessors self
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
class TCatalogUpdate
|
|
208
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
209
|
+
TARGET_TABLE = 1
|
|
210
|
+
DB_NAME = 2
|
|
211
|
+
CREATED_PARTITIONS = 3
|
|
212
|
+
|
|
213
|
+
FIELDS = {
|
|
214
|
+
TARGET_TABLE => { :type => ::Thrift::Types::STRING, :name => 'target_table' },
|
|
215
|
+
DB_NAME => { :type => ::Thrift::Types::STRING, :name => 'db_name' },
|
|
216
|
+
CREATED_PARTITIONS => { :type => ::Thrift::Types::SET, :name => 'created_partitions', :element => { :type => ::Thrift::Types::STRING } }
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
def struct_fields; FIELDS; end
|
|
220
|
+
|
|
221
|
+
def validate
|
|
222
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field target_table is unset!') unless @target_table
|
|
223
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name
|
|
224
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field created_partitions is unset!') unless @created_partitions
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
::Thrift::Struct.generate_accessors self
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
class TFinalizeParams
|
|
231
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
232
|
+
IS_OVERWRITE = 1
|
|
233
|
+
HDFS_BASE_DIR = 2
|
|
234
|
+
TABLE_NAME = 3
|
|
235
|
+
TABLE_DB = 4
|
|
236
|
+
|
|
237
|
+
FIELDS = {
|
|
238
|
+
IS_OVERWRITE => { :type => ::Thrift::Types::BOOL, :name => 'is_overwrite' },
|
|
239
|
+
HDFS_BASE_DIR => { :type => ::Thrift::Types::STRING, :name => 'hdfs_base_dir' },
|
|
240
|
+
TABLE_NAME => { :type => ::Thrift::Types::STRING, :name => 'table_name' },
|
|
241
|
+
TABLE_DB => { :type => ::Thrift::Types::STRING, :name => 'table_db' }
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
def struct_fields; FIELDS; end
|
|
245
|
+
|
|
246
|
+
def validate
|
|
247
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_overwrite is unset!') if @is_overwrite.nil?
|
|
248
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hdfs_base_dir is unset!') unless @hdfs_base_dir
|
|
249
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_name is unset!') unless @table_name
|
|
250
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_db is unset!') unless @table_db
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
::Thrift::Struct.generate_accessors self
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
class TQueryExecRequest
|
|
257
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
258
|
+
DESC_TBL = 1
|
|
259
|
+
FRAGMENTS = 2
|
|
260
|
+
DEST_FRAGMENT_IDX = 3
|
|
261
|
+
PER_NODE_SCAN_RANGES = 4
|
|
262
|
+
RESULT_SET_METADATA = 5
|
|
263
|
+
FINALIZE_PARAMS = 6
|
|
264
|
+
QUERY_GLOBALS = 7
|
|
265
|
+
|
|
266
|
+
FIELDS = {
|
|
267
|
+
DESC_TBL => { :type => ::Thrift::Types::STRUCT, :name => 'desc_tbl', :class => Impala::Protocol::TDescriptorTable, :optional => true },
|
|
268
|
+
FRAGMENTS => { :type => ::Thrift::Types::LIST, :name => 'fragments', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TPlanFragment } },
|
|
269
|
+
DEST_FRAGMENT_IDX => { :type => ::Thrift::Types::LIST, :name => 'dest_fragment_idx', :element => { :type => ::Thrift::Types::I32 }, :optional => true },
|
|
270
|
+
PER_NODE_SCAN_RANGES => { :type => ::Thrift::Types::MAP, :name => 'per_node_scan_ranges', :key => { :type => ::Thrift::Types::I32 }, :value => { :type => ::Thrift::Types::LIST, :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TScanRangeLocations } }, :optional => true },
|
|
271
|
+
RESULT_SET_METADATA => { :type => ::Thrift::Types::STRUCT, :name => 'result_set_metadata', :class => Impala::Protocol::TResultSetMetadata, :optional => true },
|
|
272
|
+
FINALIZE_PARAMS => { :type => ::Thrift::Types::STRUCT, :name => 'finalize_params', :class => Impala::Protocol::TFinalizeParams, :optional => true },
|
|
273
|
+
QUERY_GLOBALS => { :type => ::Thrift::Types::STRUCT, :name => 'query_globals', :class => Impala::Protocol::TQueryGlobals }
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
def struct_fields; FIELDS; end
|
|
277
|
+
|
|
278
|
+
def validate
|
|
279
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fragments is unset!') unless @fragments
|
|
280
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field query_globals is unset!') unless @query_globals
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
::Thrift::Struct.generate_accessors self
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
class TDdlExecRequest
|
|
287
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
288
|
+
DDL_TYPE = 1
|
|
289
|
+
DATABASE = 2
|
|
290
|
+
DESCRIBE_TABLE = 3
|
|
291
|
+
SHOW_PATTERN = 4
|
|
292
|
+
|
|
293
|
+
FIELDS = {
|
|
294
|
+
DDL_TYPE => { :type => ::Thrift::Types::I32, :name => 'ddl_type', :enum_class => Impala::Protocol::TDdlType },
|
|
295
|
+
DATABASE => { :type => ::Thrift::Types::STRING, :name => 'database', :optional => true },
|
|
296
|
+
DESCRIBE_TABLE => { :type => ::Thrift::Types::STRING, :name => 'describe_table', :optional => true },
|
|
297
|
+
SHOW_PATTERN => { :type => ::Thrift::Types::STRING, :name => 'show_pattern', :optional => true }
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
def struct_fields; FIELDS; end
|
|
301
|
+
|
|
302
|
+
def validate
|
|
303
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field ddl_type is unset!') unless @ddl_type
|
|
304
|
+
unless @ddl_type.nil? || Impala::Protocol::TDdlType::VALID_VALUES.include?(@ddl_type)
|
|
305
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ddl_type!')
|
|
306
|
+
end
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
::Thrift::Struct.generate_accessors self
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
class TExecRequest
|
|
313
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
314
|
+
STMT_TYPE = 1
|
|
315
|
+
SQL_STMT = 2
|
|
316
|
+
REQUEST_ID = 3
|
|
317
|
+
QUERY_OPTIONS = 4
|
|
318
|
+
QUERY_EXEC_REQUEST = 5
|
|
319
|
+
DDL_EXEC_REQUEST = 6
|
|
320
|
+
RESULT_SET_METADATA = 7
|
|
321
|
+
|
|
322
|
+
FIELDS = {
|
|
323
|
+
STMT_TYPE => { :type => ::Thrift::Types::I32, :name => 'stmt_type', :enum_class => Impala::Protocol::TStmtType },
|
|
324
|
+
SQL_STMT => { :type => ::Thrift::Types::STRING, :name => 'sql_stmt', :optional => true },
|
|
325
|
+
REQUEST_ID => { :type => ::Thrift::Types::STRUCT, :name => 'request_id', :class => Impala::Protocol::TUniqueId },
|
|
326
|
+
QUERY_OPTIONS => { :type => ::Thrift::Types::STRUCT, :name => 'query_options', :class => Impala::Protocol::TQueryOptions },
|
|
327
|
+
QUERY_EXEC_REQUEST => { :type => ::Thrift::Types::STRUCT, :name => 'query_exec_request', :class => Impala::Protocol::TQueryExecRequest, :optional => true },
|
|
328
|
+
DDL_EXEC_REQUEST => { :type => ::Thrift::Types::STRUCT, :name => 'ddl_exec_request', :class => Impala::Protocol::TDdlExecRequest, :optional => true },
|
|
329
|
+
RESULT_SET_METADATA => { :type => ::Thrift::Types::STRUCT, :name => 'result_set_metadata', :class => Impala::Protocol::TResultSetMetadata, :optional => true }
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
def struct_fields; FIELDS; end
|
|
333
|
+
|
|
334
|
+
def validate
|
|
335
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field stmt_type is unset!') unless @stmt_type
|
|
336
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field request_id is unset!') unless @request_id
|
|
337
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field query_options is unset!') unless @query_options
|
|
338
|
+
unless @stmt_type.nil? || Impala::Protocol::TStmtType::VALID_VALUES.include?(@stmt_type)
|
|
339
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field stmt_type!')
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
::Thrift::Struct.generate_accessors self
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
end
|
|
347
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
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 'hive_metastore_types'
|
|
8
|
+
|
|
9
|
+
module Impala
|
|
10
|
+
module Protocol
|
|
11
|
+
module HiveMetastore
|
|
12
|
+
DDL_TIME = %q"transient_lastDdlTime"
|
|
13
|
+
|
|
14
|
+
HIVE_FILTER_FIELD_OWNER = %q"hive_filter_field_owner__"
|
|
15
|
+
|
|
16
|
+
HIVE_FILTER_FIELD_PARAMS = %q"hive_filter_field_params__"
|
|
17
|
+
|
|
18
|
+
HIVE_FILTER_FIELD_LAST_ACCESS = %q"hive_filter_field_last_access__"
|
|
19
|
+
|
|
20
|
+
IS_ARCHIVED = %q"is_archived"
|
|
21
|
+
|
|
22
|
+
ORIGINAL_LOCATION = %q"original_location"
|
|
23
|
+
|
|
24
|
+
META_TABLE_COLUMNS = %q"columns"
|
|
25
|
+
|
|
26
|
+
META_TABLE_COLUMN_TYPES = %q"columns.types"
|
|
27
|
+
|
|
28
|
+
BUCKET_FIELD_NAME = %q"bucket_field_name"
|
|
29
|
+
|
|
30
|
+
BUCKET_COUNT = %q"bucket_count"
|
|
31
|
+
|
|
32
|
+
FIELD_TO_DIMENSION = %q"field_to_dimension"
|
|
33
|
+
|
|
34
|
+
META_TABLE_NAME = %q"name"
|
|
35
|
+
|
|
36
|
+
META_TABLE_DB = %q"db"
|
|
37
|
+
|
|
38
|
+
META_TABLE_LOCATION = %q"location"
|
|
39
|
+
|
|
40
|
+
META_TABLE_SERDE = %q"serde"
|
|
41
|
+
|
|
42
|
+
META_TABLE_PARTITION_COLUMNS = %q"partition_columns"
|
|
43
|
+
|
|
44
|
+
FILE_INPUT_FORMAT = %q"file.inputformat"
|
|
45
|
+
|
|
46
|
+
FILE_OUTPUT_FORMAT = %q"file.outputformat"
|
|
47
|
+
|
|
48
|
+
META_TABLE_STORAGE = %q"storage_handler"
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|