impala 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -2
- data/impala.gemspec +1 -2
- data/lib/impala.rb +1 -1
- data/lib/impala/cursor.rb +10 -4
- data/lib/impala/protocol/beeswax_constants.rb +2 -1
- data/lib/impala/protocol/beeswax_service.rb +46 -46
- data/lib/impala/protocol/beeswax_types.rb +31 -30
- data/lib/impala/protocol/cli_service_constants.rb +60 -0
- data/lib/impala/protocol/cli_service_types.rb +1452 -0
- data/lib/impala/protocol/facebook_service.rb +17 -17
- data/lib/impala/protocol/fb303_constants.rb +2 -1
- data/lib/impala/protocol/fb303_types.rb +3 -2
- data/lib/impala/protocol/hive_metastore_constants.rb +2 -1
- data/lib/impala/protocol/hive_metastore_types.rb +102 -101
- data/lib/impala/protocol/impala_hive_server2_service.rb +29 -0
- data/lib/impala/protocol/impala_service.rb +135 -18
- data/lib/impala/protocol/impala_service_constants.rb +2 -1
- data/lib/impala/protocol/impala_service_types.rb +54 -10
- data/lib/impala/protocol/status_constants.rb +2 -1
- data/lib/impala/protocol/status_types.rb +9 -7
- data/lib/impala/protocol/t_c_l_i_service.rb +948 -0
- data/lib/impala/protocol/thrift_hive_metastore.rb +507 -507
- data/lib/impala/version.rb +1 -1
- data/test/test_impala_connected.rb +93 -13
- data/thrift/ImpalaService.thrift +78 -6
- data/thrift/Status.thrift +2 -1
- data/thrift/beeswax.thrift +1 -1
- data/thrift/cli_service.thrift +1015 -0
- metadata +9 -75
- data/lib/impala/protocol/data_constants.rb +0 -12
- data/lib/impala/protocol/data_sinks_constants.rb +0 -12
- data/lib/impala/protocol/data_sinks_types.rb +0 -107
- data/lib/impala/protocol/data_types.rb +0 -77
- data/lib/impala/protocol/descriptors_constants.rb +0 -12
- data/lib/impala/protocol/descriptors_types.rb +0 -266
- data/lib/impala/protocol/exprs_constants.rb +0 -12
- data/lib/impala/protocol/exprs_types.rb +0 -345
- data/lib/impala/protocol/frontend_constants.rb +0 -12
- data/lib/impala/protocol/frontend_types.rb +0 -347
- data/lib/impala/protocol/impala_internal_service.rb +0 -244
- data/lib/impala/protocol/impala_internal_service_constants.rb +0 -12
- data/lib/impala/protocol/impala_internal_service_types.rb +0 -362
- data/lib/impala/protocol/impala_plan_service.rb +0 -310
- data/lib/impala/protocol/impala_plan_service_constants.rb +0 -12
- data/lib/impala/protocol/impala_plan_service_types.rb +0 -36
- data/lib/impala/protocol/java_constants_constants.rb +0 -42
- data/lib/impala/protocol/java_constants_types.rb +0 -14
- data/lib/impala/protocol/opcodes_constants.rb +0 -12
- data/lib/impala/protocol/opcodes_types.rb +0 -309
- data/lib/impala/protocol/partitions_constants.rb +0 -12
- data/lib/impala/protocol/partitions_types.rb +0 -44
- data/lib/impala/protocol/plan_nodes_constants.rb +0 -12
- data/lib/impala/protocol/plan_nodes_types.rb +0 -345
- data/lib/impala/protocol/planner_constants.rb +0 -12
- data/lib/impala/protocol/planner_types.rb +0 -78
- data/lib/impala/protocol/runtime_profile_constants.rb +0 -12
- data/lib/impala/protocol/runtime_profile_types.rb +0 -97
- data/lib/impala/protocol/state_store_service.rb +0 -244
- data/lib/impala/protocol/state_store_service_constants.rb +0 -12
- data/lib/impala/protocol/state_store_service_types.rb +0 -185
- data/lib/impala/protocol/state_store_subscriber_service.rb +0 -82
- data/lib/impala/protocol/state_store_subscriber_service_constants.rb +0 -12
- data/lib/impala/protocol/state_store_subscriber_service_types.rb +0 -67
- data/lib/impala/protocol/statestore_types_constants.rb +0 -12
- data/lib/impala/protocol/statestore_types_types.rb +0 -77
- data/lib/impala/protocol/types_constants.rb +0 -12
- data/lib/impala/protocol/types_types.rb +0 -86
- data/thrift/Data.thrift +0 -52
- data/thrift/DataSinks.thrift +0 -61
- data/thrift/Descriptors.thrift +0 -115
- data/thrift/Exprs.thrift +0 -134
- data/thrift/Frontend.thrift +0 -193
- data/thrift/ImpalaInternalService.thrift +0 -265
- data/thrift/ImpalaPlanService.thrift +0 -44
- data/thrift/JavaConstants.thrift +0 -60
- data/thrift/Opcodes.thrift +0 -317
- data/thrift/Partitions.thrift +0 -41
- data/thrift/PlanNodes.thrift +0 -184
- data/thrift/Planner.thrift +0 -72
- data/thrift/RuntimeProfile.thrift +0 -58
- data/thrift/StateStoreService.thrift +0 -121
- data/thrift/StateStoreSubscriberService.thrift +0 -64
- data/thrift/StatestoreTypes.thrift +0 -50
- data/thrift/Types.thrift +0 -71
data/thrift/PlanNodes.thrift
DELETED
@@ -1,184 +0,0 @@
|
|
1
|
-
// Copyright 2012 Cloudera Inc.
|
2
|
-
//
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
// you may not use this file except in compliance with the License.
|
5
|
-
// You may obtain a copy of the License at
|
6
|
-
//
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
//
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
// See the License for the specific language governing permissions and
|
13
|
-
// limitations under the License.
|
14
|
-
|
15
|
-
//
|
16
|
-
// This file contains all structs, enums, etc., that together make up
|
17
|
-
// a plan tree. All information recorded in struct TPlan and below is independent
|
18
|
-
// of the execution parameters of any one of the backends on which it is running
|
19
|
-
// (those are recorded in TPlanFragmentExecParams).
|
20
|
-
|
21
|
-
namespace cpp impala
|
22
|
-
namespace java com.cloudera.impala.thrift
|
23
|
-
namespace rb Impala.Protocol
|
24
|
-
|
25
|
-
include "Exprs.thrift"
|
26
|
-
include "Types.thrift"
|
27
|
-
|
28
|
-
enum TPlanNodeType {
|
29
|
-
HDFS_SCAN_NODE,
|
30
|
-
HBASE_SCAN_NODE,
|
31
|
-
HASH_JOIN_NODE,
|
32
|
-
AGGREGATION_NODE,
|
33
|
-
SORT_NODE,
|
34
|
-
EXCHANGE_NODE,
|
35
|
-
MERGE_NODE
|
36
|
-
}
|
37
|
-
|
38
|
-
// The information contained in subclasses of ScanNode captured in two separate
|
39
|
-
// Thrift structs:
|
40
|
-
// - TScanRange: the data range that's covered by the scan (which varies with the
|
41
|
-
// particular partition of the plan fragment of which the scan node is a part)
|
42
|
-
// - T<subclass>: all other operational parameters that are the same across
|
43
|
-
// all plan fragments
|
44
|
-
|
45
|
-
// Specification of subsection of a single hdfs file.
|
46
|
-
struct THdfsFileSplit {
|
47
|
-
// file path
|
48
|
-
1: required string path
|
49
|
-
|
50
|
-
// starting offset
|
51
|
-
2: required i64 offset
|
52
|
-
|
53
|
-
// length of split
|
54
|
-
3: required i64 length
|
55
|
-
|
56
|
-
// ID of partition in parent THdfsScanNode. Meaningful only
|
57
|
-
// in the context of a single THdfsScanNode, may not be unique elsewhere.
|
58
|
-
4: required i64 partition_id
|
59
|
-
}
|
60
|
-
|
61
|
-
// key range for single THBaseScanNode
|
62
|
-
// TODO: does 'binary' have an advantage over string? strings can
|
63
|
-
// already store binary data
|
64
|
-
struct THBaseKeyRange {
|
65
|
-
// inclusive
|
66
|
-
1: optional string startKey
|
67
|
-
|
68
|
-
// exclusive
|
69
|
-
2: optional string stopKey
|
70
|
-
}
|
71
|
-
|
72
|
-
// Specification of an individual data range which is held in its entirety
|
73
|
-
// by a storage server
|
74
|
-
struct TScanRange {
|
75
|
-
// one of these must be set for every TScanRange2
|
76
|
-
1: optional THdfsFileSplit hdfs_file_split
|
77
|
-
2: optional THBaseKeyRange hbase_key_range
|
78
|
-
}
|
79
|
-
|
80
|
-
struct THdfsScanNode {
|
81
|
-
1: required Types.TTupleId tuple_id
|
82
|
-
}
|
83
|
-
|
84
|
-
struct THBaseFilter {
|
85
|
-
1: required string family
|
86
|
-
2: required string qualifier
|
87
|
-
// Ordinal number into enum HBase CompareFilter.CompareOp.
|
88
|
-
// We don't use TExprOperator because the op is interpreted by an HBase Filter, and
|
89
|
-
// not the c++ expr eval.
|
90
|
-
3: required i32 op_ordinal
|
91
|
-
4: required string filter_constant
|
92
|
-
}
|
93
|
-
|
94
|
-
struct THBaseScanNode {
|
95
|
-
1: required Types.TTupleId tuple_id
|
96
|
-
|
97
|
-
// TODO: remove this, we already have THBaseTable.tableName
|
98
|
-
2: required string table_name
|
99
|
-
|
100
|
-
3: optional list<THBaseFilter> filters
|
101
|
-
}
|
102
|
-
|
103
|
-
struct TEqJoinCondition {
|
104
|
-
// left-hand side of "<a> = <b>"
|
105
|
-
1: required Exprs.TExpr left;
|
106
|
-
// right-hand side of "<a> = <b>"
|
107
|
-
2: required Exprs.TExpr right;
|
108
|
-
}
|
109
|
-
|
110
|
-
enum TJoinOp {
|
111
|
-
INNER_JOIN,
|
112
|
-
LEFT_OUTER_JOIN,
|
113
|
-
LEFT_SEMI_JOIN,
|
114
|
-
RIGHT_OUTER_JOIN,
|
115
|
-
FULL_OUTER_JOIN
|
116
|
-
}
|
117
|
-
|
118
|
-
struct THashJoinNode {
|
119
|
-
1: required TJoinOp join_op
|
120
|
-
|
121
|
-
// anything from the ON, USING or WHERE clauses that's an equi-join predicate
|
122
|
-
2: required list<TEqJoinCondition> eq_join_conjuncts
|
123
|
-
|
124
|
-
// anything from the ON or USING clauses (but *not* the WHERE clause) that's not an
|
125
|
-
// equi-join predicate
|
126
|
-
3: optional list<Exprs.TExpr> other_join_conjuncts
|
127
|
-
}
|
128
|
-
|
129
|
-
struct TAggregationNode {
|
130
|
-
1: optional list<Exprs.TExpr> grouping_exprs
|
131
|
-
2: required list<Exprs.TExpr> aggregate_exprs
|
132
|
-
3: required Types.TTupleId agg_tuple_id
|
133
|
-
|
134
|
-
// Set to true if this aggregation function requires finalization to complete after all
|
135
|
-
// rows have been aggregated, and this node is not an intermediate node.
|
136
|
-
4: required bool need_finalize
|
137
|
-
}
|
138
|
-
|
139
|
-
struct TSortNode {
|
140
|
-
1: required list<Exprs.TExpr> ordering_exprs
|
141
|
-
2: required list<bool> is_asc_order
|
142
|
-
// Indicates whether the backend service should use topn vs. sorting
|
143
|
-
3: required bool use_top_n;
|
144
|
-
}
|
145
|
-
|
146
|
-
struct TMergeNode {
|
147
|
-
// List or expr lists materialized by this node.
|
148
|
-
// There is one list of exprs per query stmt feeding into this merge node.
|
149
|
-
1: required list<list<Exprs.TExpr>> result_expr_lists
|
150
|
-
// Separate list of expr lists coming from a constant select stmts.
|
151
|
-
2: required list<list<Exprs.TExpr>> const_expr_lists
|
152
|
-
}
|
153
|
-
|
154
|
-
// This is essentially a union of all messages corresponding to subclasses
|
155
|
-
// of PlanNode.
|
156
|
-
struct TPlanNode {
|
157
|
-
// node id, needed to reassemble tree structure
|
158
|
-
1: required Types.TPlanNodeId node_id
|
159
|
-
2: required TPlanNodeType node_type
|
160
|
-
3: required i32 num_children
|
161
|
-
4: required i64 limit
|
162
|
-
5: required list<Types.TTupleId> row_tuples
|
163
|
-
|
164
|
-
// nullable_tuples[i] is true if row_tuples[i] is nullable
|
165
|
-
6: required list<bool> nullable_tuples
|
166
|
-
7: optional list<Exprs.TExpr> conjuncts
|
167
|
-
|
168
|
-
// Produce data in compact format.
|
169
|
-
8: required bool compact_data
|
170
|
-
|
171
|
-
// one field per PlanNode subclass
|
172
|
-
9: optional THdfsScanNode hdfs_scan_node
|
173
|
-
10: optional THBaseScanNode hbase_scan_node
|
174
|
-
11: optional THashJoinNode hash_join_node
|
175
|
-
12: optional TAggregationNode agg_node
|
176
|
-
13: optional TSortNode sort_node
|
177
|
-
14: optional TMergeNode merge_node
|
178
|
-
}
|
179
|
-
|
180
|
-
// A flattened representation of a tree of PlanNodes, obtained by depth-first
|
181
|
-
// traversal.
|
182
|
-
struct TPlan {
|
183
|
-
1: required list<TPlanNode> nodes
|
184
|
-
}
|
data/thrift/Planner.thrift
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
// Copyright 2012 Cloudera Inc.
|
2
|
-
//
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
// you may not use this file except in compliance with the License.
|
5
|
-
// You may obtain a copy of the License at
|
6
|
-
//
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
//
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
// See the License for the specific language governing permissions and
|
13
|
-
// limitations under the License.
|
14
|
-
|
15
|
-
//
|
16
|
-
// This file contains structures produced by the planner.
|
17
|
-
|
18
|
-
namespace cpp impala
|
19
|
-
namespace java com.cloudera.impala.thrift
|
20
|
-
namespace rb Impala.Protocol
|
21
|
-
|
22
|
-
include "Types.thrift"
|
23
|
-
include "Exprs.thrift"
|
24
|
-
include "DataSinks.thrift"
|
25
|
-
include "PlanNodes.thrift"
|
26
|
-
include "Partitions.thrift"
|
27
|
-
|
28
|
-
// TPlanFragment encapsulates info needed to execute a particular
|
29
|
-
// plan fragment, including how to produce and how to partition its output.
|
30
|
-
// It leaves out node-specific parameters neede for the actual execution.
|
31
|
-
struct TPlanFragment {
|
32
|
-
// no plan or descriptor table: query without From clause
|
33
|
-
2: optional PlanNodes.TPlan plan
|
34
|
-
|
35
|
-
// exprs that produce values for slots of output tuple (one expr per slot);
|
36
|
-
// if not set, plan fragment materializes full rows of plan_tree
|
37
|
-
4: optional list<Exprs.TExpr> output_exprs
|
38
|
-
|
39
|
-
// Specifies the destination of this plan fragment's output rows.
|
40
|
-
// For example, the destination could be a stream sink which forwards
|
41
|
-
// the data to a remote plan fragment, or a sink which writes to a table (for
|
42
|
-
// insert stmts).
|
43
|
-
5: optional DataSinks.TDataSink output_sink
|
44
|
-
|
45
|
-
// Partitioning of the data created by all instances of this plan fragment;
|
46
|
-
// partitioning.type has the following meaning:
|
47
|
-
// - UNPARTITIONED: there is only one instance of the plan fragment
|
48
|
-
// - RANDOM: a particular output row is randomly assigned to any of the instances
|
49
|
-
// - HASH_PARTITIONED: output row r is produced by
|
50
|
-
// hash_value(partitioning.partitioning_exprs(r)) % #partitions
|
51
|
-
// - RANGE_PARTITIONING: currently not supported
|
52
|
-
// This is distinct from the partitioning of each plan fragment's
|
53
|
-
// output, which is specified by output_sink.output_partitioning.
|
54
|
-
6: required Partitions.TDataPartition partition
|
55
|
-
}
|
56
|
-
|
57
|
-
// location information for a single scan range
|
58
|
-
struct TScanRangeLocation {
|
59
|
-
1: required Types.THostPort server
|
60
|
-
|
61
|
-
// disk volume identifier of a particular scan range at 'server';
|
62
|
-
// -1 indicates an unknown volume id;
|
63
|
-
// only set for TScanRange.hdfs_file_split
|
64
|
-
2: optional i32 volume_id = -1
|
65
|
-
}
|
66
|
-
|
67
|
-
// A single scan range plus the hosts that serve it
|
68
|
-
struct TScanRangeLocations {
|
69
|
-
1: required PlanNodes.TScanRange scan_range
|
70
|
-
// non-empty list
|
71
|
-
2: list<TScanRangeLocation> locations
|
72
|
-
}
|
@@ -1,58 +0,0 @@
|
|
1
|
-
// Copyright 2012 Cloudera Inc.
|
2
|
-
//
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
// you may not use this file except in compliance with the License.
|
5
|
-
// You may obtain a copy of the License at
|
6
|
-
//
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
//
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
// See the License for the specific language governing permissions and
|
13
|
-
// limitations under the License.
|
14
|
-
|
15
|
-
namespace cpp impala
|
16
|
-
namespace java com.cloudera.impala.thrift
|
17
|
-
namespace rb Impala.Protocol
|
18
|
-
|
19
|
-
// Counter data types.
|
20
|
-
enum TCounterType {
|
21
|
-
UNIT,
|
22
|
-
UNIT_PER_SECOND,
|
23
|
-
TIME_MS,
|
24
|
-
CPU_TICKS,
|
25
|
-
BYTES
|
26
|
-
BYTES_PER_SECOND,
|
27
|
-
}
|
28
|
-
|
29
|
-
// Counter data
|
30
|
-
struct TCounter {
|
31
|
-
1: required string name
|
32
|
-
2: required TCounterType type
|
33
|
-
3: required i64 value
|
34
|
-
}
|
35
|
-
|
36
|
-
// A single runtime profile
|
37
|
-
struct TRuntimeProfileNode {
|
38
|
-
1: required string name
|
39
|
-
2: required i32 num_children
|
40
|
-
3: required list<TCounter> counters
|
41
|
-
// TODO: should we make metadata a serializable struct? We only use it to
|
42
|
-
// store the node id right now so this is sufficient.
|
43
|
-
4: required i64 metadata
|
44
|
-
|
45
|
-
// indicates whether the child will be printed with extra indentation;
|
46
|
-
// corresponds to indent param of RuntimeProfile::AddChild()
|
47
|
-
5: required bool indent
|
48
|
-
|
49
|
-
// map of key,value info strings that capture any kind of additional information
|
50
|
-
// about the profiled object
|
51
|
-
6: required map<string, string> info_strings
|
52
|
-
}
|
53
|
-
|
54
|
-
// A flattened tree of runtime profiles, obtained by an
|
55
|
-
// in-order traversal
|
56
|
-
struct TRuntimeProfileTree {
|
57
|
-
1: required list<TRuntimeProfileNode> nodes
|
58
|
-
}
|
@@ -1,121 +0,0 @@
|
|
1
|
-
// Copyright 2012 Cloudera Inc.
|
2
|
-
//
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
// you may not use this file except in compliance with the License.
|
5
|
-
// You may obtain a copy of the License at
|
6
|
-
//
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
//
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
// See the License for the specific language governing permissions and
|
13
|
-
// limitations under the License.
|
14
|
-
|
15
|
-
namespace cpp impala
|
16
|
-
namespace java com.cloudera.impala.thrift
|
17
|
-
namespace rb Impala.Protocol
|
18
|
-
|
19
|
-
include "StatestoreTypes.thrift"
|
20
|
-
include "Status.thrift"
|
21
|
-
include "Types.thrift"
|
22
|
-
|
23
|
-
enum StateStoreServiceVersion {
|
24
|
-
V1
|
25
|
-
}
|
26
|
-
|
27
|
-
struct TRegisterServiceRequest {
|
28
|
-
1: required StateStoreServiceVersion protocol_version =
|
29
|
-
StateStoreServiceVersion.V1
|
30
|
-
|
31
|
-
// Address where the StateStoreSubscriberService is running. Required in V1.
|
32
|
-
2: optional Types.THostPort subscriber_address
|
33
|
-
|
34
|
-
// Service running on the node. Multiple services can be registered using multiple
|
35
|
-
// RegisterService() calls from the same subscriber. Currently, we assume that at most
|
36
|
-
// one instance of a particular service will be registered with each subscriber.
|
37
|
-
// Required in V1.
|
38
|
-
3: optional string service_id
|
39
|
-
4: optional Types.THostPort service_address
|
40
|
-
}
|
41
|
-
|
42
|
-
struct TRegisterServiceResponse {
|
43
|
-
// Required in V1.
|
44
|
-
1: optional Status.TStatus status
|
45
|
-
}
|
46
|
-
|
47
|
-
struct TUnregisterServiceRequest {
|
48
|
-
1: required StateStoreServiceVersion protocol_version =
|
49
|
-
StateStoreServiceVersion.V1
|
50
|
-
|
51
|
-
// Address of the subscriber. Required in V1.
|
52
|
-
2: optional Types.THostPort subscriber_address
|
53
|
-
|
54
|
-
// Service that should be unregistered. Required in V1.
|
55
|
-
3: optional string service_id
|
56
|
-
}
|
57
|
-
|
58
|
-
struct TUnregisterServiceResponse {
|
59
|
-
// Required in V1.
|
60
|
-
1: optional Status.TStatus status
|
61
|
-
}
|
62
|
-
|
63
|
-
struct TRegisterSubscriptionRequest {
|
64
|
-
1: required StateStoreServiceVersion protocol_version =
|
65
|
-
StateStoreServiceVersion.V1
|
66
|
-
|
67
|
-
// Address where the StateStoreSubscriberService is running. Required in V1.
|
68
|
-
2: optional Types.THostPort subscriber_address
|
69
|
-
|
70
|
-
// Services for which updates should be pushed to the given subscriber. Required in V1.
|
71
|
-
3: optional set<string> services
|
72
|
-
|
73
|
-
// The subscription ID to use for this request. All IDs are local to the
|
74
|
-
// subscriber, so as long as a single subscriber does not reuse IDs there is no
|
75
|
-
// danger of collision.
|
76
|
-
// Required in V1
|
77
|
-
4: optional string subscription_id;
|
78
|
-
}
|
79
|
-
|
80
|
-
struct TRegisterSubscriptionResponse {
|
81
|
-
// Required in V1.
|
82
|
-
1: optional Status.TStatus status
|
83
|
-
}
|
84
|
-
|
85
|
-
struct TUnregisterSubscriptionRequest {
|
86
|
-
1: required StateStoreServiceVersion protocol_version =
|
87
|
-
StateStoreServiceVersion.V1
|
88
|
-
|
89
|
-
// Address of the subscriber. Required in V1.
|
90
|
-
2: optional Types.THostPort subscriber_address
|
91
|
-
|
92
|
-
// Identifier for the subscription that should be unregistered. Required in V1.
|
93
|
-
3: optional string subscription_id
|
94
|
-
}
|
95
|
-
|
96
|
-
struct TUnregisterSubscriptionResponse {
|
97
|
-
// Required in V1.
|
98
|
-
1: optional Status.TStatus status
|
99
|
-
}
|
100
|
-
|
101
|
-
// A repository and distribution mechanism for global system state. Stored state is not
|
102
|
-
// made persistent and is considered soft-state (i.e., it needs to be re-supplied
|
103
|
-
// when a StateStore restarts). Updates to the global state are distributed to
|
104
|
-
// subscribers asynchronously and with an arbitrary (but typically reasonably small)
|
105
|
-
// delay.
|
106
|
-
service StateStoreService {
|
107
|
-
// Registers an instance of a service.
|
108
|
-
TRegisterServiceResponse RegisterService(1: TRegisterServiceRequest request);
|
109
|
-
|
110
|
-
// Unregisters an instance of a service.
|
111
|
-
TUnregisterServiceResponse UnregisterService(1: TUnregisterServiceRequest request);
|
112
|
-
|
113
|
-
// Registers to receive updates for a set of services.
|
114
|
-
TRegisterSubscriptionResponse RegisterSubscription(
|
115
|
-
1: TRegisterSubscriptionRequest request);
|
116
|
-
|
117
|
-
// Unregisters the given subscription. A subscriber will be updated at most one more
|
118
|
-
// time after unregistering.
|
119
|
-
TUnregisterSubscriptionResponse UnregisterSubscription(
|
120
|
-
1: TUnregisterSubscriptionRequest request);
|
121
|
-
}
|
@@ -1,64 +0,0 @@
|
|
1
|
-
// Copyright 2012 Cloudera Inc.
|
2
|
-
//
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
// you may not use this file except in compliance with the License.
|
5
|
-
// You may obtain a copy of the License at
|
6
|
-
//
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
//
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
// See the License for the specific language governing permissions and
|
13
|
-
// limitations under the License.
|
14
|
-
|
15
|
-
namespace cpp impala
|
16
|
-
namespace java com.cloudera.impala.thrift
|
17
|
-
namespace rb Impala.Protocol
|
18
|
-
|
19
|
-
include "StatestoreTypes.thrift"
|
20
|
-
include "Status.thrift"
|
21
|
-
include "Types.thrift"
|
22
|
-
|
23
|
-
enum StateStoreSubscriberServiceVersion {
|
24
|
-
V1
|
25
|
-
}
|
26
|
-
|
27
|
-
struct TUpdateStateRequest {
|
28
|
-
1: required StateStoreSubscriberServiceVersion protocolVersion =
|
29
|
-
StateStoreSubscriberServiceVersion.V1
|
30
|
-
|
31
|
-
// Membership information for each service that the subscriber subscribed to.
|
32
|
-
// Required in V1.
|
33
|
-
2: optional list<StatestoreTypes.TServiceMembership> service_memberships
|
34
|
-
|
35
|
-
// Object updates for each service that the subscriber subscribed to. Required in V1.
|
36
|
-
3: optional list<StatestoreTypes.TVersionedObject> updated_objects
|
37
|
-
|
38
|
-
// Objects that have been deleted, for each service that the subscriber has subscribed
|
39
|
-
// to. Required in V1.
|
40
|
-
4: optional list<string> deleted_object_keys
|
41
|
-
}
|
42
|
-
|
43
|
-
struct TUpdateStateResponse {
|
44
|
-
// Required in V1.
|
45
|
-
1: optional Status.TStatus status
|
46
|
-
|
47
|
-
// For each service running on the subscriber, the object updates. Required in V1,
|
48
|
-
// but not yet implemented.
|
49
|
-
2: optional list<StatestoreTypes.TVersionedObject> updated_objects
|
50
|
-
|
51
|
-
// Objects that have been deleted, for each service that the subscriber has subscribed
|
52
|
-
// to. Required in V1, but not yet implemented.
|
53
|
-
3: optional list<string> deleted_object_keys
|
54
|
-
}
|
55
|
-
|
56
|
-
// The StateStoreSubscriber runs on all servers that need to connect to the StateStore,
|
57
|
-
// and provides an interface between the StateStore and services that need to either push
|
58
|
-
// updates to or receive updates from the StateStore.
|
59
|
-
service StateStoreSubscriberService {
|
60
|
-
// The UpdateState() call serves two purposes: first, it allows the StateStore to push
|
61
|
-
// new updates to the subscriber; and second, it allows the StateStore to collect new
|
62
|
-
// updates from services running local with the StateStoreSubscriber.
|
63
|
-
TUpdateStateResponse UpdateState(1: TUpdateStateRequest request);
|
64
|
-
}
|