e6data-python-connector 2.2.1rc5__tar.gz → 2.2.3rc1__tar.gz
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.
- {e6data_python_connector-2.2.1rc5/e6data_python_connector.egg-info → e6data_python_connector-2.2.3rc1}/PKG-INFO +22 -11
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/README.md +1 -1
- e6data_python_connector-2.2.3rc1/e6data_python_connector/cluster_manager.py +261 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/e6data_grpc.py +40 -24
- e6data_python_connector-2.2.3rc1/e6data_python_connector/server/e6x_engine_pb2.py +141 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/server/e6x_engine_pb2.pyi +63 -59
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/server/e6x_engine_pb2_grpc.py +432 -116
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1/e6data_python_connector.egg-info}/PKG-INFO +22 -11
- e6data_python_connector-2.2.3rc1/e6data_python_connector.egg-info/requires.txt +8 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/setup.py +27 -16
- e6data_python_connector-2.2.1rc5/e6data_python_connector/cluster_manager.py +0 -105
- e6data_python_connector-2.2.1rc5/e6data_python_connector/server/e6x_engine_pb2.py +0 -140
- e6data_python_connector-2.2.1rc5/e6data_python_connector.egg-info/requires.txt +0 -9
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/LICENSE +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/MANIFEST.in +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/__init__.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/cluster_server/__init__.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/cluster_server/cluster_pb2.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/cluster_server/cluster_pb2_grpc.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/common.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/constants.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/datainputstream.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/date_time_utils.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/dialect.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/e6x_vector/__init__.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/e6x_vector/constants.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/e6x_vector/ttypes.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/exceptions.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/server/QueryEngineService.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/server/__init__.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/server/constants.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/server/ttypes.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector/typeId.py +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector.egg-info/SOURCES.txt +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector.egg-info/dependency_links.txt +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector.egg-info/entry_points.txt +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/e6data_python_connector.egg-info/top_level.txt +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/pyproject.toml +0 -0
- {e6data_python_connector-2.2.1rc5 → e6data_python_connector-2.2.3rc1}/setup.cfg +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: e6data-python-connector
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3rc1
|
|
4
4
|
Summary: Client for the e6data distributed SQL Engine.
|
|
5
5
|
Home-page: https://github.com/e6x-labs/e6data-python-connector
|
|
6
|
-
Author:
|
|
6
|
+
Author: e6data, Inc.
|
|
7
7
|
Author-email: info@e6data.com
|
|
8
8
|
License: Apache 2.0
|
|
9
9
|
Classifier: Operating System :: POSIX :: Linux
|
|
@@ -13,21 +13,32 @@ Classifier: Programming Language :: Python :: 3.6
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.7
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.8
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
19
|
Description-Content-Type: text/markdown
|
|
17
20
|
License-File: LICENSE
|
|
18
21
|
Requires-Dist: sqlalchemy>=1.0.0
|
|
19
|
-
Requires-Dist: future
|
|
20
|
-
Requires-Dist: python-dateutil
|
|
21
|
-
Requires-Dist: pycryptodome
|
|
22
|
-
Requires-Dist: pytz
|
|
23
|
-
Requires-Dist: thrift
|
|
24
|
-
Requires-Dist: grpcio
|
|
22
|
+
Requires-Dist: future==1.0.0
|
|
23
|
+
Requires-Dist: python-dateutil==2.9.0.post0
|
|
24
|
+
Requires-Dist: pycryptodome==3.19.1
|
|
25
|
+
Requires-Dist: pytz==2024.1
|
|
26
|
+
Requires-Dist: thrift==0.20.0
|
|
27
|
+
Requires-Dist: grpcio==1.65.1
|
|
25
28
|
Requires-Dist: grpcio-tools
|
|
26
|
-
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: author-email
|
|
31
|
+
Dynamic: classifier
|
|
32
|
+
Dynamic: description
|
|
33
|
+
Dynamic: description-content-type
|
|
34
|
+
Dynamic: home-page
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: requires-dist
|
|
37
|
+
Dynamic: summary
|
|
27
38
|
|
|
28
39
|
# e6data Python Connector
|
|
29
40
|
|
|
30
|
-

