e6data-python-connector 2.1.21.dev0__tar.gz → 2.2.1rc1__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.1.21.dev0/e6data_python_connector.egg-info → e6data_python_connector-2.2.1rc1}/PKG-INFO +4 -4
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/README.md +1 -1
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/cluster_manager.py +1 -13
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/dialect.py +4 -1
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/e6data_grpc.py +1 -2
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1/e6data_python_connector.egg-info}/PKG-INFO +4 -4
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector.egg-info/requires.txt +2 -2
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/setup.py +3 -3
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/LICENSE +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/MANIFEST.in +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/__init__.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/cluster_server/__init__.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/cluster_server/cluster_pb2.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/cluster_server/cluster_pb2_grpc.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/common.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/constants.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/datainputstream.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/date_time_utils.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/e6x_vector/__init__.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/e6x_vector/constants.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/e6x_vector/ttypes.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/exceptions.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/server/QueryEngineService.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/server/__init__.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/server/constants.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/server/e6x_engine_pb2.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/server/e6x_engine_pb2.pyi +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/server/e6x_engine_pb2_grpc.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/server/ttypes.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector/typeId.py +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector.egg-info/SOURCES.txt +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector.egg-info/dependency_links.txt +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector.egg-info/entry_points.txt +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/e6data_python_connector.egg-info/top_level.txt +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/pyproject.toml +0 -0
- {e6data_python_connector-2.1.21.dev0 → e6data_python_connector-2.2.1rc1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: e6data-python-connector
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.1rc1
|
|
4
4
|
Summary: Client for the e6data distributed SQL Engine.
|
|
5
5
|
Home-page: https://github.com/e6x-labs/e6data-python-connector
|
|
6
6
|
Author: Uniphi, Inc.
|
|
@@ -21,13 +21,13 @@ Requires-Dist: python-dateutil
|
|
|
21
21
|
Requires-Dist: pycryptodome
|
|
22
22
|
Requires-Dist: pytz
|
|
23
23
|
Requires-Dist: thrift
|
|
24
|
-
Requires-Dist: grpcio
|
|
25
|
-
Requires-Dist: grpcio-tools
|
|
24
|
+
Requires-Dist: grpcio==1.65.1
|
|
25
|
+
Requires-Dist: grpcio-tools==1.65.1
|
|
26
26
|
Requires-Dist: sqlalchemy
|
|
27
27
|
|
|
28
28
|
# e6data Python Connector
|
|
29
29
|
|
|
30
|
-

|
|
31
31
|
|
|
32
32
|
## Introduction
|
|
33
33
|
|
|
@@ -25,13 +25,11 @@ class _StatusLock:
|
|
|
25
25
|
def __enter__(self):
|
|
26
26
|
self._status_thread_lock.acquire(timeout=self._LOCK_TIMEOUT)
|
|
27
27
|
self._status_multiprocessing_lock.acquire(timeout=self._LOCK_TIMEOUT)
|
|
28
|
-
print('Locked threads and processes.')
|
|
29
28
|
return self
|
|
30
29
|
|
|
31
30
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
32
31
|
self._status_thread_lock.release()
|
|
33
32
|
self._status_multiprocessing_lock.release()
|
|
34
|
-
print('Released threads and processes.')
|
|
35
33
|
|
|
36
34
|
|
|
37
35
|
status_lock = _StatusLock()
|
|
@@ -65,30 +63,25 @@ class ClusterManager:
|
|
|
65
63
|
"""
|
|
66
64
|
with status_lock as lock:
|
|
67
65
|
if lock.is_active:
|
|
68
|
-
print('Cluster is already active')
|
|
69
66
|
return True
|
|
70
67
|
status_payload = cluster_pb2.ClusterStatusRequest(
|
|
71
68
|
user=self._user,
|
|
72
69
|
password=self._password
|
|
73
70
|
)
|
|
74
71
|
current_status = self._get_connection.status(status_payload)
|
|
75
|
-
print('Current status', current_status)
|
|
76
72
|
if current_status.status == 'suspended':
|
|
77
73
|
payload = cluster_pb2.ResumeRequest(
|
|
78
74
|
user=self._user,
|
|
79
75
|
password=self._password
|
|
80
76
|
)
|
|
81
77
|
response = self._get_connection.resume(payload)
|
|
82
|
-
print('resuming response', response.status)
|
|
83
78
|
elif current_status.status == 'active':
|
|
84
|
-
print('Cluster is already active.')
|
|
85
79
|
return True
|
|
86
80
|
elif current_status.status != 'resuming':
|
|
87
81
|
"""
|
|
88
82
|
If cluster is in resuming state already, start watching for the status.
|
|
89
83
|
Cluster is in different state, cannot resume.
|
|
90
84
|
"""
|
|
91
|
-
print('Cluster is in different state, cannot resume.')
|
|
92
85
|
return False
|
|
93
86
|
while True:
|
|
94
87
|
try:
|
|
@@ -97,20 +90,15 @@ class ClusterManager:
|
|
|
97
90
|
password=self._password
|
|
98
91
|
)
|
|
99
92
|
response = self._get_connection.status(status_payload)
|
|
100
|
-
print(response)
|
|
101
93
|
if response.status == 'active':
|
|
102
94
|
lock.set_active()
|
|
103
|
-
print('Breaking because of status:', response.status)
|
|
104
95
|
return True
|
|
105
96
|
if response.status in ['suspended', 'failed']:
|
|
106
|
-
print('Breaking because of status:', response.status)
|
|
107
97
|
return False
|
|
108
98
|
if time.time() > self._timeout:
|
|
109
|
-
print('Breaking because of timeout')
|
|
110
99
|
return False
|
|
111
100
|
except _InactiveRpcError as e:
|
|
112
|
-
|
|
113
|
-
print('Retrying')
|
|
101
|
+
pass
|
|
114
102
|
time.sleep(5)
|
|
115
103
|
|
|
116
104
|
def suspend(self):
|
|
@@ -215,6 +215,7 @@ class E6dataDialect(default.DefaultDialect):
|
|
|
215
215
|
catalog_name = None
|
|
216
216
|
cluster_uuid = None
|
|
217
217
|
secure = False
|
|
218
|
+
auto_resume = False
|
|
218
219
|
|
|
219
220
|
def _dialect_specific_select_one(self):
|
|
220
221
|
return "NOOP"
|
|
@@ -230,6 +231,7 @@ class E6dataDialect(default.DefaultDialect):
|
|
|
230
231
|
self.catalog_name = url.query.get("catalog")
|
|
231
232
|
self.cluster_uuid = url.query.get("cluster-uuid")
|
|
232
233
|
self.secure = url.query.get("secure") == 'true'
|
|
234
|
+
self.auto_resume = url.query.get("auto-resume") == 'true'
|
|
233
235
|
if not self.catalog_name:
|
|
234
236
|
raise Exception('Please specify catalog in query parameter.')
|
|
235
237
|
|
|
@@ -242,7 +244,8 @@ class E6dataDialect(default.DefaultDialect):
|
|
|
242
244
|
"database": database,
|
|
243
245
|
"catalog": self.catalog_name,
|
|
244
246
|
"cluster_uuid": self.cluster_uuid,
|
|
245
|
-
'secure': self.secure
|
|
247
|
+
'secure': self.secure,
|
|
248
|
+
'auto_resume': self.auto_resume
|
|
246
249
|
}
|
|
247
250
|
return [], kwargs
|
|
248
251
|
|
|
@@ -215,8 +215,7 @@ class Connection(object):
|
|
|
215
215
|
)
|
|
216
216
|
authenticate_response = self._client.authenticate(
|
|
217
217
|
authenticate_request,
|
|
218
|
-
metadata=_get_grpc_header(cluster=self.cluster_uuid)
|
|
219
|
-
# timeout=3
|
|
218
|
+
metadata=_get_grpc_header(cluster=self.cluster_uuid)
|
|
220
219
|
)
|
|
221
220
|
self._session_id = authenticate_response.sessionId
|
|
222
221
|
if not self._session_id:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: e6data-python-connector
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.1rc1
|
|
4
4
|
Summary: Client for the e6data distributed SQL Engine.
|
|
5
5
|
Home-page: https://github.com/e6x-labs/e6data-python-connector
|
|
6
6
|
Author: Uniphi, Inc.
|
|
@@ -21,13 +21,13 @@ Requires-Dist: python-dateutil
|
|
|
21
21
|
Requires-Dist: pycryptodome
|
|
22
22
|
Requires-Dist: pytz
|
|
23
23
|
Requires-Dist: thrift
|
|
24
|
-
Requires-Dist: grpcio
|
|
25
|
-
Requires-Dist: grpcio-tools
|
|
24
|
+
Requires-Dist: grpcio==1.65.1
|
|
25
|
+
Requires-Dist: grpcio-tools==1.65.1
|
|
26
26
|
Requires-Dist: sqlalchemy
|
|
27
27
|
|
|
28
28
|
# e6data Python Connector
|
|
29
29
|
|
|
30
|
-

|
|
31
31
|
|
|
32
32
|
## Introduction
|
|
33
33
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import setuptools
|
|
14
14
|
|
|
15
|
-
VERSION = [2,
|
|
15
|
+
VERSION = [2, 2, 1, 'rc1']
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def get_long_desc():
|
|
@@ -40,8 +40,8 @@ setuptools.setup(
|
|
|
40
40
|
'pycryptodome',
|
|
41
41
|
'pytz',
|
|
42
42
|
'thrift',
|
|
43
|
-
'grpcio',
|
|
44
|
-
'grpcio-tools',
|
|
43
|
+
'grpcio==1.65.1',
|
|
44
|
+
'grpcio-tools==1.65.1',
|
|
45
45
|
'sqlalchemy'
|
|
46
46
|
],
|
|
47
47
|
classifiers=[
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|