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,192 @@
|
|
|
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
|
+
|
|
10
|
+
module Impala
|
|
11
|
+
module Protocol
|
|
12
|
+
module Beeswax
|
|
13
|
+
module QueryState
|
|
14
|
+
CREATED = 0
|
|
15
|
+
INITIALIZED = 1
|
|
16
|
+
COMPILED = 2
|
|
17
|
+
RUNNING = 3
|
|
18
|
+
FINISHED = 4
|
|
19
|
+
EXCEPTION = 5
|
|
20
|
+
VALUE_MAP = { 0 => "CREATED", 1 => "INITIALIZED", 2 => "COMPILED", 3 => "RUNNING", 4 => "FINISHED", 5 => "EXCEPTION" }
|
|
21
|
+
VALID_VALUES = Set.new([CREATED, INITIALIZED, COMPILED, RUNNING, FINISHED, EXCEPTION]).freeze
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
class Query
|
|
25
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
26
|
+
QUERY = 1
|
|
27
|
+
CONFIGURATION = 3
|
|
28
|
+
HADOOP_USER = 4
|
|
29
|
+
|
|
30
|
+
FIELDS = {
|
|
31
|
+
QUERY => { :type => ::Thrift::Types::STRING, :name => 'query' },
|
|
32
|
+
CONFIGURATION => { :type => ::Thrift::Types::LIST, :name => 'configuration', :element => { :type => ::Thrift::Types::STRING } },
|
|
33
|
+
HADOOP_USER => { :type => ::Thrift::Types::STRING, :name => 'hadoop_user' }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
def struct_fields; FIELDS; end
|
|
37
|
+
|
|
38
|
+
def validate
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
::Thrift::Struct.generate_accessors self
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
class QueryHandle
|
|
45
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
46
|
+
ID = 1
|
|
47
|
+
LOG_CONTEXT = 2
|
|
48
|
+
|
|
49
|
+
FIELDS = {
|
|
50
|
+
ID => { :type => ::Thrift::Types::STRING, :name => 'id' },
|
|
51
|
+
LOG_CONTEXT => { :type => ::Thrift::Types::STRING, :name => 'log_context' }
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
def struct_fields; FIELDS; end
|
|
55
|
+
|
|
56
|
+
def validate
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
::Thrift::Struct.generate_accessors self
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
class QueryExplanation
|
|
63
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
64
|
+
TEXTUAL = 1
|
|
65
|
+
|
|
66
|
+
FIELDS = {
|
|
67
|
+
TEXTUAL => { :type => ::Thrift::Types::STRING, :name => 'textual' }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
def struct_fields; FIELDS; end
|
|
71
|
+
|
|
72
|
+
def validate
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
::Thrift::Struct.generate_accessors self
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
class Results
|
|
79
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
80
|
+
READY = 1
|
|
81
|
+
COLUMNS = 2
|
|
82
|
+
DATA = 3
|
|
83
|
+
START_ROW = 4
|
|
84
|
+
HAS_MORE = 5
|
|
85
|
+
|
|
86
|
+
FIELDS = {
|
|
87
|
+
READY => { :type => ::Thrift::Types::BOOL, :name => 'ready' },
|
|
88
|
+
COLUMNS => { :type => ::Thrift::Types::LIST, :name => 'columns', :element => { :type => ::Thrift::Types::STRING } },
|
|
89
|
+
DATA => { :type => ::Thrift::Types::LIST, :name => 'data', :element => { :type => ::Thrift::Types::STRING } },
|
|
90
|
+
START_ROW => { :type => ::Thrift::Types::I64, :name => 'start_row' },
|
|
91
|
+
HAS_MORE => { :type => ::Thrift::Types::BOOL, :name => 'has_more' }
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
def struct_fields; FIELDS; end
|
|
95
|
+
|
|
96
|
+
def validate
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
::Thrift::Struct.generate_accessors self
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Metadata information about the results.
|
|
103
|
+
# Applicable only for SELECT.
|
|
104
|
+
class ResultsMetadata
|
|
105
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
106
|
+
SCHEMA = 1
|
|
107
|
+
TABLE_DIR = 2
|
|
108
|
+
IN_TABLENAME = 3
|
|
109
|
+
DELIM = 4
|
|
110
|
+
|
|
111
|
+
FIELDS = {
|
|
112
|
+
# The schema of the results
|
|
113
|
+
SCHEMA => { :type => ::Thrift::Types::STRUCT, :name => 'schema', :class => Impala::Protocol::HiveMetastore::Schema },
|
|
114
|
+
# The directory containing the results. Not applicable for partition table.
|
|
115
|
+
TABLE_DIR => { :type => ::Thrift::Types::STRING, :name => 'table_dir' },
|
|
116
|
+
# If the results are straight from an existing table, the table name.
|
|
117
|
+
IN_TABLENAME => { :type => ::Thrift::Types::STRING, :name => 'in_tablename' },
|
|
118
|
+
# Field delimiter
|
|
119
|
+
DELIM => { :type => ::Thrift::Types::STRING, :name => 'delim' }
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
def struct_fields; FIELDS; end
|
|
123
|
+
|
|
124
|
+
def validate
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
::Thrift::Struct.generate_accessors self
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
class BeeswaxException < ::Thrift::Exception
|
|
131
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
132
|
+
MESSAGE = 1
|
|
133
|
+
LOG_CONTEXT = 2
|
|
134
|
+
HANDLE = 3
|
|
135
|
+
ERRORCODE = 4
|
|
136
|
+
SQLSTATE = 5
|
|
137
|
+
|
|
138
|
+
FIELDS = {
|
|
139
|
+
MESSAGE => { :type => ::Thrift::Types::STRING, :name => 'message' },
|
|
140
|
+
LOG_CONTEXT => { :type => ::Thrift::Types::STRING, :name => 'log_context' },
|
|
141
|
+
HANDLE => { :type => ::Thrift::Types::STRUCT, :name => 'handle', :class => Impala::Protocol::Beeswax::QueryHandle },
|
|
142
|
+
ERRORCODE => { :type => ::Thrift::Types::I32, :name => 'errorCode', :default => 0, :optional => true },
|
|
143
|
+
SQLSTATE => { :type => ::Thrift::Types::STRING, :name => 'SQLState', :default => %q" ", :optional => true }
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
def struct_fields; FIELDS; end
|
|
147
|
+
|
|
148
|
+
def validate
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
::Thrift::Struct.generate_accessors self
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
class QueryNotFoundException < ::Thrift::Exception
|
|
155
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
156
|
+
|
|
157
|
+
FIELDS = {
|
|
158
|
+
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
def struct_fields; FIELDS; end
|
|
162
|
+
|
|
163
|
+
def validate
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
::Thrift::Struct.generate_accessors self
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Represents a Hadoop-style configuration variable.
|
|
170
|
+
class ConfigVariable
|
|
171
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
172
|
+
KEY = 1
|
|
173
|
+
VALUE = 2
|
|
174
|
+
DESCRIPTION = 3
|
|
175
|
+
|
|
176
|
+
FIELDS = {
|
|
177
|
+
KEY => { :type => ::Thrift::Types::STRING, :name => 'key' },
|
|
178
|
+
VALUE => { :type => ::Thrift::Types::STRING, :name => 'value' },
|
|
179
|
+
DESCRIPTION => { :type => ::Thrift::Types::STRING, :name => 'description' }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
def struct_fields; FIELDS; end
|
|
183
|
+
|
|
184
|
+
def validate
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
::Thrift::Struct.generate_accessors self
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
require 'types_types'
|
|
9
|
+
require 'descriptors_types'
|
|
10
|
+
require 'partitions_types'
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
module Impala
|
|
14
|
+
module Protocol
|
|
15
|
+
module TDataSinkType
|
|
16
|
+
DATA_STREAM_SINK = 0
|
|
17
|
+
TABLE_SINK = 1
|
|
18
|
+
VALUE_MAP = { 0 => "DATA_STREAM_SINK", 1 => "TABLE_SINK" }
|
|
19
|
+
VALID_VALUES = Set.new([DATA_STREAM_SINK, TABLE_SINK]).freeze
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
class TDataStreamSink
|
|
23
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
24
|
+
DEST_NODE_ID = 1
|
|
25
|
+
OUTPUT_PARTITION = 2
|
|
26
|
+
|
|
27
|
+
FIELDS = {
|
|
28
|
+
DEST_NODE_ID => { :type => ::Thrift::Types::I32, :name => 'dest_node_id' },
|
|
29
|
+
OUTPUT_PARTITION => { :type => ::Thrift::Types::STRUCT, :name => 'output_partition', :class => Impala::Protocol::TDataPartition }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
def struct_fields; FIELDS; end
|
|
33
|
+
|
|
34
|
+
def validate
|
|
35
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dest_node_id is unset!') unless @dest_node_id
|
|
36
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field output_partition is unset!') unless @output_partition
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
::Thrift::Struct.generate_accessors self
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
class THdfsTableSink
|
|
43
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
44
|
+
PARTITION_KEY_EXPRS = 1
|
|
45
|
+
OVERWRITE = 2
|
|
46
|
+
|
|
47
|
+
FIELDS = {
|
|
48
|
+
PARTITION_KEY_EXPRS => { :type => ::Thrift::Types::LIST, :name => 'partition_key_exprs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr } },
|
|
49
|
+
OVERWRITE => { :type => ::Thrift::Types::BOOL, :name => 'overwrite' }
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
def struct_fields; FIELDS; end
|
|
53
|
+
|
|
54
|
+
def validate
|
|
55
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partition_key_exprs is unset!') unless @partition_key_exprs
|
|
56
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field overwrite is unset!') if @overwrite.nil?
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
::Thrift::Struct.generate_accessors self
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
class TTableSink
|
|
63
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
64
|
+
TARGET_TABLE_ID = 1
|
|
65
|
+
HDFS_TABLE_SINK = 2
|
|
66
|
+
|
|
67
|
+
FIELDS = {
|
|
68
|
+
TARGET_TABLE_ID => { :type => ::Thrift::Types::I32, :name => 'target_table_id' },
|
|
69
|
+
HDFS_TABLE_SINK => { :type => ::Thrift::Types::STRUCT, :name => 'hdfs_table_sink', :class => Impala::Protocol::THdfsTableSink }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
def struct_fields; FIELDS; end
|
|
73
|
+
|
|
74
|
+
def validate
|
|
75
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field target_table_id is unset!') unless @target_table_id
|
|
76
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hdfs_table_sink is unset!') unless @hdfs_table_sink
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
::Thrift::Struct.generate_accessors self
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
class TDataSink
|
|
83
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
84
|
+
TYPE = 1
|
|
85
|
+
STREAM_SINK = 2
|
|
86
|
+
TABLE_SINK = 3
|
|
87
|
+
|
|
88
|
+
FIELDS = {
|
|
89
|
+
TYPE => { :type => ::Thrift::Types::I32, :name => 'type', :enum_class => Impala::Protocol::TDataSinkType },
|
|
90
|
+
STREAM_SINK => { :type => ::Thrift::Types::STRUCT, :name => 'stream_sink', :class => Impala::Protocol::TDataStreamSink, :optional => true },
|
|
91
|
+
TABLE_SINK => { :type => ::Thrift::Types::STRUCT, :name => 'table_sink', :class => Impala::Protocol::TTableSink, :optional => true }
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
def struct_fields; FIELDS; end
|
|
95
|
+
|
|
96
|
+
def validate
|
|
97
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
|
|
98
|
+
unless @type.nil? || Impala::Protocol::TDataSinkType::VALID_VALUES.include?(@type)
|
|
99
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
::Thrift::Struct.generate_accessors self
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
|
|
9
|
+
|
|
10
|
+
module Impala
|
|
11
|
+
module Protocol
|
|
12
|
+
class TRowBatch
|
|
13
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
14
|
+
NUM_ROWS = 1
|
|
15
|
+
ROW_TUPLES = 2
|
|
16
|
+
TUPLE_OFFSETS = 3
|
|
17
|
+
TUPLE_DATA = 4
|
|
18
|
+
|
|
19
|
+
FIELDS = {
|
|
20
|
+
NUM_ROWS => { :type => ::Thrift::Types::I32, :name => 'num_rows' },
|
|
21
|
+
ROW_TUPLES => { :type => ::Thrift::Types::LIST, :name => 'row_tuples', :element => { :type => ::Thrift::Types::I32 } },
|
|
22
|
+
TUPLE_OFFSETS => { :type => ::Thrift::Types::LIST, :name => 'tuple_offsets', :element => { :type => ::Thrift::Types::I32 } },
|
|
23
|
+
TUPLE_DATA => { :type => ::Thrift::Types::LIST, :name => 'tuple_data', :element => { :type => ::Thrift::Types::STRING } }
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
def struct_fields; FIELDS; end
|
|
27
|
+
|
|
28
|
+
def validate
|
|
29
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_rows is unset!') unless @num_rows
|
|
30
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field row_tuples is unset!') unless @row_tuples
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
::Thrift::Struct.generate_accessors self
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
class TColumnValue
|
|
37
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
38
|
+
BOOLVAL = 1
|
|
39
|
+
INTVAL = 2
|
|
40
|
+
LONGVAL = 3
|
|
41
|
+
DOUBLEVAL = 4
|
|
42
|
+
STRINGVAL = 5
|
|
43
|
+
|
|
44
|
+
FIELDS = {
|
|
45
|
+
BOOLVAL => { :type => ::Thrift::Types::BOOL, :name => 'boolVal', :optional => true },
|
|
46
|
+
INTVAL => { :type => ::Thrift::Types::I32, :name => 'intVal', :optional => true },
|
|
47
|
+
LONGVAL => { :type => ::Thrift::Types::I64, :name => 'longVal', :optional => true },
|
|
48
|
+
DOUBLEVAL => { :type => ::Thrift::Types::DOUBLE, :name => 'doubleVal', :optional => true },
|
|
49
|
+
STRINGVAL => { :type => ::Thrift::Types::STRING, :name => 'stringVal', :optional => true }
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
def struct_fields; FIELDS; end
|
|
53
|
+
|
|
54
|
+
def validate
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
::Thrift::Struct.generate_accessors self
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
class TResultRow
|
|
61
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
62
|
+
COLVALS = 1
|
|
63
|
+
|
|
64
|
+
FIELDS = {
|
|
65
|
+
COLVALS => { :type => ::Thrift::Types::LIST, :name => 'colVals', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TColumnValue } }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
def struct_fields; FIELDS; end
|
|
69
|
+
|
|
70
|
+
def validate
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
::Thrift::Struct.generate_accessors self
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,266 @@
|
|
|
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 'exprs_types'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module Impala
|
|
12
|
+
module Protocol
|
|
13
|
+
module TTableType
|
|
14
|
+
HDFS_TABLE = 0
|
|
15
|
+
HBASE_TABLE = 1
|
|
16
|
+
VALUE_MAP = { 0 => "HDFS_TABLE", 1 => "HBASE_TABLE" }
|
|
17
|
+
VALID_VALUES = Set.new([HDFS_TABLE, HBASE_TABLE]).freeze
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
module THdfsFileFormat
|
|
21
|
+
TEXT = 0
|
|
22
|
+
LZO_TEXT = 1
|
|
23
|
+
RC_FILE = 2
|
|
24
|
+
SEQUENCE_FILE = 3
|
|
25
|
+
TREVNI = 4
|
|
26
|
+
VALUE_MAP = { 0 => "TEXT", 1 => "LZO_TEXT", 2 => "RC_FILE", 3 => "SEQUENCE_FILE", 4 => "TREVNI" }
|
|
27
|
+
VALID_VALUES = Set.new([TEXT, LZO_TEXT, RC_FILE, SEQUENCE_FILE, TREVNI]).freeze
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
module THdfsCompression
|
|
31
|
+
NONE = 0
|
|
32
|
+
DEFAULT = 1
|
|
33
|
+
GZIP = 2
|
|
34
|
+
BZIP2 = 3
|
|
35
|
+
SNAPPY = 4
|
|
36
|
+
SNAPPY_BLOCKED = 5
|
|
37
|
+
VALUE_MAP = { 0 => "NONE", 1 => "DEFAULT", 2 => "GZIP", 3 => "BZIP2", 4 => "SNAPPY", 5 => "SNAPPY_BLOCKED" }
|
|
38
|
+
VALID_VALUES = Set.new([NONE, DEFAULT, GZIP, BZIP2, SNAPPY, SNAPPY_BLOCKED]).freeze
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class TSlotDescriptor
|
|
42
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
43
|
+
ID = 1
|
|
44
|
+
PARENT = 2
|
|
45
|
+
SLOTTYPE = 3
|
|
46
|
+
COLUMNPOS = 4
|
|
47
|
+
BYTEOFFSET = 5
|
|
48
|
+
NULLINDICATORBYTE = 6
|
|
49
|
+
NULLINDICATORBIT = 7
|
|
50
|
+
SLOTIDX = 9
|
|
51
|
+
ISMATERIALIZED = 10
|
|
52
|
+
|
|
53
|
+
FIELDS = {
|
|
54
|
+
ID => { :type => ::Thrift::Types::I32, :name => 'id' },
|
|
55
|
+
PARENT => { :type => ::Thrift::Types::I32, :name => 'parent' },
|
|
56
|
+
SLOTTYPE => { :type => ::Thrift::Types::I32, :name => 'slotType', :enum_class => Impala::Protocol::TPrimitiveType },
|
|
57
|
+
COLUMNPOS => { :type => ::Thrift::Types::I32, :name => 'columnPos' },
|
|
58
|
+
BYTEOFFSET => { :type => ::Thrift::Types::I32, :name => 'byteOffset' },
|
|
59
|
+
NULLINDICATORBYTE => { :type => ::Thrift::Types::I32, :name => 'nullIndicatorByte' },
|
|
60
|
+
NULLINDICATORBIT => { :type => ::Thrift::Types::I32, :name => 'nullIndicatorBit' },
|
|
61
|
+
SLOTIDX => { :type => ::Thrift::Types::I32, :name => 'slotIdx' },
|
|
62
|
+
ISMATERIALIZED => { :type => ::Thrift::Types::BOOL, :name => 'isMaterialized' }
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
def struct_fields; FIELDS; end
|
|
66
|
+
|
|
67
|
+
def validate
|
|
68
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
|
|
69
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parent is unset!') unless @parent
|
|
70
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field slotType is unset!') unless @slotType
|
|
71
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnPos is unset!') unless @columnPos
|
|
72
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field byteOffset is unset!') unless @byteOffset
|
|
73
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nullIndicatorByte is unset!') unless @nullIndicatorByte
|
|
74
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nullIndicatorBit is unset!') unless @nullIndicatorBit
|
|
75
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field slotIdx is unset!') unless @slotIdx
|
|
76
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isMaterialized is unset!') if @isMaterialized.nil?
|
|
77
|
+
unless @slotType.nil? || Impala::Protocol::TPrimitiveType::VALID_VALUES.include?(@slotType)
|
|
78
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field slotType!')
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
::Thrift::Struct.generate_accessors self
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
class THdfsPartition
|
|
86
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
87
|
+
LINEDELIM = 1
|
|
88
|
+
FIELDDELIM = 2
|
|
89
|
+
COLLECTIONDELIM = 3
|
|
90
|
+
MAPKEYDELIM = 4
|
|
91
|
+
ESCAPECHAR = 5
|
|
92
|
+
FILEFORMAT = 6
|
|
93
|
+
PARTITIONKEYEXPRS = 7
|
|
94
|
+
BLOCKSIZE = 8
|
|
95
|
+
COMPRESSION = 9
|
|
96
|
+
|
|
97
|
+
FIELDS = {
|
|
98
|
+
LINEDELIM => { :type => ::Thrift::Types::BYTE, :name => 'lineDelim' },
|
|
99
|
+
FIELDDELIM => { :type => ::Thrift::Types::BYTE, :name => 'fieldDelim' },
|
|
100
|
+
COLLECTIONDELIM => { :type => ::Thrift::Types::BYTE, :name => 'collectionDelim' },
|
|
101
|
+
MAPKEYDELIM => { :type => ::Thrift::Types::BYTE, :name => 'mapKeyDelim' },
|
|
102
|
+
ESCAPECHAR => { :type => ::Thrift::Types::BYTE, :name => 'escapeChar' },
|
|
103
|
+
FILEFORMAT => { :type => ::Thrift::Types::I32, :name => 'fileFormat', :enum_class => Impala::Protocol::THdfsFileFormat },
|
|
104
|
+
PARTITIONKEYEXPRS => { :type => ::Thrift::Types::LIST, :name => 'partitionKeyExprs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr } },
|
|
105
|
+
BLOCKSIZE => { :type => ::Thrift::Types::I32, :name => 'blockSize' },
|
|
106
|
+
COMPRESSION => { :type => ::Thrift::Types::I32, :name => 'compression', :enum_class => Impala::Protocol::THdfsCompression }
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
def struct_fields; FIELDS; end
|
|
110
|
+
|
|
111
|
+
def validate
|
|
112
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lineDelim is unset!') unless @lineDelim
|
|
113
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fieldDelim is unset!') unless @fieldDelim
|
|
114
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field collectionDelim is unset!') unless @collectionDelim
|
|
115
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field mapKeyDelim is unset!') unless @mapKeyDelim
|
|
116
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field escapeChar is unset!') unless @escapeChar
|
|
117
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileFormat is unset!') unless @fileFormat
|
|
118
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field blockSize is unset!') unless @blockSize
|
|
119
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field compression is unset!') unless @compression
|
|
120
|
+
unless @fileFormat.nil? || Impala::Protocol::THdfsFileFormat::VALID_VALUES.include?(@fileFormat)
|
|
121
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field fileFormat!')
|
|
122
|
+
end
|
|
123
|
+
unless @compression.nil? || Impala::Protocol::THdfsCompression::VALID_VALUES.include?(@compression)
|
|
124
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field compression!')
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
::Thrift::Struct.generate_accessors self
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
class THdfsTable
|
|
132
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
133
|
+
HDFSBASEDIR = 1
|
|
134
|
+
PARTITIONKEYNAMES = 2
|
|
135
|
+
NULLPARTITIONKEYVALUE = 3
|
|
136
|
+
PARTITIONS = 4
|
|
137
|
+
|
|
138
|
+
FIELDS = {
|
|
139
|
+
HDFSBASEDIR => { :type => ::Thrift::Types::STRING, :name => 'hdfsBaseDir' },
|
|
140
|
+
PARTITIONKEYNAMES => { :type => ::Thrift::Types::LIST, :name => 'partitionKeyNames', :element => { :type => ::Thrift::Types::STRING } },
|
|
141
|
+
NULLPARTITIONKEYVALUE => { :type => ::Thrift::Types::STRING, :name => 'nullPartitionKeyValue' },
|
|
142
|
+
PARTITIONS => { :type => ::Thrift::Types::MAP, :name => 'partitions', :key => { :type => ::Thrift::Types::I64 }, :value => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::THdfsPartition } }
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
def struct_fields; FIELDS; end
|
|
146
|
+
|
|
147
|
+
def validate
|
|
148
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hdfsBaseDir is unset!') unless @hdfsBaseDir
|
|
149
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitionKeyNames is unset!') unless @partitionKeyNames
|
|
150
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nullPartitionKeyValue is unset!') unless @nullPartitionKeyValue
|
|
151
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitions is unset!') unless @partitions
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
::Thrift::Struct.generate_accessors self
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
class THBaseTable
|
|
158
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
159
|
+
TABLENAME = 1
|
|
160
|
+
FAMILIES = 2
|
|
161
|
+
QUALIFIERS = 3
|
|
162
|
+
|
|
163
|
+
FIELDS = {
|
|
164
|
+
TABLENAME => { :type => ::Thrift::Types::STRING, :name => 'tableName' },
|
|
165
|
+
FAMILIES => { :type => ::Thrift::Types::LIST, :name => 'families', :element => { :type => ::Thrift::Types::STRING } },
|
|
166
|
+
QUALIFIERS => { :type => ::Thrift::Types::LIST, :name => 'qualifiers', :element => { :type => ::Thrift::Types::STRING } }
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
def struct_fields; FIELDS; end
|
|
170
|
+
|
|
171
|
+
def validate
|
|
172
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName
|
|
173
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field families is unset!') unless @families
|
|
174
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field qualifiers is unset!') unless @qualifiers
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
::Thrift::Struct.generate_accessors self
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
class TTableDescriptor
|
|
181
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
182
|
+
ID = 1
|
|
183
|
+
TABLETYPE = 2
|
|
184
|
+
NUMCOLS = 3
|
|
185
|
+
NUMCLUSTERINGCOLS = 4
|
|
186
|
+
HDFSTABLE = 5
|
|
187
|
+
HBASETABLE = 6
|
|
188
|
+
TABLENAME = 7
|
|
189
|
+
DBNAME = 8
|
|
190
|
+
|
|
191
|
+
FIELDS = {
|
|
192
|
+
ID => { :type => ::Thrift::Types::I32, :name => 'id' },
|
|
193
|
+
TABLETYPE => { :type => ::Thrift::Types::I32, :name => 'tableType', :enum_class => Impala::Protocol::TTableType },
|
|
194
|
+
NUMCOLS => { :type => ::Thrift::Types::I32, :name => 'numCols' },
|
|
195
|
+
NUMCLUSTERINGCOLS => { :type => ::Thrift::Types::I32, :name => 'numClusteringCols' },
|
|
196
|
+
HDFSTABLE => { :type => ::Thrift::Types::STRUCT, :name => 'hdfsTable', :class => Impala::Protocol::THdfsTable, :optional => true },
|
|
197
|
+
HBASETABLE => { :type => ::Thrift::Types::STRUCT, :name => 'hbaseTable', :class => Impala::Protocol::THBaseTable, :optional => true },
|
|
198
|
+
TABLENAME => { :type => ::Thrift::Types::STRING, :name => 'tableName' },
|
|
199
|
+
DBNAME => { :type => ::Thrift::Types::STRING, :name => 'dbName' }
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
def struct_fields; FIELDS; end
|
|
203
|
+
|
|
204
|
+
def validate
|
|
205
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
|
|
206
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableType is unset!') unless @tableType
|
|
207
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numCols is unset!') unless @numCols
|
|
208
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numClusteringCols is unset!') unless @numClusteringCols
|
|
209
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName
|
|
210
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
|
|
211
|
+
unless @tableType.nil? || Impala::Protocol::TTableType::VALID_VALUES.include?(@tableType)
|
|
212
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field tableType!')
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
::Thrift::Struct.generate_accessors self
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
class TTupleDescriptor
|
|
220
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
221
|
+
ID = 1
|
|
222
|
+
BYTESIZE = 2
|
|
223
|
+
NUMNULLBYTES = 3
|
|
224
|
+
TABLEID = 4
|
|
225
|
+
|
|
226
|
+
FIELDS = {
|
|
227
|
+
ID => { :type => ::Thrift::Types::I32, :name => 'id' },
|
|
228
|
+
BYTESIZE => { :type => ::Thrift::Types::I32, :name => 'byteSize' },
|
|
229
|
+
NUMNULLBYTES => { :type => ::Thrift::Types::I32, :name => 'numNullBytes' },
|
|
230
|
+
TABLEID => { :type => ::Thrift::Types::I32, :name => 'tableId', :optional => true }
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
def struct_fields; FIELDS; end
|
|
234
|
+
|
|
235
|
+
def validate
|
|
236
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
|
|
237
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field byteSize is unset!') unless @byteSize
|
|
238
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNullBytes is unset!') unless @numNullBytes
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
::Thrift::Struct.generate_accessors self
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
class TDescriptorTable
|
|
245
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
246
|
+
SLOTDESCRIPTORS = 1
|
|
247
|
+
TUPLEDESCRIPTORS = 2
|
|
248
|
+
TABLEDESCRIPTORS = 3
|
|
249
|
+
|
|
250
|
+
FIELDS = {
|
|
251
|
+
SLOTDESCRIPTORS => { :type => ::Thrift::Types::LIST, :name => 'slotDescriptors', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TSlotDescriptor }, :optional => true },
|
|
252
|
+
TUPLEDESCRIPTORS => { :type => ::Thrift::Types::LIST, :name => 'tupleDescriptors', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TTupleDescriptor } },
|
|
253
|
+
TABLEDESCRIPTORS => { :type => ::Thrift::Types::LIST, :name => 'tableDescriptors', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TTableDescriptor }, :optional => true }
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
def struct_fields; FIELDS; end
|
|
257
|
+
|
|
258
|
+
def validate
|
|
259
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tupleDescriptors is unset!') unless @tupleDescriptors
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
::Thrift::Struct.generate_accessors self
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
end
|
|
266
|
+
end
|