|
|
31
42
|
|
|
32
43
|
## Introduction
|
|
33
44
|
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import threading
|
|
2
|
+
import time
|
|
3
|
+
import e6data_python_connector.cluster_server.cluster_pb2 as cluster_pb2
|
|
4
|
+
import e6data_python_connector.cluster_server.cluster_pb2_grpc as cluster_pb2_grpc
|
|
5
|
+
import grpc
|
|
6
|
+
from grpc._channel import _InactiveRpcError
|
|
7
|
+
import multiprocessing
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _get_grpc_header(engine_ip=None, cluster=None):
|
|
11
|
+
metadata = []
|
|
12
|
+
if engine_ip:
|
|
13
|
+
metadata.append(('plannerip', engine_ip))
|
|
14
|
+
if cluster:
|
|
15
|
+
metadata.append(('cluster-uuid', cluster))
|
|
16
|
+
return metadata
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class _StatusLock:
|
|
20
|
+
"""
|
|
21
|
+
A thread-safe and process-safe lock manager designed for managing
|
|
22
|
+
concurrent access protection in multithreaded and multiprocessing environments.
|
|
23
|
+
|
|
24
|
+
This class encapsulates locking mechanisms using threading and multiprocessing
|
|
25
|
+
modules to ensure an operation's atomicity and handle shared resources safely.
|
|
26
|
+
|
|
27
|
+
Attributes:
|
|
28
|
+
_LOCK_TIMEOUT (int): The maximum timeout (in milliseconds) to try
|
|
29
|
+
acquiring a lock before raising an error.
|
|
30
|
+
_status_thread_lock (threading.Lock): A thread-level lock to synchronize
|
|
31
|
+
access among threads in the same process.
|
|
32
|
+
_status_multiprocessing_lock (multiprocessing.Semaphore): A
|
|
33
|
+
process-level lock to synchronize access across different processes.
|
|
34
|
+
_is_active (bool): A boolean flag indicating whether the lock
|
|
35
|
+
is currently active (True) or not (False).
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
_LOCK_TIMEOUT = 500
|
|
39
|
+
|
|
40
|
+
def __init__(self):
|
|
41
|
+
"""
|
|
42
|
+
Initializes the _StatusLock instance with its respective
|
|
43
|
+
thread and multiprocessing locks and sets the active flag to False.
|
|
44
|
+
"""
|
|
45
|
+
self._status_thread_lock = threading.Lock()
|
|
46
|
+
self._status_multiprocessing_lock = multiprocessing.Semaphore()
|
|
47
|
+
self._is_active = False
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def is_active(self) -> bool:
|
|
51
|
+
"""
|
|
52
|
+
Checks if the lock is currently active.
|
|
53
|
+
|
|
54
|
+
Returns:
|
|
55
|
+
bool: True if the lock is active, False otherwise.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
return self._is_active
|
|
59
|
+
|
|
60
|
+
def set_active(self):
|
|
61
|
+
"""
|
|
62
|
+
Activates the lock by setting the `_is_active` flag to True.
|
|
63
|
+
This can be used for manually marking the state of the lock
|
|
64
|
+
as active during synchronization operations.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
self._is_active = True
|
|
68
|
+
|
|
69
|
+
def __enter__(self):
|
|
70
|
+
"""
|
|
71
|
+
Enters a context-managed locking block.
|
|
72
|
+
|
|
73
|
+
Acquires both the thread-level lock and process-level semaphore
|
|
74
|
+
to ensure the current operation can safely access shared resources.
|
|
75
|
+
|
|
76
|
+
Raises:
|
|
77
|
+
TimeoutError: If the lock cannot be acquired within the timeout period.
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
_StatusLock: The current instance of the lock, used for context management.
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
self._status_thread_lock.acquire(timeout=self._LOCK_TIMEOUT)
|
|
84
|
+
self._status_multiprocessing_lock.acquire(timeout=self._LOCK_TIMEOUT)
|
|
85
|
+
return self
|
|
86
|
+
|
|
87
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
88
|
+
"""
|
|
89
|
+
Exits a context-managed locking block.
|
|
90
|
+
|
|
91
|
+
Releases both the thread-level lock and process-level semaphore
|
|
92
|
+
to allow other operations to acquire the lock. Handles cleanup
|
|
93
|
+
regardless of whether an exception occurred.
|
|
94
|
+
|
|
95
|
+
Args:
|
|
96
|
+
exc_type (Type[BaseException]): The type of exception raised (if any).
|
|
97
|
+
exc_val (BaseException): The exception instance raised (if any).
|
|
98
|
+
exc_tb (Traceback): The traceback object of the exception (if any).
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
self._status_thread_lock.release()
|
|
102
|
+
self._status_multiprocessing_lock.release()
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
status_lock = _StatusLock()
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class ClusterManager:
|
|
109
|
+
"""
|
|
110
|
+
A manager for handling operations and connections with a remote cluster infrastructure.
|
|
111
|
+
Provides methods to manage cluster states, such as resuming or suspending its activity,
|
|
112
|
+
by interacting with a gRPC-based remote service.
|
|
113
|
+
|
|
114
|
+
Attributes:
|
|
115
|
+
_host (str): The hostname or IP address of the cluster service.
|
|
116
|
+
_port (int): The port number used to connect to the cluster service.
|
|
117
|
+
_user (str): The username for authentication with the cluster service.
|
|
118
|
+
_password (str): The password for authentication with the cluster service.
|
|
119
|
+
_timeout (float): The timeout threshold (as an epoch timestamp) for operations,
|
|
120
|
+
defaulting to 3 minutes from initialization.
|
|
121
|
+
_secure_channel (bool): Indicates whether a secure gRPC channel
|
|
122
|
+
(SSL/TLS) should be used for communication; defaults to False.
|
|
123
|
+
cluster_uuid (str): The unique identifier for the target cluster.
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
def __init__(self, host: str, port: int, user: str, password: str, secure_channel: bool = False, timeout=60 * 3, cluster_uuid=None):
|
|
127
|
+
"""
|
|
128
|
+
Initializes a new instance of the ClusterManager class.
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
host (str): The hostname or IP address of the cluster service.
|
|
132
|
+
port (int): The port number for accessing the cluster service.
|
|
133
|
+
user (str): The username used for connecting to the cluster service.
|
|
134
|
+
password (str): The password used for connecting to the cluster service.
|
|
135
|
+
secure_channel (bool, optional): Whether to use a secure
|
|
136
|
+
gRPC channel for communication; defaults to False.
|
|
137
|
+
timeout (int, optional): The timeout duration (in seconds) for operations;
|
|
138
|
+
defaults to 3 minutes.
|
|
139
|
+
cluster_uuid (str, optional): The unique identifier for the target cluster;
|
|
140
|
+
defaults to None.
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
self._host = host
|
|
144
|
+
self._port = port
|
|
145
|
+
self._user = user
|
|
146
|
+
self._password = password
|
|
147
|
+
self._timeout = time.time() + timeout
|
|
148
|
+
self._secure_channel = secure_channel
|
|
149
|
+
self.cluster_uuid = cluster_uuid
|
|
150
|
+
|
|
151
|
+
@property
|
|
152
|
+
def _get_connection(self):
|
|
153
|
+
"""
|
|
154
|
+
Dynamically establishes a gRPC connection to the cluster service.
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
cluster_pb2_grpc.ClusterServiceStub: A gRPC client stub
|
|
158
|
+
for interacting with the cluster service methods.
|
|
159
|
+
"""
|
|
160
|
+
|
|
161
|
+
if self._secure_channel:
|
|
162
|
+
self._channel = grpc.secure_channel(
|
|
163
|
+
target='{}:{}'.format(self._host, self._port),
|
|
164
|
+
credentials=grpc.ssl_channel_credentials()
|
|
165
|
+
)
|
|
166
|
+
else:
|
|
167
|
+
self._channel = grpc.insecure_channel(
|
|
168
|
+
target='{}:{}'.format(self._host, self._port)
|
|
169
|
+
)
|
|
170
|
+
return cluster_pb2_grpc.ClusterServiceStub(self._channel)
|
|
171
|
+
|
|
172
|
+
def resume(self) -> bool:
|
|
173
|
+
"""
|
|
174
|
+
Resumes the cluster if it is currently suspended or not in the 'active' state.
|
|
175
|
+
|
|
176
|
+
This method interacts with the remote cluster service to verify its current
|
|
177
|
+
status. If suspended, it sends a resume request and monitors
|
|
178
|
+
the cluster's state until it becomes active or fails.
|
|
179
|
+
|
|
180
|
+
The operation uses a locking mechanism (`status_lock`) to ensure thread-safe
|
|
181
|
+
and process-safe state transitions.
|
|
182
|
+
|
|
183
|
+
Returns:
|
|
184
|
+
bool: True if the cluster resumes successfully and becomes active;
|
|
185
|
+
False if the cluster cannot be resumed, remains suspended, or fails.
|
|
186
|
+
|
|
187
|
+
Raises:
|
|
188
|
+
_InactiveRpcError: An exception raised if there is a communication error
|
|
189
|
+
while interacting with the remote cluster service.
|
|
190
|
+
|
|
191
|
+
Notes:
|
|
192
|
+
- If the cluster is already active, this method completes successfully
|
|
193
|
+
without further actions.
|
|
194
|
+
- If the cluster is in a 'resuming' state, this method waits for the
|
|
195
|
+
cluster to transition to 'active' or any terminal state (e.g., 'failed').
|
|
196
|
+
- The operation is subject to the `_timeout` threshold;
|
|
197
|
+
if the timeout expires, the method returns False.
|
|
198
|
+
"""
|
|
199
|
+
|
|
200
|
+
with status_lock as lock:
|
|
201
|
+
if lock.is_active:
|
|
202
|
+
return True
|
|
203
|
+
|
|
204
|
+
# Retrieve the current cluster status
|
|
205
|
+
status_payload = cluster_pb2.ClusterStatusRequest(
|
|
206
|
+
user=self._user,
|
|
207
|
+
password=self._password
|
|
208
|
+
)
|
|
209
|
+
current_status = self._get_connection.status(
|
|
210
|
+
status_payload,
|
|
211
|
+
metadata=_get_grpc_header(cluster=self.cluster_uuid)
|
|
212
|
+
)
|
|
213
|
+
if current_status.status == 'suspended':
|
|
214
|
+
# Send the resume request
|
|
215
|
+
payload = cluster_pb2.ResumeRequest(
|
|
216
|
+
user=self._user,
|
|
217
|
+
password=self._password
|
|
218
|
+
)
|
|
219
|
+
response = self._get_connection.resume(
|
|
220
|
+
payload,
|
|
221
|
+
metadata=_get_grpc_header(cluster=self.cluster_uuid)
|
|
222
|
+
)
|
|
223
|
+
elif current_status.status == 'active':
|
|
224
|
+
return True
|
|
225
|
+
elif current_status.status != 'resuming':
|
|
226
|
+
"""
|
|
227
|
+
If cluster cannot be resumed due to its current state,
|
|
228
|
+
or already in a process of resuming, terminate the operation.
|
|
229
|
+
"""
|
|
230
|
+
return False
|
|
231
|
+
|
|
232
|
+
# Wait for the cluster to become active
|
|
233
|
+
while True:
|
|
234
|
+
try:
|
|
235
|
+
status_payload = cluster_pb2.ClusterStatusRequest(
|
|
236
|
+
user=self._user,
|
|
237
|
+
password=self._password
|
|
238
|
+
)
|
|
239
|
+
response = self._get_connection.status(
|
|
240
|
+
status_payload,
|
|
241
|
+
metadata=_get_grpc_header(cluster=self.cluster_uuid)
|
|
242
|
+
)
|
|
243
|
+
if response.status == 'active':
|
|
244
|
+
lock.set_active()
|
|
245
|
+
return True
|
|
246
|
+
if response.status in ['suspended', 'failed']:
|
|
247
|
+
return False
|
|
248
|
+
if time.time() > self._timeout:
|
|
249
|
+
return False
|
|
250
|
+
except _InactiveRpcError as e:
|
|
251
|
+
pass
|
|
252
|
+
time.sleep(5)
|
|
253
|
+
|
|
254
|
+
def suspend(self):
|
|
255
|
+
"""
|
|
256
|
+
Suspends the cluster operations (not implemented).
|
|
257
|
+
|
|
258
|
+
Placeholder method to be implemented for suspending a cluster,
|
|
259
|
+
typically interacting with the remote cluster service API.
|
|
260
|
+
"""
|
|
261
|
+
pass
|
|
@@ -53,14 +53,31 @@ def _parse_timestamp(value):
|
|
|
53
53
|
value = datetime.datetime.strptime(value, format)
|
|
54
54
|
else:
|
|
55
55
|
raise Exception(
|
|
56
|
-
'Cannot convert "{}" into a datetime'.format(value)
|
|
56
|
+
'Cannot convert "{}" into a datetime'.format(value)
|
|
57
|
+
)
|
|
57
58
|
else:
|
|
58
59
|
value = None
|
|
59
60
|
return value
|
|
60
61
|
|
|
61
62
|
|
|
62
|
-
TYPES_CONVERTER = {
|
|
63
|
-
|
|
63
|
+
TYPES_CONVERTER = {
|
|
64
|
+
"DECIMAL_TYPE": Decimal,
|
|
65
|
+
"TIMESTAMP_TYPE": _parse_timestamp
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def re_auth(func):
|
|
70
|
+
def wrapper(self, *args, **kwargs):
|
|
71
|
+
try:
|
|
72
|
+
return func(self, *args, **kwargs)
|
|
73
|
+
except _InactiveRpcError as e:
|
|
74
|
+
if e.code() == grpc.StatusCode.INTERNAL and 'Access denied' in e.details():
|
|
75
|
+
self.connection.get_re_authenticate_session_id()
|
|
76
|
+
return func(self, *args, **kwargs)
|
|
77
|
+
else:
|
|
78
|
+
raise e
|
|
79
|
+
|
|
80
|
+
return wrapper
|
|
64
81
|
|
|
65
82
|
|
|
66
83
|
class HiveParamEscaper(ParamEscaper):
|
|
@@ -148,8 +165,6 @@ class Connection(object):
|
|
|
148
165
|
- max_receive_message_length: This parameter sets the maximum allowed size (in bytes) for incoming messages on the gRPC server.
|
|
149
166
|
- max_send_message_length: Similar to max_receive_message_length, this parameter sets the maximum allowed size (in bytes) for outgoing messages from the gRPC client
|
|
150
167
|
- grpc_prepare_timeout: Timeout for prepare statement API call (default to 10 minutes).
|
|
151
|
-
#keep-alive parameters
|
|
152
|
-
- keepalive_time_ms: This parameter defines the time, in milliseconds, Default to 30 seconds
|
|
153
168
|
"""
|
|
154
169
|
if not username or not password:
|
|
155
170
|
raise ValueError("username or password cannot be empty.")
|
|
@@ -170,18 +185,17 @@ class Connection(object):
|
|
|
170
185
|
self._auto_resume = auto_resume
|
|
171
186
|
|
|
172
187
|
self._keepalive_timeout_ms = 900000
|
|
173
|
-
self._keepalive_time_ms = 30000
|
|
174
188
|
self._max_receive_message_length = -1
|
|
175
189
|
self._max_send_message_length = 300 * 1024 * 1024 # mb
|
|
176
190
|
self.grpc_prepare_timeout = 10 * 60 # 10 minutes
|
|
191
|
+
self._planner_ip = None
|
|
177
192
|
|
|
178
|
-
if
|
|
193
|
+
if isinstance(grpc_options, dict):
|
|
179
194
|
self._keepalive_timeout_ms = grpc_options.get('keepalive_timeout_ms') or self._keepalive_timeout_ms
|
|
180
195
|
self._max_receive_message_length = grpc_options.get(
|
|
181
196
|
'max_receive_message_length') or self._max_receive_message_length
|
|
182
197
|
self._max_send_message_length = grpc_options.get('max_send_message_length') or self._max_send_message_length
|
|
183
198
|
self.grpc_prepare_timeout = grpc_options.get('grpc_prepare_timeout') or self.grpc_prepare_timeout
|
|
184
|
-
self._keepalive_time_ms = grpc_options.get('keepalive_time_ms') or self._keepalive_time_ms
|
|
185
199
|
self._create_client()
|
|
186
200
|
|
|
187
201
|
def _create_client(self):
|
|
@@ -191,12 +205,7 @@ class Connection(object):
|
|
|
191
205
|
options=[
|
|
192
206
|
("grpc.keepalive_timeout_ms", self._keepalive_timeout_ms),
|
|
193
207
|
('grpc.max_send_message_length', self._max_send_message_length),
|
|
194
|
-
('grpc.max_receive_message_length', self._max_receive_message_length)
|
|
195
|
-
('grpc.keepalive_time_ms', self._keepalive_time_ms),
|
|
196
|
-
('grpc.keepalive_permit_without_calls', 1), # Allow keep-alives with no active RPCs
|
|
197
|
-
('grpc.http2.max_pings_without_data', 0), # Unlimited pings without data
|
|
198
|
-
('grpc.http2.min_time_between_pings_ms', 15000), # Minimum 15 seconds between pings
|
|
199
|
-
('grpc.http2.min_ping_interval_without_data_ms', 15000)# Minimum 15 seconds between pings without data
|
|
208
|
+
('grpc.max_receive_message_length', self._max_receive_message_length)
|
|
200
209
|
],
|
|
201
210
|
credentials=grpc.ssl_channel_credentials()
|
|
202
211
|
)
|
|
@@ -206,16 +215,16 @@ class Connection(object):
|
|
|
206
215
|
options=[
|
|
207
216
|
("grpc.keepalive_timeout_ms", self._keepalive_timeout_ms),
|
|
208
217
|
('grpc.max_send_message_length', self._max_send_message_length),
|
|
209
|
-
('grpc.max_receive_message_length', self._max_receive_message_length)
|
|
210
|
-
('grpc.keepalive_time_ms', self._keepalive_time_ms),
|
|
211
|
-
('grpc.keepalive_permit_without_calls', 1), # Allow keep-alives with no active RPCs
|
|
212
|
-
('grpc.http2.max_pings_without_data', 0), # Unlimited pings without data
|
|
213
|
-
('grpc.http2.min_time_between_pings_ms', 15000), # Minimum 15 seconds between pings
|
|
214
|
-
('grpc.http2.min_ping_interval_without_data_ms', 15000)# Minimum 15 seconds between pings without data
|
|
218
|
+
('grpc.max_receive_message_length', self._max_receive_message_length)
|
|
215
219
|
]
|
|
216
220
|
)
|
|
217
221
|
self._client = e6x_engine_pb2_grpc.QueryEngineServiceStub(self._channel)
|
|
218
222
|
|
|
223
|
+
def get_re_authenticate_session_id(self):
|
|
224
|
+
self.close()
|
|
225
|
+
self._create_client()
|
|
226
|
+
return self.get_session_id
|
|
227
|
+
|
|
219
228
|
@property
|
|
220
229
|
def get_session_id(self):
|
|
221
230
|
"""
|
|
@@ -232,17 +241,19 @@ class Connection(object):
|
|
|
232
241
|
metadata=_get_grpc_header(cluster=self.cluster_uuid)
|
|
233
242
|
)
|
|
234
243
|
self._session_id = authenticate_response.sessionId
|
|
244
|
+
self._planner_ip = authenticate_response.plannerIp
|
|
235
245
|
if not self._session_id:
|
|
236
246
|
raise ValueError("Invalid credentials.")
|
|
237
247
|
except _InactiveRpcError as e:
|
|
238
248
|
if self._auto_resume:
|
|
239
|
-
if e.code() == grpc.StatusCode.
|
|
249
|
+
if e.code() == grpc.StatusCode.UNAVAILABLE and 'status: 503' in e.details():
|
|
240
250
|
status = ClusterManager(
|
|
241
251
|
host=self._host,
|
|
242
252
|
port=self._port,
|
|
243
253
|
user=self.__username,
|
|
244
254
|
password=self.__password,
|
|
245
|
-
secure_channel=self._secure_channel
|
|
255
|
+
secure_channel=self._secure_channel,
|
|
256
|
+
cluster_uuid=self.cluster_uuid
|
|
246
257
|
).resume()
|
|
247
258
|
if status:
|
|
248
259
|
authenticate_request = e6x_engine_pb2.AuthenticateRequest(
|
|
@@ -254,6 +265,7 @@ class Connection(object):
|
|
|
254
265
|
metadata=_get_grpc_header(cluster=self.cluster_uuid)
|
|
255
266
|
)
|
|
256
267
|
self._session_id = authenticate_response.sessionId
|
|
268
|
+
self._planner_ip = authenticate_response.plannerIp
|
|
257
269
|
else:
|
|
258
270
|
raise e
|
|
259
271
|
else:
|
|
@@ -411,6 +423,8 @@ class Cursor(DBAPICursor):
|
|
|
411
423
|
|
|
412
424
|
@property
|
|
413
425
|
def metadata(self):
|
|
426
|
+
if not self._engine_ip:
|
|
427
|
+
self._engine_ip = self.connection._planner_ip
|
|
414
428
|
return _get_grpc_header(engine_ip=self._engine_ip, cluster=self.connection.cluster_uuid)
|
|
415
429
|
|
|
416
430
|
@property
|
|
@@ -510,6 +524,7 @@ class Cursor(DBAPICursor):
|
|
|
510
524
|
)
|
|
511
525
|
return self.connection.client.status(status_request, metadata=self.metadata)
|
|
512
526
|
|
|
527
|
+
@re_auth
|
|
513
528
|
def execute(self, operation, parameters=None, **kwargs):
|
|
514
529
|
"""Prepare and execute a database operation (query or command).
|
|
515
530
|
Return values are not defined.
|
|
@@ -555,7 +570,8 @@ class Cursor(DBAPICursor):
|
|
|
555
570
|
sessionId=self.connection.get_session_id,
|
|
556
571
|
schema=self._database,
|
|
557
572
|
catalog=self._catalog_name,
|
|
558
|
-
queryString=sql
|
|
573
|
+
queryString=sql,
|
|
574
|
+
plannerIp=self._engine_ip
|
|
559
575
|
)
|
|
560
576
|
prepare_statement_response = client.prepareStatementV2(
|
|
561
577
|
prepare_statement_request,
|
|
@@ -565,6 +581,7 @@ class Cursor(DBAPICursor):
|
|
|
565
581
|
|
|
566
582
|
self._query_id = prepare_statement_response.queryId
|
|
567
583
|
self._engine_ip = prepare_statement_response.engineIP
|
|
584
|
+
|
|
568
585
|
execute_statement_request = e6x_engine_pb2.ExecuteStatementV2Request(
|
|
569
586
|
engineIP=self._engine_ip,
|
|
570
587
|
sessionId=self.connection.get_session_id,
|
|
@@ -649,7 +666,6 @@ class Cursor(DBAPICursor):
|
|
|
649
666
|
return self._fetch_all()
|
|
650
667
|
|
|
651
668
|
def fetchmany(self, size: int = None):
|
|
652
|
-
# _logger.info("fetching all from overriden method")
|
|
653
669
|
if size is None:
|
|
654
670
|
size = self.arraysize
|
|
655
671
|
if self._data is None:
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: e6x_engine.proto
|
|
4
|
+
# Protobuf Python Version: 5.26.1
|
|
5
|
+
"""Generated protocol buffer code."""
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
from google.protobuf.internal import builder as _builder
|
|
10
|
+
# @@protoc_insertion_point(imports)
|
|
11
|
+
|
|
12
|
+
_sym_db = _symbol_database.Default()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x65\x36x_engine.proto\"2\n\nGFieldInfo\x12\x11\n\tfieldName\x18\x01 \x01(\t\x12\x11\n\tfieldType\x18\x02 \x01(\t\"A\n\x13\x46\x61iledSchemaElement\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\"P\n\x16GetAddCatalogsResponse\x12\x0e\n\x06status\x18\x01 \x01(\t\x12&\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x14.FailedSchemaElement\"2\n\x0f\x43\x61talogResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tisDefault\x18\x02 \x01(\x08\"<\n\x0eParameterValue\x12\r\n\x05index\x18\x01 \x01(\x11\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"D\n\x0c\x43learRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\"\x0f\n\rClearResponse\"J\n\x12\x43\x61ncelQueryRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\"\x15\n\x13\x43\x61ncelQueryResponse\"F\n\x0e\x45xplainRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\"\"\n\x0f\x45xplainResponse\x12\x0f\n\x07\x65xplain\x18\x01 \x01(\t\"Y\n\rDryRunRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x13\n\x0bqueryString\x18\x04 \x01(\t\"%\n\x0e\x44ryRunResponse\x12\x13\n\x0b\x64ryrunValue\x18\x01 \x01(\t\"l\n\x0f\x44ryRunRequestV2\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x13\n\x0bqueryString\x18\x04 \x01(\t\x12\x0f\n\x07\x63\x61talog\x18\x05 \x01(\t\"M\n\x15\x45xplainAnalyzeRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\"m\n\x16\x45xplainAnalyzeResponse\x12\x16\n\x0e\x65xplainAnalyze\x18\x01 \x01(\t\x12\x10\n\x08isCached\x18\x02 \x01(\x08\x12\x13\n\x0bparsingTime\x18\x03 \x01(\x12\x12\x14\n\x0cqueueingTime\x18\x04 \x01(\x12\"b\n\x17PrepareStatementRequest\x12\x11\n\tsessionId\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x13\n\x0bqueryString\x18\x03 \x01(\t\x12\x0f\n\x07quoting\x18\x04 \x01(\t\"\x9b\x01\n\x19PrepareStatementV2Request\x12\x11\n\tsessionId\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x0f\n\x07\x63\x61talog\x18\x03 \x01(\t\x12\x13\n\x0bqueryString\x18\x04 \x01(\t\x12\x0f\n\x07quoting\x18\x05 \x01(\t\x12\x16\n\tplannerIp\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_plannerIp\"=\n\x18PrepareStatementResponse\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x0f\n\x07queryId\x18\x02 \x01(\t\"@\n\x0eUserAccessInfo\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x10\n\x08userName\x18\x02 \x01(\t\x12\x0e\n\x06tokens\x18\x03 \x03(\t\"g\n\x17\x45xecuteStatementRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\x12\x16\n\x0eshouldNotCache\x18\x04 \x01(\x08\"\x8a\x01\n\x19\x45xecuteStatementV2Request\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\x12\x16\n\x0eshouldNotCache\x18\x04 \x01(\x08\x12\x1f\n\x06params\x18\x05 \x03(\x0b\x32\x0f.ParameterValue\"\x1a\n\x18\x45xecuteStatementResponse\"O\n\x17GetNextResultRowRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\"-\n\x18GetNextResultRowResponse\x12\x11\n\tresultRow\x18\x02 \x01(\x0c\"w\n\x19GetNextResultBatchRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\x12\x16\n\tasRowData\x18\x04 \x01(\x08H\x00\x88\x01\x01\x42\x0c\n\n_asRowData\"1\n\x1aGetNextResultBatchResponse\x12\x13\n\x0bresultBatch\x18\x02 \x01(\x0c\"P\n\x18GetResultMetadataRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\"3\n\x19GetResultMetadataResponse\x12\x16\n\x0eresultMetaData\x18\x01 \x01(\x0c\"5\n\x13\x41uthenticateRequest\x12\x0c\n\x04user\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"<\n\x14\x41uthenticateResponse\x12\x11\n\tsessionId\x18\x01 \x01(\t\x12\x11\n\tplannerIp\x18\x02 \x01(\t\"5\n\x10GetTablesRequest\x12\x11\n\tsessionId\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\"H\n\x12GetTablesV2Request\x12\x11\n\tsessionId\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x0f\n\x07\x63\x61talog\x18\x03 \x01(\t\"#\n\x11GetTablesResponse\x12\x0e\n\x06tables\x18\x01 \x03(\t\"*\n\x15GetSchemaNamesRequest\x12\x11\n\tsessionId\x18\x01 \x01(\t\"=\n\x17GetSchemaNamesV2Request\x12\x11\n\tsessionId\x18\x01 \x01(\t\x12\x0f\n\x07\x63\x61talog\x18\x02 \x01(\t\")\n\x16GetSchemaNamesResponse\x12\x0f\n\x07schemas\x18\x01 \x03(\t\"E\n\x11GetColumnsRequest\x12\x11\n\tsessionId\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\r\n\x05table\x18\x03 \x01(\t\"X\n\x13GetColumnsV2Request\x12\x11\n\tsessionId\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\r\n\x05table\x18\x03 \x01(\t\x12\x0f\n\x07\x63\x61talog\x18\x04 \x01(\t\"4\n\x12GetColumnsResponse\x12\x1e\n\tfieldInfo\x18\x01 \x03(\x0b\x32\x0b.GFieldInfo\"E\n\rStatusRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\"2\n\x0eStatusResponse\x12\x0e\n\x06status\x18\x02 \x01(\x08\x12\x10\n\x08rowCount\x18\x03 \x01(\x12\"5\n\x12\x41\x64\x64\x43\x61talogsRequest\x12\x11\n\tsessionId\x18\x01 \x01(\t\x12\x0c\n\x04json\x18\x02 \x01(\t\"#\n\x12UpdateUsersRequest\x12\r\n\x05users\x18\x01 \x01(\x0c\"\x15\n\x13UpdateUsersResponse\"3\n\x0fSetPropsRequest\x12\x11\n\tsessionId\x18\x01 \x01(\t\x12\r\n\x05props\x18\x02 \x01(\t\"\x12\n\x10SetPropsResponse\"*\n\x15GetAddCatalogsRequest\x12\x11\n\tsessionId\x18\x01 \x01(\t\"\x15\n\x13\x41\x64\x64\x43\x61talogsResponse\"\x15\n\x13GetCatalogesRequest\"B\n\x14GetCatalogesResponse\x12*\n\x10\x63\x61talogResponses\x18\x01 \x03(\x0b\x32\x10.CatalogResponse\"+\n\x16RefreshCatalogsRequest\x12\x11\n\tsessionId\x18\x01 \x01(\t\"\x19\n\x17RefreshCatalogsResponse\"X\n\x12RemoteChunkRequest\x12\x17\n\x0foriginalQueryId\x18\x01 \x01(\t\x12\x15\n\rremoteQueryId\x18\x02 \x01(\t\x12\x12\n\nsQueryHash\x18\x03 \x01(\t\"3\n\x13RemoteChunkResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\x12\r\n\x05\x63hunk\x18\x02 \x01(\x0c\"Q\n\x19\x43learOrCancelQueryRequest\x12\x10\n\x08\x65ngineIP\x18\x01 \x01(\t\x12\x11\n\tsessionId\x18\x02 \x01(\t\x12\x0f\n\x07queryId\x18\x03 \x01(\t\"\x1c\n\x1a\x43learOrCancelQueryResponse2\xaa\x0e\n\x12QueryEngineService\x12&\n\x05\x63lear\x12\r.ClearRequest\x1a\x0e.ClearResponse\x12\x38\n\x0b\x63\x61ncelQuery\x12\x13.CancelQueryRequest\x1a\x14.CancelQueryResponse\x12M\n\x12\x63learOrCancelQuery\x12\x1a.ClearOrCancelQueryRequest\x1a\x1b.ClearOrCancelQueryResponse\x12,\n\x07\x65xplain\x12\x0f.ExplainRequest\x1a\x10.ExplainResponse\x12)\n\x06\x64ryRun\x12\x0e.DryRunRequest\x1a\x0f.DryRunResponse\x12-\n\x08\x64ryRunV2\x12\x10.DryRunRequestV2\x1a\x0f.DryRunResponse\x12\x41\n\x0e\x65xplainAnalyze\x12\x16.ExplainAnalyzeRequest\x1a\x17.ExplainAnalyzeResponse\x12G\n\x10prepareStatement\x12\x18.PrepareStatementRequest\x1a\x19.PrepareStatementResponse\x12K\n\x12prepareStatementV2\x12\x1a.PrepareStatementV2Request\x1a\x19.PrepareStatementResponse\x12G\n\x10\x65xecuteStatement\x12\x18.ExecuteStatementRequest\x1a\x19.ExecuteStatementResponse\x12K\n\x12\x65xecuteStatementV2\x12\x1a.ExecuteStatementV2Request\x1a\x19.ExecuteStatementResponse\x12G\n\x10getNextResultRow\x12\x18.GetNextResultRowRequest\x1a\x19.GetNextResultRowResponse\x12M\n\x12getNextResultBatch\x12\x1a.GetNextResultBatchRequest\x1a\x1b.GetNextResultBatchResponse\x12J\n\x11getResultMetadata\x12\x19.GetResultMetadataRequest\x1a\x1a.GetResultMetadataResponse\x12;\n\x0c\x61uthenticate\x12\x14.AuthenticateRequest\x1a\x15.AuthenticateResponse\x12\x32\n\tgetTables\x12\x11.GetTablesRequest\x1a\x12.GetTablesResponse\x12\x36\n\x0bgetTablesV2\x12\x13.GetTablesV2Request\x1a\x12.GetTablesResponse\x12\x41\n\x0egetSchemaNames\x12\x16.GetSchemaNamesRequest\x1a\x17.GetSchemaNamesResponse\x12\x45\n\x10getSchemaNamesV2\x12\x18.GetSchemaNamesV2Request\x1a\x17.GetSchemaNamesResponse\x12\x35\n\ngetColumns\x12\x12.GetColumnsRequest\x1a\x13.GetColumnsResponse\x12\x39\n\x0cgetColumnsV2\x12\x14.GetColumnsV2Request\x1a\x13.GetColumnsResponse\x12\x38\n\x0bupdateUsers\x12\x13.UpdateUsersRequest\x1a\x14.UpdateUsersResponse\x12/\n\x08setProps\x12\x10.SetPropsRequest\x1a\x11.SetPropsResponse\x12)\n\x06status\x12\x0e.StatusRequest\x1a\x0f.StatusResponse\x12\x38\n\x0b\x61\x64\x64\x43\x61talogs\x12\x13.AddCatalogsRequest\x1a\x14.AddCatalogsResponse\x12I\n\x16getAddCatalogsResponse\x12\x16.GetAddCatalogsRequest\x1a\x17.GetAddCatalogsResponse\x12;\n\x0cgetCataloges\x12\x14.GetCatalogesRequest\x1a\x15.GetCatalogesResponse\x12\x45\n\x18getNextRemoteCachedChunk\x12\x13.RemoteChunkRequest\x1a\x14.RemoteChunkResponse\x12\x44\n\x0frefreshCatalogs\x12\x17.RefreshCatalogsRequest\x1a\x18.RefreshCatalogsResponseB\x02P\x01\x62\x06proto3')
|
|
18
|
+
|
|
19
|
+
_globals = globals()
|
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'e6x_engine_pb2', _globals)
|
|
22
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
23
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
24
|
+
_globals['DESCRIPTOR']._serialized_options = b'P\001'
|
|
25
|
+
_globals['_GFIELDINFO']._serialized_start=20
|
|
26
|
+
_globals['_GFIELDINFO']._serialized_end=70
|
|
27
|
+
_globals['_FAILEDSCHEMAELEMENT']._serialized_start=72
|
|
28
|
+
_globals['_FAILEDSCHEMAELEMENT']._serialized_end=137
|
|
29
|
+
_globals['_GETADDCATALOGSRESPONSE']._serialized_start=139
|
|
30
|
+
_globals['_GETADDCATALOGSRESPONSE']._serialized_end=219
|
|
31
|
+
_globals['_CATALOGRESPONSE']._serialized_start=221
|
|
32
|
+
_globals['_CATALOGRESPONSE']._serialized_end=271
|
|
33
|
+
_globals['_PARAMETERVALUE']._serialized_start=273
|
|
34
|
+
_globals['_PARAMETERVALUE']._serialized_end=333
|
|
35
|
+
_globals['_CLEARREQUEST']._serialized_start=335
|
|
36
|
+
_globals['_CLEARREQUEST']._serialized_end=403
|
|
37
|
+
_globals['_CLEARRESPONSE']._serialized_start=405
|
|
38
|
+
_globals['_CLEARRESPONSE']._serialized_end=420
|
|
39
|
+
_globals['_CANCELQUERYREQUEST']._serialized_start=422
|
|
40
|
+
_globals['_CANCELQUERYREQUEST']._serialized_end=496
|
|
41
|
+
_globals['_CANCELQUERYRESPONSE']._serialized_start=498
|
|
42
|
+
_globals['_CANCELQUERYRESPONSE']._serialized_end=519
|
|
43
|
+
_globals['_EXPLAINREQUEST']._serialized_start=521
|
|
44
|
+
_globals['_EXPLAINREQUEST']._serialized_end=591
|
|
45
|
+
_globals['_EXPLAINRESPONSE']._serialized_start=593
|
|
46
|
+
_globals['_EXPLAINRESPONSE']._serialized_end=627
|
|
47
|
+
_globals['_DRYRUNREQUEST']._serialized_start=629
|
|
48
|
+
_globals['_DRYRUNREQUEST']._serialized_end=718
|
|
49
|
+
_globals['_DRYRUNRESPONSE']._serialized_start=720
|
|
50
|
+
_globals['_DRYRUNRESPONSE']._serialized_end=757
|
|
51
|
+
_globals['_DRYRUNREQUESTV2']._serialized_start=759
|
|
52
|
+
_globals['_DRYRUNREQUESTV2']._serialized_end=867
|
|
53
|
+
_globals['_EXPLAINANALYZEREQUEST']._serialized_start=869
|
|
54
|
+
_globals['_EXPLAINANALYZEREQUEST']._serialized_end=946
|
|
55
|
+
_globals['_EXPLAINANALYZERESPONSE']._serialized_start=948
|
|
56
|
+
_globals['_EXPLAINANALYZERESPONSE']._serialized_end=1057
|
|
57
|
+
_globals['_PREPARESTATEMENTREQUEST']._serialized_start=1059
|
|
58
|
+
_globals['_PREPARESTATEMENTREQUEST']._serialized_end=1157
|
|
59
|
+
_globals['_PREPARESTATEMENTV2REQUEST']._serialized_start=1160
|
|
60
|
+
_globals['_PREPARESTATEMENTV2REQUEST']._serialized_end=1315
|
|
61
|
+
_globals['_PREPARESTATEMENTRESPONSE']._serialized_start=1317
|
|
62
|
+
_globals['_PREPARESTATEMENTRESPONSE']._serialized_end=1378
|
|
63
|
+
_globals['_USERACCESSINFO']._serialized_start=1380
|
|
64
|
+
_globals['_USERACCESSINFO']._serialized_end=1444
|
|
65
|
+
_globals['_EXECUTESTATEMENTREQUEST']._serialized_start=1446
|
|
66
|
+
_globals['_EXECUTESTATEMENTREQUEST']._serialized_end=1549
|
|
67
|
+
_globals['_EXECUTESTATEMENTV2REQUEST']._serialized_start=1552
|
|
68
|
+
_globals['_EXECUTESTATEMENTV2REQUEST']._serialized_end=1690
|
|
69
|
+
_globals['_EXECUTESTATEMENTRESPONSE']._serialized_start=1692
|
|
70
|
+
_globals['_EXECUTESTATEMENTRESPONSE']._serialized_end=1718
|
|
71
|
+
_globals['_GETNEXTRESULTROWREQUEST']._serialized_start=1720
|
|
72
|
+
_globals['_GETNEXTRESULTROWREQUEST']._serialized_end=1799
|
|
73
|
+
_globals['_GETNEXTRESULTROWRESPONSE']._serialized_start=1801
|
|
74
|
+
_globals['_GETNEXTRESULTROWRESPONSE']._serialized_end=1846
|
|
75
|
+
_globals['_GETNEXTRESULTBATCHREQUEST']._serialized_start=1848
|
|
76
|
+
_globals['_GETNEXTRESULTBATCHREQUEST']._serialized_end=1967
|
|
77
|
+
_globals['_GETNEXTRESULTBATCHRESPONSE']._serialized_start=1969
|
|
78
|
+
_globals['_GETNEXTRESULTBATCHRESPONSE']._serialized_end=2018
|
|
79
|
+
_globals['_GETRESULTMETADATAREQUEST']._serialized_start=2020
|
|
80
|
+
_globals['_GETRESULTMETADATAREQUEST']._serialized_end=2100
|
|
81
|
+
_globals['_GETRESULTMETADATARESPONSE']._serialized_start=2102
|
|
82
|
+
_globals['_GETRESULTMETADATARESPONSE']._serialized_end=2153
|
|
83
|
+
_globals['_AUTHENTICATEREQUEST']._serialized_start=2155
|
|
84
|
+
_globals['_AUTHENTICATEREQUEST']._serialized_end=2208
|
|
85
|
+
_globals['_AUTHENTICATERESPONSE']._serialized_start=2210
|
|
86
|
+
_globals['_AUTHENTICATERESPONSE']._serialized_end=2270
|
|
87
|
+
_globals['_GETTABLESREQUEST']._serialized_start=2272
|
|
88
|
+
_globals['_GETTABLESREQUEST']._serialized_end=2325
|
|
89
|
+
_globals['_GETTABLESV2REQUEST']._serialized_start=2327
|
|
90
|
+
_globals['_GETTABLESV2REQUEST']._serialized_end=2399
|
|
91
|
+
_globals['_GETTABLESRESPONSE']._serialized_start=2401
|
|
92
|
+
_globals['_GETTABLESRESPONSE']._serialized_end=2436
|
|
93
|
+
_globals['_GETSCHEMANAMESREQUEST']._serialized_start=2438
|
|
94
|
+
_globals['_GETSCHEMANAMESREQUEST']._serialized_end=2480
|
|
95
|
+
_globals['_GETSCHEMANAMESV2REQUEST']._serialized_start=2482
|
|
96
|
+
_globals['_GETSCHEMANAMESV2REQUEST']._serialized_end=2543
|
|
97
|
+
_globals['_GETSCHEMANAMESRESPONSE']._serialized_start=2545
|
|
98
|
+
_globals['_GETSCHEMANAMESRESPONSE']._serialized_end=2586
|
|
99
|
+
_globals['_GETCOLUMNSREQUEST']._serialized_start=2588
|
|
100
|
+
_globals['_GETCOLUMNSREQUEST']._serialized_end=2657
|
|
101
|
+
_globals['_GETCOLUMNSV2REQUEST']._serialized_start=2659
|
|
102
|
+
_globals['_GETCOLUMNSV2REQUEST']._serialized_end=2747
|
|
103
|
+
_globals['_GETCOLUMNSRESPONSE']._serialized_start=2749
|
|
104
|
+
_globals['_GETCOLUMNSRESPONSE']._serialized_end=2801
|
|
105
|
+
_globals['_STATUSREQUEST']._serialized_start=2803
|
|
106
|
+
_globals['_STATUSREQUEST']._serialized_end=2872
|
|
107
|
+
_globals['_STATUSRESPONSE']._serialized_start=2874
|
|
108
|
+
_globals['_STATUSRESPONSE']._serialized_end=2924
|
|
109
|
+
_globals['_ADDCATALOGSREQUEST']._serialized_start=2926
|
|
110
|
+
_globals['_ADDCATALOGSREQUEST']._serialized_end=2979
|
|
111
|
+
_globals['_UPDATEUSERSREQUEST']._serialized_start=2981
|
|
112
|
+
_globals['_UPDATEUSERSREQUEST']._serialized_end=3016
|
|
113
|
+
_globals['_UPDATEUSERSRESPONSE']._serialized_start=3018
|
|
114
|
+
_globals['_UPDATEUSERSRESPONSE']._serialized_end=3039
|
|
115
|
+
_globals['_SETPROPSREQUEST']._serialized_start=3041
|
|
116
|
+
_globals['_SETPROPSREQUEST']._serialized_end=3092
|
|
117
|
+
_globals['_SETPROPSRESPONSE']._serialized_start=3094
|
|
118
|
+
_globals['_SETPROPSRESPONSE']._serialized_end=3112
|
|
119
|
+
_globals['_GETADDCATALOGSREQUEST']._serialized_start=3114
|
|
120
|
+
_globals['_GETADDCATALOGSREQUEST']._serialized_end=3156
|
|
121
|
+
_globals['_ADDCATALOGSRESPONSE']._serialized_start=3158
|
|
122
|
+
_globals['_ADDCATALOGSRESPONSE']._serialized_end=3179
|
|
123
|
+
_globals['_GETCATALOGESREQUEST']._serialized_start=3181
|
|
124
|
+
_globals['_GETCATALOGESREQUEST']._serialized_end=3202
|
|
125
|
+
_globals['_GETCATALOGESRESPONSE']._serialized_start=3204
|
|
126
|
+
_globals['_GETCATALOGESRESPONSE']._serialized_end=3270
|
|
127
|
+
_globals['_REFRESHCATALOGSREQUEST']._serialized_start=3272
|
|
128
|
+
_globals['_REFRESHCATALOGSREQUEST']._serialized_end=3315
|
|
129
|
+
_globals['_REFRESHCATALOGSRESPONSE']._serialized_start=3317
|
|
130
|
+
_globals['_REFRESHCATALOGSRESPONSE']._serialized_end=3342
|
|
131
|
+
_globals['_REMOTECHUNKREQUEST']._serialized_start=3344
|
|
132
|
+
_globals['_REMOTECHUNKREQUEST']._serialized_end=3432
|
|
133
|
+
_globals['_REMOTECHUNKRESPONSE']._serialized_start=3434
|
|
134
|
+
_globals['_REMOTECHUNKRESPONSE']._serialized_end=3485
|
|
135
|
+
_globals['_CLEARORCANCELQUERYREQUEST']._serialized_start=3487
|
|
136
|
+
_globals['_CLEARORCANCELQUERYREQUEST']._serialized_end=3568
|
|
137
|
+
_globals['_CLEARORCANCELQUERYRESPONSE']._serialized_start=3570
|
|
138
|
+
_globals['_CLEARORCANCELQUERYRESPONSE']._serialized_end=3598
|
|
139
|
+
_globals['_QUERYENGINESERVICE']._serialized_start=3601
|
|
140
|
+
_globals['_QUERYENGINESERVICE']._serialized_end=5435
|
|
141
|
+
# @@protoc_insertion_point(module_scope)
|