e6data-python-connector 2.1.21.dev0__py3-none-any.whl → 2.2.1rc1__py3-none-any.whl

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.
@@ -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
- print('On resume error', e)
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.1.21.dev0
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
- ![version](https://img.shields.io/badge/version-2.1.21-blue.svg)
30
+ ![version](https://img.shields.io/badge/version-2.2.0.dev.rc1,-blue.svg)
31
31
 
32
32
  ## Introduction
33
33
 
@@ -1,11 +1,11 @@
1
1
  e6data_python_connector/__init__.py,sha256=x_VwhPQ7XLlthR-NJL9Vl7lkLBRCG2pSjmyZSBHOBpM,103
2
- e6data_python_connector/cluster_manager.py,sha256=0IcXhcg9Eci4OFTix2J82v6eylCK-Kwg_fLrC3rhURI,4331
2
+ e6data_python_connector/cluster_manager.py,sha256=21UW7Sr4t5_ZlnxmcutLp-OI2jB1ldGnUmfRsa4qbxA,3635
3
3
  e6data_python_connector/common.py,sha256=nk0CDQ5j1iu8DctBOXX4QypPYmxSgIgoA-Cn1UZXLic,9976
4
4
  e6data_python_connector/constants.py,sha256=h5w0lWiFsxz__zUZRlo1f72-8mT_vt9gcWvtWh0viFI,682
5
5
  e6data_python_connector/datainputstream.py,sha256=2XKW__PCGfTQ55Puqgie2LZdk_WU-YKwpEIUOQEF-sY,12592
6
6
  e6data_python_connector/date_time_utils.py,sha256=zmIwRhEGJwDvCOUjAl6VTDWGppluA-DPl_ioHTNpJKI,14413
7
- e6data_python_connector/dialect.py,sha256=M7vMHJgbnGqUdlY-XcDyeeXPwll9O7j1YAaySECLNpA,11177
8
- e6data_python_connector/e6data_grpc.py,sha256=3cDR-8etJDr5NBxT1D__w31Lhd_jAlvVR8m-hrS1rk8,26231
7
+ e6data_python_connector/dialect.py,sha256=hkVRjXxx9DhS8-aHpSoyMVhhHxVs3jdTE60x2aOAf5I,11312
8
+ e6data_python_connector/e6data_grpc.py,sha256=aWXyqcvCYwOHZTLw78u9do7HLrHP8B_PdUORKJkupVc,26198
9
9
  e6data_python_connector/exceptions.py,sha256=vrUqdzMq3LjbCmvr5_TcRq9eKmdqGfe-uVjR0BJQf5U,382
10
10
  e6data_python_connector/typeId.py,sha256=2EMNWK2SO5CBReNuJphma6xp-69r9GDwwys66t-kSk0,1777
11
11
  e6data_python_connector/cluster_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -21,9 +21,9 @@ e6data_python_connector/server/e6x_engine_pb2.py,sha256=BxJjbijNrEqXQTWEhzLm54Fq
21
21
  e6data_python_connector/server/e6x_engine_pb2.pyi,sha256=_aQDLFbSCQ7ubK0Z5ZKh9_VAHFaXbMV55MXYXr85srg,18693
22
22
  e6data_python_connector/server/e6x_engine_pb2_grpc.py,sha256=n-eTCsAjsmpgPA_bDansKZq_zMmqkK6TlQGn6IdT6L4,46671
23
23
  e6data_python_connector/server/ttypes.py,sha256=uWxwSp4m6e-7SeSEckbZtSduGYmfzXWM09iy5eltBPA,21227
24
- e6data_python_connector-2.1.21.dev0.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
25
- e6data_python_connector-2.1.21.dev0.dist-info/METADATA,sha256=_ks_S8Q04Umv8dMki--h-MAr3HWNc50_ZLSDRPDy1Yg,6949
26
- e6data_python_connector-2.1.21.dev0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
27
- e6data_python_connector-2.1.21.dev0.dist-info/entry_points.txt,sha256=MDK4cAOND0preLvq2Tlpnz00wXnP_Y_UopqJsAf3U7Y,77
28
- e6data_python_connector-2.1.21.dev0.dist-info/top_level.txt,sha256=ChOS6qLf-SQycXr0uBiVxomIfYfbH2SgwrOWhW79ab0,24
29
- e6data_python_connector-2.1.21.dev0.dist-info/RECORD,,
24
+ e6data_python_connector-2.2.1rc1.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
25
+ e6data_python_connector-2.2.1rc1.dist-info/METADATA,sha256=bQF3HlAF-KkbKKaK0nBeyjsJlGZamBUwHkXo-8Q6czo,6972
26
+ e6data_python_connector-2.2.1rc1.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
27
+ e6data_python_connector-2.2.1rc1.dist-info/entry_points.txt,sha256=MDK4cAOND0preLvq2Tlpnz00wXnP_Y_UopqJsAf3U7Y,77
28
+ e6data_python_connector-2.2.1rc1.dist-info/top_level.txt,sha256=ChOS6qLf-SQycXr0uBiVxomIfYfbH2SgwrOWhW79ab0,24
29
+ e6data_python_connector-2.2.1rc1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (71.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5