apache-iotdb 1.3.3__tar.gz → 1.3.4__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.
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/PKG-INFO +1 -1
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/apache_iotdb.egg-info/PKG-INFO +1 -1
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/Session.py +48 -11
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/SessionPool.py +12 -3
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/thrift/common/ttypes.py +92 -72
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/thrift/rpc/ttypes.py +13 -1
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/utils/IoTDBRpcDataSet.py +3 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/pyproject.toml +3 -3
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/README.md +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/apache_iotdb.egg-info/SOURCES.txt +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/apache_iotdb.egg-info/dependency_links.txt +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/apache_iotdb.egg-info/entry_points.txt +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/apache_iotdb.egg-info/requires.txt +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/apache_iotdb.egg-info/top_level.txt +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/IoTDBContainer.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/dbapi/Connection.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/dbapi/Cursor.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/dbapi/Exceptions.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/dbapi/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/dbapi/tests/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/dbapi/tests/test_connection.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/dbapi/tests/test_cursor.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/sqlalchemy/IoTDBDialect.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/sqlalchemy/IoTDBIdentifierPreparer.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/sqlalchemy/IoTDBSQLCompiler.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/sqlalchemy/IoTDBTypeCompiler.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/sqlalchemy/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/sqlalchemy/tests/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/sqlalchemy/tests/test_dialect.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/template/MeasurementNode.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/template/Template.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/template/TemplateNode.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/template/TemplateQueryType.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/template/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/thrift/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/thrift/common/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/thrift/common/constants.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/thrift/rpc/IClientRPCService.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/thrift/rpc/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/thrift/rpc/constants.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/tsfile/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/tsfile/common/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/tsfile/common/constant/TsFileConstant.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/tsfile/common/constant/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/tsfile/utils/DateUtils.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/tsfile/utils/Pair.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/tsfile/utils/ReadWriteIOUtils.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/tsfile/utils/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/utils/BitMap.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/utils/Field.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/utils/IoTDBConnectionException.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/utils/IoTDBConstants.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/utils/NumpyTablet.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/utils/RowRecord.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/utils/SessionDataSet.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/utils/Tablet.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/iotdb/utils/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/setup.cfg +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/tablet_performance_comparison.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/test_aligned_timeseries.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/test_dataframe.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/test_delete_data.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/test_new_data_types.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/test_one_device.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/test_session.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/test_session_pool.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/test_tablet.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/test_todf.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/unit/__init__.py +0 -0
- {apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/unit/test_numpy_tablet.py +0 -0
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import logging
|
|
20
20
|
import random
|
|
21
|
+
import sys
|
|
21
22
|
import struct
|
|
22
23
|
import time
|
|
23
24
|
import warnings
|
|
@@ -84,6 +85,9 @@ class Session(object):
|
|
|
84
85
|
fetch_size=DEFAULT_FETCH_SIZE,
|
|
85
86
|
zone_id=DEFAULT_ZONE_ID,
|
|
86
87
|
enable_redirection=True,
|
|
88
|
+
use_ssl=False,
|
|
89
|
+
ca_certs=None,
|
|
90
|
+
connection_timeout_in_ms=None,
|
|
87
91
|
):
|
|
88
92
|
self.__host = host
|
|
89
93
|
self.__port = port
|
|
@@ -104,6 +108,9 @@ class Session(object):
|
|
|
104
108
|
self.__enable_redirection = enable_redirection
|
|
105
109
|
self.__device_id_to_endpoint = None
|
|
106
110
|
self.__endpoint_to_connection = None
|
|
111
|
+
self.__use_ssl = use_ssl
|
|
112
|
+
self.__ca_certs = ca_certs
|
|
113
|
+
self.__connection_timeout_in_ms = connection_timeout_in_ms
|
|
107
114
|
|
|
108
115
|
@classmethod
|
|
109
116
|
def init_from_node_urls(
|
|
@@ -114,11 +121,23 @@ class Session(object):
|
|
|
114
121
|
fetch_size=DEFAULT_FETCH_SIZE,
|
|
115
122
|
zone_id=DEFAULT_ZONE_ID,
|
|
116
123
|
enable_redirection=True,
|
|
124
|
+
use_ssl=False,
|
|
125
|
+
ca_certs=None,
|
|
126
|
+
connection_timeout_in_ms=None,
|
|
117
127
|
):
|
|
118
128
|
if node_urls is None:
|
|
119
129
|
raise RuntimeError("node urls is empty")
|
|
120
130
|
session = Session(
|
|
121
|
-
None,
|
|
131
|
+
None,
|
|
132
|
+
None,
|
|
133
|
+
user,
|
|
134
|
+
password,
|
|
135
|
+
fetch_size,
|
|
136
|
+
zone_id,
|
|
137
|
+
enable_redirection,
|
|
138
|
+
use_ssl=use_ssl,
|
|
139
|
+
ca_certs=ca_certs,
|
|
140
|
+
connection_timeout_in_ms=connection_timeout_in_ms,
|
|
122
141
|
)
|
|
123
142
|
session.__hosts = []
|
|
124
143
|
session.__ports = []
|
|
@@ -166,16 +185,7 @@ class Session(object):
|
|
|
166
185
|
}
|
|
167
186
|
|
|
168
187
|
def init_connection(self, endpoint):
|
|
169
|
-
transport =
|
|
170
|
-
TSocket.TSocket(endpoint.ip, endpoint.port)
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
if not transport.isOpen():
|
|
174
|
-
try:
|
|
175
|
-
transport.open()
|
|
176
|
-
except TTransport.TTransportException as e:
|
|
177
|
-
raise IoTDBConnectionException(e) from None
|
|
178
|
-
|
|
188
|
+
transport = self.__get_transport(endpoint)
|
|
179
189
|
if self.__enable_rpc_compression:
|
|
180
190
|
client = Client(TCompactProtocol.TCompactProtocolAccelerated(transport))
|
|
181
191
|
else:
|
|
@@ -222,6 +232,33 @@ class Session(object):
|
|
|
222
232
|
self.__zone_id = self.get_time_zone()
|
|
223
233
|
return SessionConnection(client, transport, session_id, statement_id)
|
|
224
234
|
|
|
235
|
+
def __get_transport(self, endpoint):
|
|
236
|
+
if self.__use_ssl:
|
|
237
|
+
import ssl
|
|
238
|
+
from thrift.transport import TSSLSocket
|
|
239
|
+
|
|
240
|
+
if sys.version_info >= (3, 10):
|
|
241
|
+
context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
|
|
242
|
+
else:
|
|
243
|
+
context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
|
244
|
+
context.verify_mode = ssl.CERT_REQUIRED
|
|
245
|
+
context.check_hostname = True
|
|
246
|
+
context.load_verify_locations(cafile=self.__ca_certs)
|
|
247
|
+
socket = TSSLSocket.TSSLSocket(
|
|
248
|
+
host=endpoint.ip, port=endpoint.port, ssl_context=context
|
|
249
|
+
)
|
|
250
|
+
else:
|
|
251
|
+
socket = TSocket.TSocket(endpoint.ip, endpoint.port)
|
|
252
|
+
socket.setTimeout(self.__connection_timeout_in_ms)
|
|
253
|
+
transport = TTransport.TFramedTransport(socket)
|
|
254
|
+
|
|
255
|
+
if not transport.isOpen():
|
|
256
|
+
try:
|
|
257
|
+
transport.open()
|
|
258
|
+
except TTransport.TTransportException as e:
|
|
259
|
+
raise IoTDBConnectionException(e) from None
|
|
260
|
+
return transport
|
|
261
|
+
|
|
225
262
|
def is_open(self):
|
|
226
263
|
return not self.__is_close
|
|
227
264
|
|
|
@@ -42,6 +42,9 @@ class PoolConfig(object):
|
|
|
42
42
|
time_zone: str = DEFAULT_TIME_ZONE,
|
|
43
43
|
max_retry: int = DEFAULT_MAX_RETRY,
|
|
44
44
|
enable_compression: bool = False,
|
|
45
|
+
use_ssl: bool = False,
|
|
46
|
+
ca_certs: str = None,
|
|
47
|
+
connection_timeout_in_ms: int = None,
|
|
45
48
|
):
|
|
46
49
|
self.host = host
|
|
47
50
|
self.port = port
|
|
@@ -58,6 +61,9 @@ class PoolConfig(object):
|
|
|
58
61
|
self.time_zone = time_zone
|
|
59
62
|
self.max_retry = max_retry
|
|
60
63
|
self.enable_compression = enable_compression
|
|
64
|
+
self.use_ssl = use_ssl
|
|
65
|
+
self.ca_certs = ca_certs
|
|
66
|
+
self.connection_timeout_in_ms = connection_timeout_in_ms
|
|
61
67
|
|
|
62
68
|
|
|
63
69
|
class SessionPool(object):
|
|
@@ -80,6 +86,9 @@ class SessionPool(object):
|
|
|
80
86
|
self.__pool_config.password,
|
|
81
87
|
self.__pool_config.fetch_size,
|
|
82
88
|
self.__pool_config.time_zone,
|
|
89
|
+
use_ssl=self.__pool_config.use_ssl,
|
|
90
|
+
ca_certs=self.__pool_config.ca_certs,
|
|
91
|
+
connection_timeout_in_ms=self.__pool_config.connection_timeout_in_ms,
|
|
83
92
|
)
|
|
84
93
|
|
|
85
94
|
else:
|
|
@@ -90,6 +99,9 @@ class SessionPool(object):
|
|
|
90
99
|
self.__pool_config.password,
|
|
91
100
|
self.__pool_config.fetch_size,
|
|
92
101
|
self.__pool_config.time_zone,
|
|
102
|
+
use_ssl=self.__pool_config.use_ssl,
|
|
103
|
+
ca_certs=self.__pool_config.ca_certs,
|
|
104
|
+
connection_timeout_in_ms=self.__pool_config.connection_timeout_in_ms,
|
|
93
105
|
)
|
|
94
106
|
|
|
95
107
|
session.open(self.__pool_config.enable_compression)
|
|
@@ -102,7 +114,6 @@ class SessionPool(object):
|
|
|
102
114
|
return q
|
|
103
115
|
|
|
104
116
|
def get_session(self) -> Session:
|
|
105
|
-
|
|
106
117
|
if self.__closed:
|
|
107
118
|
raise ConnectionError("SessionPool has already been closed.")
|
|
108
119
|
|
|
@@ -137,7 +148,6 @@ class SessionPool(object):
|
|
|
137
148
|
return session
|
|
138
149
|
|
|
139
150
|
def put_back(self, session: Session):
|
|
140
|
-
|
|
141
151
|
if self.__closed:
|
|
142
152
|
raise ConnectionError(
|
|
143
153
|
"SessionPool has already been closed, please close the session manually."
|
|
@@ -150,7 +160,6 @@ class SessionPool(object):
|
|
|
150
160
|
self.__pool_size -= 1
|
|
151
161
|
|
|
152
162
|
def close(self):
|
|
153
|
-
|
|
154
163
|
with self.__lock:
|
|
155
164
|
while not self.__queue.empty():
|
|
156
165
|
session = self.__queue.get(block=False)
|
|
@@ -1203,13 +1203,15 @@ class TFlushReq(object):
|
|
|
1203
1203
|
Attributes:
|
|
1204
1204
|
- isSeq
|
|
1205
1205
|
- storageGroups
|
|
1206
|
+
- regionIds
|
|
1206
1207
|
|
|
1207
1208
|
"""
|
|
1208
1209
|
|
|
1209
1210
|
|
|
1210
|
-
def __init__(self, isSeq=None, storageGroups=None,):
|
|
1211
|
+
def __init__(self, isSeq=None, storageGroups=None, regionIds=None,):
|
|
1211
1212
|
self.isSeq = isSeq
|
|
1212
1213
|
self.storageGroups = storageGroups
|
|
1214
|
+
self.regionIds = regionIds
|
|
1213
1215
|
|
|
1214
1216
|
def read(self, iprot):
|
|
1215
1217
|
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
@@ -1235,6 +1237,16 @@ class TFlushReq(object):
|
|
|
1235
1237
|
iprot.readListEnd()
|
|
1236
1238
|
else:
|
|
1237
1239
|
iprot.skip(ftype)
|
|
1240
|
+
elif fid == 3:
|
|
1241
|
+
if ftype == TType.LIST:
|
|
1242
|
+
self.regionIds = []
|
|
1243
|
+
(_etype23, _size20) = iprot.readListBegin()
|
|
1244
|
+
for _i24 in range(_size20):
|
|
1245
|
+
_elem25 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1246
|
+
self.regionIds.append(_elem25)
|
|
1247
|
+
iprot.readListEnd()
|
|
1248
|
+
else:
|
|
1249
|
+
iprot.skip(ftype)
|
|
1238
1250
|
else:
|
|
1239
1251
|
iprot.skip(ftype)
|
|
1240
1252
|
iprot.readFieldEnd()
|
|
@@ -1252,8 +1264,15 @@ class TFlushReq(object):
|
|
|
1252
1264
|
if self.storageGroups is not None:
|
|
1253
1265
|
oprot.writeFieldBegin('storageGroups', TType.LIST, 2)
|
|
1254
1266
|
oprot.writeListBegin(TType.STRING, len(self.storageGroups))
|
|
1255
|
-
for
|
|
1256
|
-
oprot.writeString(
|
|
1267
|
+
for iter26 in self.storageGroups:
|
|
1268
|
+
oprot.writeString(iter26.encode('utf-8') if sys.version_info[0] == 2 else iter26)
|
|
1269
|
+
oprot.writeListEnd()
|
|
1270
|
+
oprot.writeFieldEnd()
|
|
1271
|
+
if self.regionIds is not None:
|
|
1272
|
+
oprot.writeFieldBegin('regionIds', TType.LIST, 3)
|
|
1273
|
+
oprot.writeListBegin(TType.STRING, len(self.regionIds))
|
|
1274
|
+
for iter27 in self.regionIds:
|
|
1275
|
+
oprot.writeString(iter27.encode('utf-8') if sys.version_info[0] == 2 else iter27)
|
|
1257
1276
|
oprot.writeListEnd()
|
|
1258
1277
|
oprot.writeFieldEnd()
|
|
1259
1278
|
oprot.writeFieldStop()
|
|
@@ -1297,10 +1316,10 @@ class TSettleReq(object):
|
|
|
1297
1316
|
if fid == 1:
|
|
1298
1317
|
if ftype == TType.LIST:
|
|
1299
1318
|
self.paths = []
|
|
1300
|
-
(
|
|
1301
|
-
for
|
|
1302
|
-
|
|
1303
|
-
self.paths.append(
|
|
1319
|
+
(_etype31, _size28) = iprot.readListBegin()
|
|
1320
|
+
for _i32 in range(_size28):
|
|
1321
|
+
_elem33 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1322
|
+
self.paths.append(_elem33)
|
|
1304
1323
|
iprot.readListEnd()
|
|
1305
1324
|
else:
|
|
1306
1325
|
iprot.skip(ftype)
|
|
@@ -1317,8 +1336,8 @@ class TSettleReq(object):
|
|
|
1317
1336
|
if self.paths is not None:
|
|
1318
1337
|
oprot.writeFieldBegin('paths', TType.LIST, 1)
|
|
1319
1338
|
oprot.writeListBegin(TType.STRING, len(self.paths))
|
|
1320
|
-
for
|
|
1321
|
-
oprot.writeString(
|
|
1339
|
+
for iter34 in self.paths:
|
|
1340
|
+
oprot.writeString(iter34.encode('utf-8') if sys.version_info[0] == 2 else iter34)
|
|
1322
1341
|
oprot.writeListEnd()
|
|
1323
1342
|
oprot.writeFieldEnd()
|
|
1324
1343
|
oprot.writeFieldStop()
|
|
@@ -1438,11 +1457,11 @@ class TSetConfigurationReq(object):
|
|
|
1438
1457
|
if fid == 1:
|
|
1439
1458
|
if ftype == TType.MAP:
|
|
1440
1459
|
self.configs = {}
|
|
1441
|
-
(
|
|
1442
|
-
for
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
self.configs[
|
|
1460
|
+
(_ktype36, _vtype37, _size35) = iprot.readMapBegin()
|
|
1461
|
+
for _i39 in range(_size35):
|
|
1462
|
+
_key40 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1463
|
+
_val41 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1464
|
+
self.configs[_key40] = _val41
|
|
1446
1465
|
iprot.readMapEnd()
|
|
1447
1466
|
else:
|
|
1448
1467
|
iprot.skip(ftype)
|
|
@@ -1464,9 +1483,9 @@ class TSetConfigurationReq(object):
|
|
|
1464
1483
|
if self.configs is not None:
|
|
1465
1484
|
oprot.writeFieldBegin('configs', TType.MAP, 1)
|
|
1466
1485
|
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.configs))
|
|
1467
|
-
for
|
|
1468
|
-
oprot.writeString(
|
|
1469
|
-
oprot.writeString(
|
|
1486
|
+
for kiter42, viter43 in self.configs.items():
|
|
1487
|
+
oprot.writeString(kiter42.encode('utf-8') if sys.version_info[0] == 2 else kiter42)
|
|
1488
|
+
oprot.writeString(viter43.encode('utf-8') if sys.version_info[0] == 2 else viter43)
|
|
1470
1489
|
oprot.writeMapEnd()
|
|
1471
1490
|
oprot.writeFieldEnd()
|
|
1472
1491
|
if self.nodeId is not None:
|
|
@@ -1522,10 +1541,10 @@ class TSetTTLReq(object):
|
|
|
1522
1541
|
if fid == 1:
|
|
1523
1542
|
if ftype == TType.LIST:
|
|
1524
1543
|
self.pathPattern = []
|
|
1525
|
-
(
|
|
1526
|
-
for
|
|
1527
|
-
|
|
1528
|
-
self.pathPattern.append(
|
|
1544
|
+
(_etype47, _size44) = iprot.readListBegin()
|
|
1545
|
+
for _i48 in range(_size44):
|
|
1546
|
+
_elem49 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1547
|
+
self.pathPattern.append(_elem49)
|
|
1529
1548
|
iprot.readListEnd()
|
|
1530
1549
|
else:
|
|
1531
1550
|
iprot.skip(ftype)
|
|
@@ -1552,8 +1571,8 @@ class TSetTTLReq(object):
|
|
|
1552
1571
|
if self.pathPattern is not None:
|
|
1553
1572
|
oprot.writeFieldBegin('pathPattern', TType.LIST, 1)
|
|
1554
1573
|
oprot.writeListBegin(TType.STRING, len(self.pathPattern))
|
|
1555
|
-
for
|
|
1556
|
-
oprot.writeString(
|
|
1574
|
+
for iter50 in self.pathPattern:
|
|
1575
|
+
oprot.writeString(iter50.encode('utf-8') if sys.version_info[0] == 2 else iter50)
|
|
1557
1576
|
oprot.writeListEnd()
|
|
1558
1577
|
oprot.writeFieldEnd()
|
|
1559
1578
|
if self.TTL is not None:
|
|
@@ -1611,10 +1630,10 @@ class TShowTTLReq(object):
|
|
|
1611
1630
|
if fid == 1:
|
|
1612
1631
|
if ftype == TType.LIST:
|
|
1613
1632
|
self.pathPattern = []
|
|
1614
|
-
(
|
|
1615
|
-
for
|
|
1616
|
-
|
|
1617
|
-
self.pathPattern.append(
|
|
1633
|
+
(_etype54, _size51) = iprot.readListBegin()
|
|
1634
|
+
for _i55 in range(_size51):
|
|
1635
|
+
_elem56 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1636
|
+
self.pathPattern.append(_elem56)
|
|
1618
1637
|
iprot.readListEnd()
|
|
1619
1638
|
else:
|
|
1620
1639
|
iprot.skip(ftype)
|
|
@@ -1631,8 +1650,8 @@ class TShowTTLReq(object):
|
|
|
1631
1650
|
if self.pathPattern is not None:
|
|
1632
1651
|
oprot.writeFieldBegin('pathPattern', TType.LIST, 1)
|
|
1633
1652
|
oprot.writeListBegin(TType.STRING, len(self.pathPattern))
|
|
1634
|
-
for
|
|
1635
|
-
oprot.writeString(
|
|
1653
|
+
for iter57 in self.pathPattern:
|
|
1654
|
+
oprot.writeString(iter57.encode('utf-8') if sys.version_info[0] == 2 else iter57)
|
|
1636
1655
|
oprot.writeListEnd()
|
|
1637
1656
|
oprot.writeFieldEnd()
|
|
1638
1657
|
oprot.writeFieldStop()
|
|
@@ -1758,11 +1777,11 @@ class TFilesResp(object):
|
|
|
1758
1777
|
elif fid == 2:
|
|
1759
1778
|
if ftype == TType.LIST:
|
|
1760
1779
|
self.files = []
|
|
1761
|
-
(
|
|
1762
|
-
for
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
self.files.append(
|
|
1780
|
+
(_etype61, _size58) = iprot.readListBegin()
|
|
1781
|
+
for _i62 in range(_size58):
|
|
1782
|
+
_elem63 = TFile()
|
|
1783
|
+
_elem63.read(iprot)
|
|
1784
|
+
self.files.append(_elem63)
|
|
1766
1785
|
iprot.readListEnd()
|
|
1767
1786
|
else:
|
|
1768
1787
|
iprot.skip(ftype)
|
|
@@ -1783,8 +1802,8 @@ class TFilesResp(object):
|
|
|
1783
1802
|
if self.files is not None:
|
|
1784
1803
|
oprot.writeFieldBegin('files', TType.LIST, 2)
|
|
1785
1804
|
oprot.writeListBegin(TType.STRUCT, len(self.files))
|
|
1786
|
-
for
|
|
1787
|
-
|
|
1805
|
+
for iter64 in self.files:
|
|
1806
|
+
iter64.write(oprot)
|
|
1788
1807
|
oprot.writeListEnd()
|
|
1789
1808
|
oprot.writeFieldEnd()
|
|
1790
1809
|
oprot.writeFieldStop()
|
|
@@ -1987,12 +2006,12 @@ class TThrottleQuota(object):
|
|
|
1987
2006
|
if fid == 1:
|
|
1988
2007
|
if ftype == TType.MAP:
|
|
1989
2008
|
self.throttleLimit = {}
|
|
1990
|
-
(
|
|
1991
|
-
for
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
self.throttleLimit[
|
|
2009
|
+
(_ktype66, _vtype67, _size65) = iprot.readMapBegin()
|
|
2010
|
+
for _i69 in range(_size65):
|
|
2011
|
+
_key70 = iprot.readI32()
|
|
2012
|
+
_val71 = TTimedQuota()
|
|
2013
|
+
_val71.read(iprot)
|
|
2014
|
+
self.throttleLimit[_key70] = _val71
|
|
1996
2015
|
iprot.readMapEnd()
|
|
1997
2016
|
else:
|
|
1998
2017
|
iprot.skip(ftype)
|
|
@@ -2019,9 +2038,9 @@ class TThrottleQuota(object):
|
|
|
2019
2038
|
if self.throttleLimit is not None:
|
|
2020
2039
|
oprot.writeFieldBegin('throttleLimit', TType.MAP, 1)
|
|
2021
2040
|
oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.throttleLimit))
|
|
2022
|
-
for
|
|
2023
|
-
oprot.writeI32(
|
|
2024
|
-
|
|
2041
|
+
for kiter72, viter73 in self.throttleLimit.items():
|
|
2042
|
+
oprot.writeI32(kiter72)
|
|
2043
|
+
viter73.write(oprot)
|
|
2025
2044
|
oprot.writeMapEnd()
|
|
2026
2045
|
oprot.writeFieldEnd()
|
|
2027
2046
|
if self.memLimit is not None:
|
|
@@ -2075,10 +2094,10 @@ class TSetSpaceQuotaReq(object):
|
|
|
2075
2094
|
if fid == 1:
|
|
2076
2095
|
if ftype == TType.LIST:
|
|
2077
2096
|
self.database = []
|
|
2078
|
-
(
|
|
2079
|
-
for
|
|
2080
|
-
|
|
2081
|
-
self.database.append(
|
|
2097
|
+
(_etype77, _size74) = iprot.readListBegin()
|
|
2098
|
+
for _i78 in range(_size74):
|
|
2099
|
+
_elem79 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2100
|
+
self.database.append(_elem79)
|
|
2082
2101
|
iprot.readListEnd()
|
|
2083
2102
|
else:
|
|
2084
2103
|
iprot.skip(ftype)
|
|
@@ -2101,8 +2120,8 @@ class TSetSpaceQuotaReq(object):
|
|
|
2101
2120
|
if self.database is not None:
|
|
2102
2121
|
oprot.writeFieldBegin('database', TType.LIST, 1)
|
|
2103
2122
|
oprot.writeListBegin(TType.STRING, len(self.database))
|
|
2104
|
-
for
|
|
2105
|
-
oprot.writeString(
|
|
2123
|
+
for iter80 in self.database:
|
|
2124
|
+
oprot.writeString(iter80.encode('utf-8') if sys.version_info[0] == 2 else iter80)
|
|
2106
2125
|
oprot.writeListEnd()
|
|
2107
2126
|
oprot.writeFieldEnd()
|
|
2108
2127
|
if self.spaceLimit is not None:
|
|
@@ -2724,11 +2743,11 @@ class TTestConnectionResp(object):
|
|
|
2724
2743
|
elif fid == 2:
|
|
2725
2744
|
if ftype == TType.LIST:
|
|
2726
2745
|
self.resultList = []
|
|
2727
|
-
(
|
|
2728
|
-
for
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
self.resultList.append(
|
|
2746
|
+
(_etype84, _size81) = iprot.readListBegin()
|
|
2747
|
+
for _i85 in range(_size81):
|
|
2748
|
+
_elem86 = TTestConnectionResult()
|
|
2749
|
+
_elem86.read(iprot)
|
|
2750
|
+
self.resultList.append(_elem86)
|
|
2732
2751
|
iprot.readListEnd()
|
|
2733
2752
|
else:
|
|
2734
2753
|
iprot.skip(ftype)
|
|
@@ -2749,8 +2768,8 @@ class TTestConnectionResp(object):
|
|
|
2749
2768
|
if self.resultList is not None:
|
|
2750
2769
|
oprot.writeFieldBegin('resultList', TType.LIST, 2)
|
|
2751
2770
|
oprot.writeListBegin(TType.STRUCT, len(self.resultList))
|
|
2752
|
-
for
|
|
2753
|
-
|
|
2771
|
+
for iter87 in self.resultList:
|
|
2772
|
+
iter87.write(oprot)
|
|
2754
2773
|
oprot.writeListEnd()
|
|
2755
2774
|
oprot.writeFieldEnd()
|
|
2756
2775
|
oprot.writeFieldStop()
|
|
@@ -2800,22 +2819,22 @@ class TNodeLocations(object):
|
|
|
2800
2819
|
if fid == 1:
|
|
2801
2820
|
if ftype == TType.LIST:
|
|
2802
2821
|
self.configNodeLocations = []
|
|
2803
|
-
(
|
|
2804
|
-
for
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
self.configNodeLocations.append(
|
|
2822
|
+
(_etype91, _size88) = iprot.readListBegin()
|
|
2823
|
+
for _i92 in range(_size88):
|
|
2824
|
+
_elem93 = TConfigNodeLocation()
|
|
2825
|
+
_elem93.read(iprot)
|
|
2826
|
+
self.configNodeLocations.append(_elem93)
|
|
2808
2827
|
iprot.readListEnd()
|
|
2809
2828
|
else:
|
|
2810
2829
|
iprot.skip(ftype)
|
|
2811
2830
|
elif fid == 2:
|
|
2812
2831
|
if ftype == TType.LIST:
|
|
2813
2832
|
self.dataNodeLocations = []
|
|
2814
|
-
(
|
|
2815
|
-
for
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
self.dataNodeLocations.append(
|
|
2833
|
+
(_etype97, _size94) = iprot.readListBegin()
|
|
2834
|
+
for _i98 in range(_size94):
|
|
2835
|
+
_elem99 = TDataNodeLocation()
|
|
2836
|
+
_elem99.read(iprot)
|
|
2837
|
+
self.dataNodeLocations.append(_elem99)
|
|
2819
2838
|
iprot.readListEnd()
|
|
2820
2839
|
else:
|
|
2821
2840
|
iprot.skip(ftype)
|
|
@@ -2832,15 +2851,15 @@ class TNodeLocations(object):
|
|
|
2832
2851
|
if self.configNodeLocations is not None:
|
|
2833
2852
|
oprot.writeFieldBegin('configNodeLocations', TType.LIST, 1)
|
|
2834
2853
|
oprot.writeListBegin(TType.STRUCT, len(self.configNodeLocations))
|
|
2835
|
-
for
|
|
2836
|
-
|
|
2854
|
+
for iter100 in self.configNodeLocations:
|
|
2855
|
+
iter100.write(oprot)
|
|
2837
2856
|
oprot.writeListEnd()
|
|
2838
2857
|
oprot.writeFieldEnd()
|
|
2839
2858
|
if self.dataNodeLocations is not None:
|
|
2840
2859
|
oprot.writeFieldBegin('dataNodeLocations', TType.LIST, 2)
|
|
2841
2860
|
oprot.writeListBegin(TType.STRUCT, len(self.dataNodeLocations))
|
|
2842
|
-
for
|
|
2843
|
-
|
|
2861
|
+
for iter101 in self.dataNodeLocations:
|
|
2862
|
+
iter101.write(oprot)
|
|
2844
2863
|
oprot.writeListEnd()
|
|
2845
2864
|
oprot.writeFieldEnd()
|
|
2846
2865
|
oprot.writeFieldStop()
|
|
@@ -3088,6 +3107,7 @@ TFlushReq.thrift_spec = (
|
|
|
3088
3107
|
None, # 0
|
|
3089
3108
|
(1, TType.STRING, 'isSeq', 'UTF8', None, ), # 1
|
|
3090
3109
|
(2, TType.LIST, 'storageGroups', (TType.STRING, 'UTF8', False), None, ), # 2
|
|
3110
|
+
(3, TType.LIST, 'regionIds', (TType.STRING, 'UTF8', False), None, ), # 3
|
|
3091
3111
|
)
|
|
3092
3112
|
all_structs.append(TSettleReq)
|
|
3093
3113
|
TSettleReq.thrift_spec = (
|
|
@@ -4536,11 +4536,12 @@ class TSGroupByQueryIntervalReq(object):
|
|
|
4536
4536
|
- interval
|
|
4537
4537
|
- fetchSize
|
|
4538
4538
|
- timeout
|
|
4539
|
+
- isAligned
|
|
4539
4540
|
|
|
4540
4541
|
"""
|
|
4541
4542
|
|
|
4542
4543
|
|
|
4543
|
-
def __init__(self, sessionId=None, statementId=None, device=None, measurement=None, dataType=None, aggregationType=None, database=None, startTime=None, endTime=None, interval=None, fetchSize=None, timeout=None,):
|
|
4544
|
+
def __init__(self, sessionId=None, statementId=None, device=None, measurement=None, dataType=None, aggregationType=None, database=None, startTime=None, endTime=None, interval=None, fetchSize=None, timeout=None, isAligned=None,):
|
|
4544
4545
|
self.sessionId = sessionId
|
|
4545
4546
|
self.statementId = statementId
|
|
4546
4547
|
self.device = device
|
|
@@ -4553,6 +4554,7 @@ class TSGroupByQueryIntervalReq(object):
|
|
|
4553
4554
|
self.interval = interval
|
|
4554
4555
|
self.fetchSize = fetchSize
|
|
4555
4556
|
self.timeout = timeout
|
|
4557
|
+
self.isAligned = isAligned
|
|
4556
4558
|
|
|
4557
4559
|
def read(self, iprot):
|
|
4558
4560
|
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
@@ -4623,6 +4625,11 @@ class TSGroupByQueryIntervalReq(object):
|
|
|
4623
4625
|
self.timeout = iprot.readI64()
|
|
4624
4626
|
else:
|
|
4625
4627
|
iprot.skip(ftype)
|
|
4628
|
+
elif fid == 13:
|
|
4629
|
+
if ftype == TType.BOOL:
|
|
4630
|
+
self.isAligned = iprot.readBool()
|
|
4631
|
+
else:
|
|
4632
|
+
iprot.skip(ftype)
|
|
4626
4633
|
else:
|
|
4627
4634
|
iprot.skip(ftype)
|
|
4628
4635
|
iprot.readFieldEnd()
|
|
@@ -4681,6 +4688,10 @@ class TSGroupByQueryIntervalReq(object):
|
|
|
4681
4688
|
oprot.writeFieldBegin('timeout', TType.I64, 12)
|
|
4682
4689
|
oprot.writeI64(self.timeout)
|
|
4683
4690
|
oprot.writeFieldEnd()
|
|
4691
|
+
if self.isAligned is not None:
|
|
4692
|
+
oprot.writeFieldBegin('isAligned', TType.BOOL, 13)
|
|
4693
|
+
oprot.writeBool(self.isAligned)
|
|
4694
|
+
oprot.writeFieldEnd()
|
|
4684
4695
|
oprot.writeFieldStop()
|
|
4685
4696
|
oprot.writeStructEnd()
|
|
4686
4697
|
|
|
@@ -7092,6 +7103,7 @@ TSGroupByQueryIntervalReq.thrift_spec = (
|
|
|
7092
7103
|
(10, TType.I64, 'interval', None, None, ), # 10
|
|
7093
7104
|
(11, TType.I32, 'fetchSize', None, None, ), # 11
|
|
7094
7105
|
(12, TType.I64, 'timeout', None, None, ), # 12
|
|
7106
|
+
(13, TType.BOOL, 'isAligned', None, None, ), # 13
|
|
7095
7107
|
)
|
|
7096
7108
|
all_structs.append(TSCreateMultiTimeseriesReq)
|
|
7097
7109
|
TSCreateMultiTimeseriesReq.thrift_spec = (
|
|
@@ -25,6 +25,7 @@ import pandas as pd
|
|
|
25
25
|
from thrift.transport import TTransport
|
|
26
26
|
from iotdb.thrift.rpc.IClientRPCService import TSFetchResultsReq, TSCloseOperationReq
|
|
27
27
|
from iotdb.tsfile.utils.DateUtils import parse_int_to_date
|
|
28
|
+
from iotdb.utils.IoTDBConnectionException import IoTDBConnectionException
|
|
28
29
|
from iotdb.utils.IoTDBConstants import TSDataType
|
|
29
30
|
|
|
30
31
|
logger = logging.getLogger("IoTDB")
|
|
@@ -417,6 +418,8 @@ class IoTDBRpcDataSet(object):
|
|
|
417
418
|
return df
|
|
418
419
|
|
|
419
420
|
def fetch_results(self):
|
|
421
|
+
if self.__is_closed:
|
|
422
|
+
raise IoTDBConnectionException("This DataSet is already closed")
|
|
420
423
|
self.__rows_index = 0
|
|
421
424
|
request = TSFetchResultsReq(
|
|
422
425
|
self.__session_id,
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
#
|
|
18
18
|
|
|
19
19
|
[build-system]
|
|
20
|
-
requires = ["setuptools>=42", "wheel"]
|
|
20
|
+
requires = ["setuptools>=42,<69", "wheel"]
|
|
21
21
|
build-backend = "setuptools.build_meta"
|
|
22
22
|
|
|
23
23
|
[project]
|
|
24
24
|
name = "apache-iotdb"
|
|
25
|
-
version = "1.3.
|
|
25
|
+
version = "1.3.4"
|
|
26
26
|
description = "Apache IoTDB client API"
|
|
27
27
|
readme = "README.md"
|
|
28
28
|
authors = [
|
|
@@ -81,4 +81,4 @@ exclude = '''
|
|
|
81
81
|
| foo.py # also separately exclude a file named foo.py in
|
|
82
82
|
# the root of the project
|
|
83
83
|
)
|
|
84
|
-
'''
|
|
84
|
+
'''
|
|
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
|
|
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
|
{apache_iotdb-1.3.3 → apache-iotdb-1.3.4}/tests/integration/tablet_performance_comparison.py
RENAMED
|
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
|