apache-iotdb 2.0.1b0__py3-none-any.whl → 2.0.2__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.
- {apache_iotdb-2.0.1b0.dist-info → apache_iotdb-2.0.2.dist-info}/METADATA +2 -2
- {apache_iotdb-2.0.1b0.dist-info → apache_iotdb-2.0.2.dist-info}/RECORD +11 -11
- {apache_iotdb-2.0.1b0.dist-info → apache_iotdb-2.0.2.dist-info}/WHEEL +1 -1
- iotdb/Session.py +41 -10
- iotdb/SessionPool.py +12 -0
- iotdb/table_session.py +9 -0
- iotdb/table_session_pool.py +6 -0
- iotdb/thrift/common/ttypes.py +95 -72
- iotdb/thrift/rpc/ttypes.py +13 -1
- {apache_iotdb-2.0.1b0.dist-info → apache_iotdb-2.0.2.dist-info}/entry_points.txt +0 -0
- {apache_iotdb-2.0.1b0.dist-info → apache_iotdb-2.0.2.dist-info}/top_level.txt +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
iotdb/Session.py,sha256=
|
|
2
|
-
iotdb/SessionPool.py,sha256
|
|
1
|
+
iotdb/Session.py,sha256=x0vSwainD_xtL4uvYOBSEFcY5LofMaHH-HT57blCQTA,102965
|
|
2
|
+
iotdb/SessionPool.py,sha256=-XXWDJ2Fpo1rceyc_Q-uv7XD5p69YdR1drD9tyBqUwQ,6621
|
|
3
3
|
iotdb/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
|
|
4
|
-
iotdb/table_session.py,sha256=
|
|
5
|
-
iotdb/table_session_pool.py,sha256=
|
|
4
|
+
iotdb/table_session.py,sha256=Jav4TuvRl4PxOhNBaBqTvMGFWemu5YkAwRU_KXUy9wk,6173
|
|
5
|
+
iotdb/table_session_pool.py,sha256=sqhceeGbr1bsLjYj6aEF_p3qzqiVhtXKAEjV9CY4pWI,5329
|
|
6
6
|
iotdb/dbapi/Connection.py,sha256=t5CuwOTrMJxJ2YVxaEKi2fdaH9Vob-u7nQRCD_9vLcg,2569
|
|
7
7
|
iotdb/dbapi/Cursor.py,sha256=CBFyHsk7cOxLJEwCWMJK0r4guXQ-OkNh39H54cyyH5k,9110
|
|
8
8
|
iotdb/dbapi/Exceptions.py,sha256=X3qhGXQ_rNL7998DQwFeQc9cG5ByXlfhIQx2sBHOiuw,1278
|
|
@@ -20,11 +20,11 @@ iotdb/template/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,78
|
|
|
20
20
|
iotdb/thrift/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
iotdb/thrift/common/__init__.py,sha256=YFcZTT8Cm-6Y4oTiCaqq0DT1lw2W09WqoEc5_pTAwW0,34
|
|
22
22
|
iotdb/thrift/common/constants.py,sha256=IKRM8SpfhYWXERWBgUbUhbdFpn363hmZjXDhEYnVRbw,366
|
|
23
|
-
iotdb/thrift/common/ttypes.py,sha256=
|
|
23
|
+
iotdb/thrift/common/ttypes.py,sha256=L8cZ-biq0G2528LSKWNteVgFkWYTBMttyr6da_JXiIM,116582
|
|
24
24
|
iotdb/thrift/rpc/IClientRPCService.py,sha256=gHrJArjwcFMkcKIR46CFiz_D5rhR-WetjQSI8jRLXeY,416186
|
|
25
25
|
iotdb/thrift/rpc/__init__.py,sha256=69gRO2XxQu71SDeCRxiZFjK6Xw_61hdl5MdWceI-e1A,55
|
|
26
26
|
iotdb/thrift/rpc/constants.py,sha256=IKRM8SpfhYWXERWBgUbUhbdFpn363hmZjXDhEYnVRbw,366
|
|
27
|
-
iotdb/thrift/rpc/ttypes.py,sha256=
|
|
27
|
+
iotdb/thrift/rpc/ttypes.py,sha256=SBn1WHuSwmEoZrO6Ke2Ddcty6z52Hu1lGJp0uDJ1z8Y,301147
|
|
28
28
|
iotdb/tsfile/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
|
|
29
29
|
iotdb/tsfile/common/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
|
|
30
30
|
iotdb/tsfile/common/constant/TsFileConstant.py,sha256=uLSw9vnQZ6objfyhO3b9bHTip8yUW5aapPHEsXC0e7s,1165
|
|
@@ -66,8 +66,8 @@ tests/integration/sqlalchemy/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a
|
|
|
66
66
|
tests/integration/sqlalchemy/test_dialect.py,sha256=QvhZ3h-gbXQHRLQglbIeBM-YaJxWjd8NFwCCtRZDCQg,3478
|
|
67
67
|
tests/unit/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
|
|
68
68
|
tests/unit/test_numpy_tablet.py,sha256=w3lLK8Cft7lGsCj_6Z1Y7kDshltN0osSDJb-EESi6_Y,7235
|
|
69
|
-
apache_iotdb-2.0.
|
|
70
|
-
apache_iotdb-2.0.
|
|
71
|
-
apache_iotdb-2.0.
|
|
72
|
-
apache_iotdb-2.0.
|
|
73
|
-
apache_iotdb-2.0.
|
|
69
|
+
apache_iotdb-2.0.2.dist-info/METADATA,sha256=FRHjfXTDRW5l9tzgjeGCXdnkpxuuzk_3dUwfahHxA6E,18792
|
|
70
|
+
apache_iotdb-2.0.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
71
|
+
apache_iotdb-2.0.2.dist-info/entry_points.txt,sha256=BmQWy6NHyWXorQcVm8-VWpt9MSqe46UFyV2hnsl4yok,73
|
|
72
|
+
apache_iotdb-2.0.2.dist-info/top_level.txt,sha256=B9jGGOaAAqF1WrWw2jX2K-naWAZn2nhyrL-6hM1qwyM,12
|
|
73
|
+
apache_iotdb-2.0.2.dist-info/RECORD,,
|
iotdb/Session.py
CHANGED
|
@@ -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
|
|
@@ -85,6 +86,9 @@ class Session(object):
|
|
|
85
86
|
fetch_size=DEFAULT_FETCH_SIZE,
|
|
86
87
|
zone_id=DEFAULT_ZONE_ID,
|
|
87
88
|
enable_redirection=True,
|
|
89
|
+
use_ssl=False,
|
|
90
|
+
ca_certs=None,
|
|
91
|
+
connection_timeout_in_ms=None,
|
|
88
92
|
):
|
|
89
93
|
self.__host = host
|
|
90
94
|
self.__port = port
|
|
@@ -107,6 +111,9 @@ class Session(object):
|
|
|
107
111
|
self.__endpoint_to_connection = None
|
|
108
112
|
self.sql_dialect = self.SQL_DIALECT
|
|
109
113
|
self.database = None
|
|
114
|
+
self.__use_ssl = use_ssl
|
|
115
|
+
self.__ca_certs = ca_certs
|
|
116
|
+
self.__connection_timeout_in_ms = connection_timeout_in_ms
|
|
110
117
|
|
|
111
118
|
@classmethod
|
|
112
119
|
def init_from_node_urls(
|
|
@@ -117,6 +124,9 @@ class Session(object):
|
|
|
117
124
|
fetch_size=DEFAULT_FETCH_SIZE,
|
|
118
125
|
zone_id=DEFAULT_ZONE_ID,
|
|
119
126
|
enable_redirection=True,
|
|
127
|
+
use_ssl=False,
|
|
128
|
+
ca_certs=None,
|
|
129
|
+
connection_timeout_in_ms=None,
|
|
120
130
|
):
|
|
121
131
|
if node_urls is None:
|
|
122
132
|
raise RuntimeError("node urls is empty")
|
|
@@ -128,6 +138,9 @@ class Session(object):
|
|
|
128
138
|
fetch_size,
|
|
129
139
|
zone_id,
|
|
130
140
|
enable_redirection,
|
|
141
|
+
use_ssl=use_ssl,
|
|
142
|
+
ca_certs=ca_certs,
|
|
143
|
+
connection_timeout_in_ms=connection_timeout_in_ms,
|
|
131
144
|
)
|
|
132
145
|
session.__hosts = []
|
|
133
146
|
session.__ports = []
|
|
@@ -175,16 +188,7 @@ class Session(object):
|
|
|
175
188
|
}
|
|
176
189
|
|
|
177
190
|
def init_connection(self, endpoint):
|
|
178
|
-
transport =
|
|
179
|
-
TSocket.TSocket(endpoint.ip, endpoint.port)
|
|
180
|
-
)
|
|
181
|
-
|
|
182
|
-
if not transport.isOpen():
|
|
183
|
-
try:
|
|
184
|
-
transport.open()
|
|
185
|
-
except TTransport.TTransportException as e:
|
|
186
|
-
raise IoTDBConnectionException(e) from None
|
|
187
|
-
|
|
191
|
+
transport = self.__get_transport(endpoint)
|
|
188
192
|
if self.__enable_rpc_compression:
|
|
189
193
|
client = Client(TCompactProtocol.TCompactProtocolAccelerated(transport))
|
|
190
194
|
else:
|
|
@@ -234,6 +238,33 @@ class Session(object):
|
|
|
234
238
|
self.__zone_id = self.get_time_zone()
|
|
235
239
|
return SessionConnection(client, transport, session_id, statement_id)
|
|
236
240
|
|
|
241
|
+
def __get_transport(self, endpoint):
|
|
242
|
+
if self.__use_ssl:
|
|
243
|
+
import ssl
|
|
244
|
+
from thrift.transport import TSSLSocket
|
|
245
|
+
|
|
246
|
+
if sys.version_info >= (3, 10):
|
|
247
|
+
context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
|
|
248
|
+
else:
|
|
249
|
+
context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
|
250
|
+
context.verify_mode = ssl.CERT_REQUIRED
|
|
251
|
+
context.check_hostname = True
|
|
252
|
+
context.load_verify_locations(cafile=self.__ca_certs)
|
|
253
|
+
socket = TSSLSocket.TSSLSocket(
|
|
254
|
+
host=endpoint.ip, port=endpoint.port, ssl_context=context
|
|
255
|
+
)
|
|
256
|
+
else:
|
|
257
|
+
socket = TSocket.TSocket(endpoint.ip, endpoint.port)
|
|
258
|
+
socket.setTimeout(self.__connection_timeout_in_ms)
|
|
259
|
+
transport = TTransport.TFramedTransport(socket)
|
|
260
|
+
|
|
261
|
+
if not transport.isOpen():
|
|
262
|
+
try:
|
|
263
|
+
transport.open()
|
|
264
|
+
except TTransport.TTransportException as e:
|
|
265
|
+
raise IoTDBConnectionException(e) from None
|
|
266
|
+
return transport
|
|
267
|
+
|
|
237
268
|
def is_open(self):
|
|
238
269
|
return not self.__is_close
|
|
239
270
|
|
iotdb/SessionPool.py
CHANGED
|
@@ -44,6 +44,9 @@ class PoolConfig(object):
|
|
|
44
44
|
max_retry: int = DEFAULT_MAX_RETRY,
|
|
45
45
|
enable_compression: bool = False,
|
|
46
46
|
enable_redirection: bool = True,
|
|
47
|
+
use_ssl: bool = False,
|
|
48
|
+
ca_certs: str = None,
|
|
49
|
+
connection_timeout_in_ms: int = None,
|
|
47
50
|
):
|
|
48
51
|
self.host = host
|
|
49
52
|
self.port = port
|
|
@@ -61,6 +64,9 @@ class PoolConfig(object):
|
|
|
61
64
|
self.max_retry = max_retry
|
|
62
65
|
self.enable_compression = enable_compression
|
|
63
66
|
self.enable_redirection = enable_redirection
|
|
67
|
+
self.use_ssl = use_ssl
|
|
68
|
+
self.ca_certs = ca_certs
|
|
69
|
+
self.connection_timeout_in_ms = connection_timeout_in_ms
|
|
64
70
|
|
|
65
71
|
|
|
66
72
|
class SessionPool(object):
|
|
@@ -86,6 +92,9 @@ class SessionPool(object):
|
|
|
86
92
|
self.__pool_config.fetch_size,
|
|
87
93
|
self.__pool_config.time_zone,
|
|
88
94
|
enable_redirection=self.__pool_config.enable_redirection,
|
|
95
|
+
use_ssl=self.__pool_config.use_ssl,
|
|
96
|
+
ca_certs=self.__pool_config.ca_certs,
|
|
97
|
+
connection_timeout_in_ms=self.__pool_config.connection_timeout_in_ms,
|
|
89
98
|
)
|
|
90
99
|
session.sql_dialect = self.sql_dialect
|
|
91
100
|
session.database = self.database
|
|
@@ -99,6 +108,9 @@ class SessionPool(object):
|
|
|
99
108
|
self.__pool_config.fetch_size,
|
|
100
109
|
self.__pool_config.time_zone,
|
|
101
110
|
enable_redirection=self.__pool_config.enable_redirection,
|
|
111
|
+
use_ssl=self.__pool_config.use_ssl,
|
|
112
|
+
ca_certs=self.__pool_config.ca_certs,
|
|
113
|
+
connection_timeout_in_ms=self.__pool_config.connection_timeout_in_ms,
|
|
102
114
|
)
|
|
103
115
|
session.sql_dialect = self.sql_dialect
|
|
104
116
|
session.database = self.database
|
iotdb/table_session.py
CHANGED
|
@@ -35,6 +35,9 @@ class TableSessionConfig(object):
|
|
|
35
35
|
time_zone: str = Session.DEFAULT_ZONE_ID,
|
|
36
36
|
enable_redirection: bool = True,
|
|
37
37
|
enable_compression: bool = False,
|
|
38
|
+
use_ssl: bool = False,
|
|
39
|
+
ca_certs: str = None,
|
|
40
|
+
connection_timeout_in_ms: int = None,
|
|
38
41
|
):
|
|
39
42
|
"""
|
|
40
43
|
Initialize a TableSessionConfig object with the provided parameters.
|
|
@@ -66,6 +69,9 @@ class TableSessionConfig(object):
|
|
|
66
69
|
self.time_zone = time_zone
|
|
67
70
|
self.enable_redirection = enable_redirection
|
|
68
71
|
self.enable_compression = enable_compression
|
|
72
|
+
self.use_ssl = use_ssl
|
|
73
|
+
self.ca_certs = ca_certs
|
|
74
|
+
self.connection_timeout_in_ms = connection_timeout_in_ms
|
|
69
75
|
|
|
70
76
|
|
|
71
77
|
class TableSession(object):
|
|
@@ -82,6 +88,9 @@ class TableSession(object):
|
|
|
82
88
|
table_session_config.fetch_size,
|
|
83
89
|
table_session_config.time_zone,
|
|
84
90
|
table_session_config.enable_redirection,
|
|
91
|
+
table_session_config.use_ssl,
|
|
92
|
+
table_session_config.ca_certs,
|
|
93
|
+
table_session_config.connection_timeout_in_ms,
|
|
85
94
|
)
|
|
86
95
|
self.__session.sql_dialect = "table"
|
|
87
96
|
self.__session.database = table_session_config.database
|
iotdb/table_session_pool.py
CHANGED
|
@@ -34,6 +34,9 @@ class TableSessionPoolConfig(object):
|
|
|
34
34
|
enable_compression: bool = False,
|
|
35
35
|
wait_timeout_in_ms: int = 10000,
|
|
36
36
|
max_retry: int = 3,
|
|
37
|
+
use_ssl: bool = False,
|
|
38
|
+
ca_certs: str = None,
|
|
39
|
+
connection_timeout_in_ms: int = None,
|
|
37
40
|
):
|
|
38
41
|
"""
|
|
39
42
|
Initialize a TableSessionPoolConfig object with the provided parameters.
|
|
@@ -71,6 +74,9 @@ class TableSessionPoolConfig(object):
|
|
|
71
74
|
max_retry=max_retry,
|
|
72
75
|
enable_redirection=enable_redirection,
|
|
73
76
|
enable_compression=enable_compression,
|
|
77
|
+
use_ssl=use_ssl,
|
|
78
|
+
ca_certs=ca_certs,
|
|
79
|
+
connection_timeout_in_ms=connection_timeout_in_ms,
|
|
74
80
|
)
|
|
75
81
|
self.max_pool_size = max_pool_size
|
|
76
82
|
self.wait_timeout_in_ms = wait_timeout_in_ms
|
iotdb/thrift/common/ttypes.py
CHANGED
|
@@ -160,6 +160,7 @@ class TAggregationType(object):
|
|
|
160
160
|
LAST_BY = 26
|
|
161
161
|
MIN = 27
|
|
162
162
|
MAX = 28
|
|
163
|
+
COUNT_ALL = 29
|
|
163
164
|
|
|
164
165
|
_VALUES_TO_NAMES = {
|
|
165
166
|
0: "COUNT",
|
|
@@ -191,6 +192,7 @@ class TAggregationType(object):
|
|
|
191
192
|
26: "LAST_BY",
|
|
192
193
|
27: "MIN",
|
|
193
194
|
28: "MAX",
|
|
195
|
+
29: "COUNT_ALL",
|
|
194
196
|
}
|
|
195
197
|
|
|
196
198
|
_NAMES_TO_VALUES = {
|
|
@@ -223,6 +225,7 @@ class TAggregationType(object):
|
|
|
223
225
|
"LAST_BY": 26,
|
|
224
226
|
"MIN": 27,
|
|
225
227
|
"MAX": 28,
|
|
228
|
+
"COUNT_ALL": 29,
|
|
226
229
|
}
|
|
227
230
|
|
|
228
231
|
|
|
@@ -1257,13 +1260,15 @@ class TFlushReq(object):
|
|
|
1257
1260
|
Attributes:
|
|
1258
1261
|
- isSeq
|
|
1259
1262
|
- storageGroups
|
|
1263
|
+
- regionIds
|
|
1260
1264
|
|
|
1261
1265
|
"""
|
|
1262
1266
|
|
|
1263
1267
|
|
|
1264
|
-
def __init__(self, isSeq=None, storageGroups=None,):
|
|
1268
|
+
def __init__(self, isSeq=None, storageGroups=None, regionIds=None,):
|
|
1265
1269
|
self.isSeq = isSeq
|
|
1266
1270
|
self.storageGroups = storageGroups
|
|
1271
|
+
self.regionIds = regionIds
|
|
1267
1272
|
|
|
1268
1273
|
def read(self, iprot):
|
|
1269
1274
|
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
@@ -1289,6 +1294,16 @@ class TFlushReq(object):
|
|
|
1289
1294
|
iprot.readListEnd()
|
|
1290
1295
|
else:
|
|
1291
1296
|
iprot.skip(ftype)
|
|
1297
|
+
elif fid == 3:
|
|
1298
|
+
if ftype == TType.LIST:
|
|
1299
|
+
self.regionIds = []
|
|
1300
|
+
(_etype23, _size20) = iprot.readListBegin()
|
|
1301
|
+
for _i24 in range(_size20):
|
|
1302
|
+
_elem25 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1303
|
+
self.regionIds.append(_elem25)
|
|
1304
|
+
iprot.readListEnd()
|
|
1305
|
+
else:
|
|
1306
|
+
iprot.skip(ftype)
|
|
1292
1307
|
else:
|
|
1293
1308
|
iprot.skip(ftype)
|
|
1294
1309
|
iprot.readFieldEnd()
|
|
@@ -1306,8 +1321,15 @@ class TFlushReq(object):
|
|
|
1306
1321
|
if self.storageGroups is not None:
|
|
1307
1322
|
oprot.writeFieldBegin('storageGroups', TType.LIST, 2)
|
|
1308
1323
|
oprot.writeListBegin(TType.STRING, len(self.storageGroups))
|
|
1309
|
-
for
|
|
1310
|
-
oprot.writeString(
|
|
1324
|
+
for iter26 in self.storageGroups:
|
|
1325
|
+
oprot.writeString(iter26.encode('utf-8') if sys.version_info[0] == 2 else iter26)
|
|
1326
|
+
oprot.writeListEnd()
|
|
1327
|
+
oprot.writeFieldEnd()
|
|
1328
|
+
if self.regionIds is not None:
|
|
1329
|
+
oprot.writeFieldBegin('regionIds', TType.LIST, 3)
|
|
1330
|
+
oprot.writeListBegin(TType.STRING, len(self.regionIds))
|
|
1331
|
+
for iter27 in self.regionIds:
|
|
1332
|
+
oprot.writeString(iter27.encode('utf-8') if sys.version_info[0] == 2 else iter27)
|
|
1311
1333
|
oprot.writeListEnd()
|
|
1312
1334
|
oprot.writeFieldEnd()
|
|
1313
1335
|
oprot.writeFieldStop()
|
|
@@ -1351,10 +1373,10 @@ class TSettleReq(object):
|
|
|
1351
1373
|
if fid == 1:
|
|
1352
1374
|
if ftype == TType.LIST:
|
|
1353
1375
|
self.paths = []
|
|
1354
|
-
(
|
|
1355
|
-
for
|
|
1356
|
-
|
|
1357
|
-
self.paths.append(
|
|
1376
|
+
(_etype31, _size28) = iprot.readListBegin()
|
|
1377
|
+
for _i32 in range(_size28):
|
|
1378
|
+
_elem33 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1379
|
+
self.paths.append(_elem33)
|
|
1358
1380
|
iprot.readListEnd()
|
|
1359
1381
|
else:
|
|
1360
1382
|
iprot.skip(ftype)
|
|
@@ -1371,8 +1393,8 @@ class TSettleReq(object):
|
|
|
1371
1393
|
if self.paths is not None:
|
|
1372
1394
|
oprot.writeFieldBegin('paths', TType.LIST, 1)
|
|
1373
1395
|
oprot.writeListBegin(TType.STRING, len(self.paths))
|
|
1374
|
-
for
|
|
1375
|
-
oprot.writeString(
|
|
1396
|
+
for iter34 in self.paths:
|
|
1397
|
+
oprot.writeString(iter34.encode('utf-8') if sys.version_info[0] == 2 else iter34)
|
|
1376
1398
|
oprot.writeListEnd()
|
|
1377
1399
|
oprot.writeFieldEnd()
|
|
1378
1400
|
oprot.writeFieldStop()
|
|
@@ -1492,11 +1514,11 @@ class TSetConfigurationReq(object):
|
|
|
1492
1514
|
if fid == 1:
|
|
1493
1515
|
if ftype == TType.MAP:
|
|
1494
1516
|
self.configs = {}
|
|
1495
|
-
(
|
|
1496
|
-
for
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
self.configs[
|
|
1517
|
+
(_ktype36, _vtype37, _size35) = iprot.readMapBegin()
|
|
1518
|
+
for _i39 in range(_size35):
|
|
1519
|
+
_key40 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1520
|
+
_val41 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1521
|
+
self.configs[_key40] = _val41
|
|
1500
1522
|
iprot.readMapEnd()
|
|
1501
1523
|
else:
|
|
1502
1524
|
iprot.skip(ftype)
|
|
@@ -1518,9 +1540,9 @@ class TSetConfigurationReq(object):
|
|
|
1518
1540
|
if self.configs is not None:
|
|
1519
1541
|
oprot.writeFieldBegin('configs', TType.MAP, 1)
|
|
1520
1542
|
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.configs))
|
|
1521
|
-
for
|
|
1522
|
-
oprot.writeString(
|
|
1523
|
-
oprot.writeString(
|
|
1543
|
+
for kiter42, viter43 in self.configs.items():
|
|
1544
|
+
oprot.writeString(kiter42.encode('utf-8') if sys.version_info[0] == 2 else kiter42)
|
|
1545
|
+
oprot.writeString(viter43.encode('utf-8') if sys.version_info[0] == 2 else viter43)
|
|
1524
1546
|
oprot.writeMapEnd()
|
|
1525
1547
|
oprot.writeFieldEnd()
|
|
1526
1548
|
if self.nodeId is not None:
|
|
@@ -1576,10 +1598,10 @@ class TSetTTLReq(object):
|
|
|
1576
1598
|
if fid == 1:
|
|
1577
1599
|
if ftype == TType.LIST:
|
|
1578
1600
|
self.pathPattern = []
|
|
1579
|
-
(
|
|
1580
|
-
for
|
|
1581
|
-
|
|
1582
|
-
self.pathPattern.append(
|
|
1601
|
+
(_etype47, _size44) = iprot.readListBegin()
|
|
1602
|
+
for _i48 in range(_size44):
|
|
1603
|
+
_elem49 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1604
|
+
self.pathPattern.append(_elem49)
|
|
1583
1605
|
iprot.readListEnd()
|
|
1584
1606
|
else:
|
|
1585
1607
|
iprot.skip(ftype)
|
|
@@ -1606,8 +1628,8 @@ class TSetTTLReq(object):
|
|
|
1606
1628
|
if self.pathPattern is not None:
|
|
1607
1629
|
oprot.writeFieldBegin('pathPattern', TType.LIST, 1)
|
|
1608
1630
|
oprot.writeListBegin(TType.STRING, len(self.pathPattern))
|
|
1609
|
-
for
|
|
1610
|
-
oprot.writeString(
|
|
1631
|
+
for iter50 in self.pathPattern:
|
|
1632
|
+
oprot.writeString(iter50.encode('utf-8') if sys.version_info[0] == 2 else iter50)
|
|
1611
1633
|
oprot.writeListEnd()
|
|
1612
1634
|
oprot.writeFieldEnd()
|
|
1613
1635
|
if self.TTL is not None:
|
|
@@ -1665,10 +1687,10 @@ class TShowTTLReq(object):
|
|
|
1665
1687
|
if fid == 1:
|
|
1666
1688
|
if ftype == TType.LIST:
|
|
1667
1689
|
self.pathPattern = []
|
|
1668
|
-
(
|
|
1669
|
-
for
|
|
1670
|
-
|
|
1671
|
-
self.pathPattern.append(
|
|
1690
|
+
(_etype54, _size51) = iprot.readListBegin()
|
|
1691
|
+
for _i55 in range(_size51):
|
|
1692
|
+
_elem56 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
1693
|
+
self.pathPattern.append(_elem56)
|
|
1672
1694
|
iprot.readListEnd()
|
|
1673
1695
|
else:
|
|
1674
1696
|
iprot.skip(ftype)
|
|
@@ -1685,8 +1707,8 @@ class TShowTTLReq(object):
|
|
|
1685
1707
|
if self.pathPattern is not None:
|
|
1686
1708
|
oprot.writeFieldBegin('pathPattern', TType.LIST, 1)
|
|
1687
1709
|
oprot.writeListBegin(TType.STRING, len(self.pathPattern))
|
|
1688
|
-
for
|
|
1689
|
-
oprot.writeString(
|
|
1710
|
+
for iter57 in self.pathPattern:
|
|
1711
|
+
oprot.writeString(iter57.encode('utf-8') if sys.version_info[0] == 2 else iter57)
|
|
1690
1712
|
oprot.writeListEnd()
|
|
1691
1713
|
oprot.writeFieldEnd()
|
|
1692
1714
|
oprot.writeFieldStop()
|
|
@@ -1812,11 +1834,11 @@ class TFilesResp(object):
|
|
|
1812
1834
|
elif fid == 2:
|
|
1813
1835
|
if ftype == TType.LIST:
|
|
1814
1836
|
self.files = []
|
|
1815
|
-
(
|
|
1816
|
-
for
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
self.files.append(
|
|
1837
|
+
(_etype61, _size58) = iprot.readListBegin()
|
|
1838
|
+
for _i62 in range(_size58):
|
|
1839
|
+
_elem63 = TFile()
|
|
1840
|
+
_elem63.read(iprot)
|
|
1841
|
+
self.files.append(_elem63)
|
|
1820
1842
|
iprot.readListEnd()
|
|
1821
1843
|
else:
|
|
1822
1844
|
iprot.skip(ftype)
|
|
@@ -1837,8 +1859,8 @@ class TFilesResp(object):
|
|
|
1837
1859
|
if self.files is not None:
|
|
1838
1860
|
oprot.writeFieldBegin('files', TType.LIST, 2)
|
|
1839
1861
|
oprot.writeListBegin(TType.STRUCT, len(self.files))
|
|
1840
|
-
for
|
|
1841
|
-
|
|
1862
|
+
for iter64 in self.files:
|
|
1863
|
+
iter64.write(oprot)
|
|
1842
1864
|
oprot.writeListEnd()
|
|
1843
1865
|
oprot.writeFieldEnd()
|
|
1844
1866
|
oprot.writeFieldStop()
|
|
@@ -2041,12 +2063,12 @@ class TThrottleQuota(object):
|
|
|
2041
2063
|
if fid == 1:
|
|
2042
2064
|
if ftype == TType.MAP:
|
|
2043
2065
|
self.throttleLimit = {}
|
|
2044
|
-
(
|
|
2045
|
-
for
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
self.throttleLimit[
|
|
2066
|
+
(_ktype66, _vtype67, _size65) = iprot.readMapBegin()
|
|
2067
|
+
for _i69 in range(_size65):
|
|
2068
|
+
_key70 = iprot.readI32()
|
|
2069
|
+
_val71 = TTimedQuota()
|
|
2070
|
+
_val71.read(iprot)
|
|
2071
|
+
self.throttleLimit[_key70] = _val71
|
|
2050
2072
|
iprot.readMapEnd()
|
|
2051
2073
|
else:
|
|
2052
2074
|
iprot.skip(ftype)
|
|
@@ -2073,9 +2095,9 @@ class TThrottleQuota(object):
|
|
|
2073
2095
|
if self.throttleLimit is not None:
|
|
2074
2096
|
oprot.writeFieldBegin('throttleLimit', TType.MAP, 1)
|
|
2075
2097
|
oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.throttleLimit))
|
|
2076
|
-
for
|
|
2077
|
-
oprot.writeI32(
|
|
2078
|
-
|
|
2098
|
+
for kiter72, viter73 in self.throttleLimit.items():
|
|
2099
|
+
oprot.writeI32(kiter72)
|
|
2100
|
+
viter73.write(oprot)
|
|
2079
2101
|
oprot.writeMapEnd()
|
|
2080
2102
|
oprot.writeFieldEnd()
|
|
2081
2103
|
if self.memLimit is not None:
|
|
@@ -2129,10 +2151,10 @@ class TSetSpaceQuotaReq(object):
|
|
|
2129
2151
|
if fid == 1:
|
|
2130
2152
|
if ftype == TType.LIST:
|
|
2131
2153
|
self.database = []
|
|
2132
|
-
(
|
|
2133
|
-
for
|
|
2134
|
-
|
|
2135
|
-
self.database.append(
|
|
2154
|
+
(_etype77, _size74) = iprot.readListBegin()
|
|
2155
|
+
for _i78 in range(_size74):
|
|
2156
|
+
_elem79 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
|
|
2157
|
+
self.database.append(_elem79)
|
|
2136
2158
|
iprot.readListEnd()
|
|
2137
2159
|
else:
|
|
2138
2160
|
iprot.skip(ftype)
|
|
@@ -2155,8 +2177,8 @@ class TSetSpaceQuotaReq(object):
|
|
|
2155
2177
|
if self.database is not None:
|
|
2156
2178
|
oprot.writeFieldBegin('database', TType.LIST, 1)
|
|
2157
2179
|
oprot.writeListBegin(TType.STRING, len(self.database))
|
|
2158
|
-
for
|
|
2159
|
-
oprot.writeString(
|
|
2180
|
+
for iter80 in self.database:
|
|
2181
|
+
oprot.writeString(iter80.encode('utf-8') if sys.version_info[0] == 2 else iter80)
|
|
2160
2182
|
oprot.writeListEnd()
|
|
2161
2183
|
oprot.writeFieldEnd()
|
|
2162
2184
|
if self.spaceLimit is not None:
|
|
@@ -2778,11 +2800,11 @@ class TTestConnectionResp(object):
|
|
|
2778
2800
|
elif fid == 2:
|
|
2779
2801
|
if ftype == TType.LIST:
|
|
2780
2802
|
self.resultList = []
|
|
2781
|
-
(
|
|
2782
|
-
for
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
self.resultList.append(
|
|
2803
|
+
(_etype84, _size81) = iprot.readListBegin()
|
|
2804
|
+
for _i85 in range(_size81):
|
|
2805
|
+
_elem86 = TTestConnectionResult()
|
|
2806
|
+
_elem86.read(iprot)
|
|
2807
|
+
self.resultList.append(_elem86)
|
|
2786
2808
|
iprot.readListEnd()
|
|
2787
2809
|
else:
|
|
2788
2810
|
iprot.skip(ftype)
|
|
@@ -2803,8 +2825,8 @@ class TTestConnectionResp(object):
|
|
|
2803
2825
|
if self.resultList is not None:
|
|
2804
2826
|
oprot.writeFieldBegin('resultList', TType.LIST, 2)
|
|
2805
2827
|
oprot.writeListBegin(TType.STRUCT, len(self.resultList))
|
|
2806
|
-
for
|
|
2807
|
-
|
|
2828
|
+
for iter87 in self.resultList:
|
|
2829
|
+
iter87.write(oprot)
|
|
2808
2830
|
oprot.writeListEnd()
|
|
2809
2831
|
oprot.writeFieldEnd()
|
|
2810
2832
|
oprot.writeFieldStop()
|
|
@@ -2854,22 +2876,22 @@ class TNodeLocations(object):
|
|
|
2854
2876
|
if fid == 1:
|
|
2855
2877
|
if ftype == TType.LIST:
|
|
2856
2878
|
self.configNodeLocations = []
|
|
2857
|
-
(
|
|
2858
|
-
for
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
self.configNodeLocations.append(
|
|
2879
|
+
(_etype91, _size88) = iprot.readListBegin()
|
|
2880
|
+
for _i92 in range(_size88):
|
|
2881
|
+
_elem93 = TConfigNodeLocation()
|
|
2882
|
+
_elem93.read(iprot)
|
|
2883
|
+
self.configNodeLocations.append(_elem93)
|
|
2862
2884
|
iprot.readListEnd()
|
|
2863
2885
|
else:
|
|
2864
2886
|
iprot.skip(ftype)
|
|
2865
2887
|
elif fid == 2:
|
|
2866
2888
|
if ftype == TType.LIST:
|
|
2867
2889
|
self.dataNodeLocations = []
|
|
2868
|
-
(
|
|
2869
|
-
for
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
self.dataNodeLocations.append(
|
|
2890
|
+
(_etype97, _size94) = iprot.readListBegin()
|
|
2891
|
+
for _i98 in range(_size94):
|
|
2892
|
+
_elem99 = TDataNodeLocation()
|
|
2893
|
+
_elem99.read(iprot)
|
|
2894
|
+
self.dataNodeLocations.append(_elem99)
|
|
2873
2895
|
iprot.readListEnd()
|
|
2874
2896
|
else:
|
|
2875
2897
|
iprot.skip(ftype)
|
|
@@ -2886,15 +2908,15 @@ class TNodeLocations(object):
|
|
|
2886
2908
|
if self.configNodeLocations is not None:
|
|
2887
2909
|
oprot.writeFieldBegin('configNodeLocations', TType.LIST, 1)
|
|
2888
2910
|
oprot.writeListBegin(TType.STRUCT, len(self.configNodeLocations))
|
|
2889
|
-
for
|
|
2890
|
-
|
|
2911
|
+
for iter100 in self.configNodeLocations:
|
|
2912
|
+
iter100.write(oprot)
|
|
2891
2913
|
oprot.writeListEnd()
|
|
2892
2914
|
oprot.writeFieldEnd()
|
|
2893
2915
|
if self.dataNodeLocations is not None:
|
|
2894
2916
|
oprot.writeFieldBegin('dataNodeLocations', TType.LIST, 2)
|
|
2895
2917
|
oprot.writeListBegin(TType.STRUCT, len(self.dataNodeLocations))
|
|
2896
|
-
for
|
|
2897
|
-
|
|
2918
|
+
for iter101 in self.dataNodeLocations:
|
|
2919
|
+
iter101.write(oprot)
|
|
2898
2920
|
oprot.writeListEnd()
|
|
2899
2921
|
oprot.writeFieldEnd()
|
|
2900
2922
|
oprot.writeFieldStop()
|
|
@@ -3142,6 +3164,7 @@ TFlushReq.thrift_spec = (
|
|
|
3142
3164
|
None, # 0
|
|
3143
3165
|
(1, TType.STRING, 'isSeq', 'UTF8', None, ), # 1
|
|
3144
3166
|
(2, TType.LIST, 'storageGroups', (TType.STRING, 'UTF8', False), None, ), # 2
|
|
3167
|
+
(3, TType.LIST, 'regionIds', (TType.STRING, 'UTF8', False), None, ), # 3
|
|
3145
3168
|
)
|
|
3146
3169
|
all_structs.append(TSettleReq)
|
|
3147
3170
|
TSettleReq.thrift_spec = (
|
iotdb/thrift/rpc/ttypes.py
CHANGED
|
@@ -1453,17 +1453,19 @@ class TSFetchResultsReq(object):
|
|
|
1453
1453
|
- queryId
|
|
1454
1454
|
- isAlign
|
|
1455
1455
|
- timeout
|
|
1456
|
+
- statementId
|
|
1456
1457
|
|
|
1457
1458
|
"""
|
|
1458
1459
|
|
|
1459
1460
|
|
|
1460
|
-
def __init__(self, sessionId=None, statement=None, fetchSize=None, queryId=None, isAlign=None, timeout=None,):
|
|
1461
|
+
def __init__(self, sessionId=None, statement=None, fetchSize=None, queryId=None, isAlign=None, timeout=None, statementId=None,):
|
|
1461
1462
|
self.sessionId = sessionId
|
|
1462
1463
|
self.statement = statement
|
|
1463
1464
|
self.fetchSize = fetchSize
|
|
1464
1465
|
self.queryId = queryId
|
|
1465
1466
|
self.isAlign = isAlign
|
|
1466
1467
|
self.timeout = timeout
|
|
1468
|
+
self.statementId = statementId
|
|
1467
1469
|
|
|
1468
1470
|
def read(self, iprot):
|
|
1469
1471
|
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
@@ -1504,6 +1506,11 @@ class TSFetchResultsReq(object):
|
|
|
1504
1506
|
self.timeout = iprot.readI64()
|
|
1505
1507
|
else:
|
|
1506
1508
|
iprot.skip(ftype)
|
|
1509
|
+
elif fid == 7:
|
|
1510
|
+
if ftype == TType.I64:
|
|
1511
|
+
self.statementId = iprot.readI64()
|
|
1512
|
+
else:
|
|
1513
|
+
iprot.skip(ftype)
|
|
1507
1514
|
else:
|
|
1508
1515
|
iprot.skip(ftype)
|
|
1509
1516
|
iprot.readFieldEnd()
|
|
@@ -1538,6 +1545,10 @@ class TSFetchResultsReq(object):
|
|
|
1538
1545
|
oprot.writeFieldBegin('timeout', TType.I64, 6)
|
|
1539
1546
|
oprot.writeI64(self.timeout)
|
|
1540
1547
|
oprot.writeFieldEnd()
|
|
1548
|
+
if self.statementId is not None:
|
|
1549
|
+
oprot.writeFieldBegin('statementId', TType.I64, 7)
|
|
1550
|
+
oprot.writeI64(self.statementId)
|
|
1551
|
+
oprot.writeFieldEnd()
|
|
1541
1552
|
oprot.writeFieldStop()
|
|
1542
1553
|
oprot.writeStructEnd()
|
|
1543
1554
|
|
|
@@ -6967,6 +6978,7 @@ TSFetchResultsReq.thrift_spec = (
|
|
|
6967
6978
|
(4, TType.I64, 'queryId', None, None, ), # 4
|
|
6968
6979
|
(5, TType.BOOL, 'isAlign', None, None, ), # 5
|
|
6969
6980
|
(6, TType.I64, 'timeout', None, None, ), # 6
|
|
6981
|
+
(7, TType.I64, 'statementId', None, None, ), # 7
|
|
6970
6982
|
)
|
|
6971
6983
|
all_structs.append(TSFetchResultsResp)
|
|
6972
6984
|
TSFetchResultsResp.thrift_spec = (
|
|
File without changes
|
|
File without changes
|