apache-iotdb 2.0.2__py3-none-any.whl → 2.0.4.dev0__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.2.dist-info → apache_iotdb-2.0.4.dev0.dist-info}/METADATA +6 -6
- {apache_iotdb-2.0.2.dist-info → apache_iotdb-2.0.4.dev0.dist-info}/RECORD +34 -22
- {apache_iotdb-2.0.2.dist-info → apache_iotdb-2.0.4.dev0.dist-info}/WHEEL +1 -1
- iotdb/Session.py +158 -184
- iotdb/SessionPool.py +3 -1
- iotdb/template/MeasurementNode.py +1 -1
- iotdb/template/Template.py +3 -3
- iotdb/thrift/common/ttypes.py +18 -1
- iotdb/thrift/confignode/IConfigNodeRPCService.py +28290 -0
- iotdb/thrift/confignode/__init__.py +1 -0
- iotdb/thrift/confignode/constants.py +14 -0
- iotdb/thrift/confignode/ttypes.py +17249 -0
- iotdb/thrift/datanode/IDataNodeRPCService.py +17960 -0
- iotdb/thrift/datanode/MPPDataExchangeService.py +1071 -0
- iotdb/thrift/datanode/__init__.py +1 -0
- iotdb/thrift/datanode/constants.py +14 -0
- iotdb/thrift/datanode/ttypes.py +10920 -0
- iotdb/tsfile/utils/tsblock_serde.py +266 -0
- iotdb/utils/Field.py +30 -5
- iotdb/utils/NumpyTablet.py +1 -1
- iotdb/utils/SessionDataSet.py +43 -24
- iotdb/utils/Tablet.py +1 -1
- iotdb/utils/{IoTDBConnectionException.py → exception.py} +20 -0
- iotdb/utils/iotdb_rpc_dataset.py +406 -0
- iotdb/utils/rpc_utils.py +110 -0
- tests/integration/tablet_performance_comparison.py +3 -1
- tests/integration/test_new_data_types.py +6 -6
- tests/integration/test_tablemodel_query.py +476 -0
- iotdb/utils/IoTDBRpcDataSet.py +0 -463
- {apache_iotdb-2.0.2.dist-info → apache_iotdb-2.0.4.dev0.dist-info}/entry_points.txt +0 -0
- {apache_iotdb-2.0.2.dist-info → apache_iotdb-2.0.4.dev0.dist-info}/top_level.txt +0 -0
- /iotdb/tsfile/common/constant/{TsFileConstant.py → tsfile_constant.py} +0 -0
- /iotdb/tsfile/utils/{DateUtils.py → date_utils.py} +0 -0
- /iotdb/tsfile/utils/{Pair.py → pair.py} +0 -0
- /iotdb/tsfile/utils/{ReadWriteIOUtils.py → read_write_io_utils.py} +0 -0
iotdb/SessionPool.py
CHANGED
|
@@ -21,12 +21,14 @@ import time
|
|
|
21
21
|
from queue import Queue
|
|
22
22
|
from threading import Lock
|
|
23
23
|
|
|
24
|
+
from tzlocal import get_localzone_name
|
|
25
|
+
|
|
24
26
|
from iotdb.Session import Session
|
|
25
27
|
|
|
26
28
|
DEFAULT_MULTIPIE = 5
|
|
27
29
|
DEFAULT_FETCH_SIZE = 5000
|
|
28
30
|
DEFAULT_MAX_RETRY = 3
|
|
29
|
-
DEFAULT_TIME_ZONE =
|
|
31
|
+
DEFAULT_TIME_ZONE = get_localzone_name()
|
|
30
32
|
SQL_DIALECT = "tree"
|
|
31
33
|
logger = logging.getLogger("IoTDB")
|
|
32
34
|
|
|
@@ -19,7 +19,7 @@ import warnings
|
|
|
19
19
|
|
|
20
20
|
from iotdb.utils.IoTDBConstants import TSDataType, TSEncoding, Compressor
|
|
21
21
|
from .TemplateNode import TemplateNode
|
|
22
|
-
from ..tsfile.utils.
|
|
22
|
+
from ..tsfile.utils.read_write_io_utils import ReadWriteUtils
|
|
23
23
|
|
|
24
24
|
warnings.simplefilter("always", DeprecationWarning)
|
|
25
25
|
|
iotdb/template/Template.py
CHANGED
|
@@ -20,9 +20,9 @@ import struct
|
|
|
20
20
|
import warnings
|
|
21
21
|
|
|
22
22
|
from .TemplateNode import TemplateNode
|
|
23
|
-
from ..tsfile.common.constant.
|
|
24
|
-
from ..tsfile.utils.
|
|
25
|
-
from ..tsfile.utils.
|
|
23
|
+
from ..tsfile.common.constant.tsfile_constant import TsFileConstant
|
|
24
|
+
from ..tsfile.utils.pair import Pair
|
|
25
|
+
from ..tsfile.utils.read_write_io_utils import ReadWriteUtils
|
|
26
26
|
|
|
27
27
|
warnings.simplefilter("always", DeprecationWarning)
|
|
28
28
|
|
iotdb/thrift/common/ttypes.py
CHANGED
|
@@ -161,6 +161,7 @@ class TAggregationType(object):
|
|
|
161
161
|
MIN = 27
|
|
162
162
|
MAX = 28
|
|
163
163
|
COUNT_ALL = 29
|
|
164
|
+
APPROX_COUNT_DISTINCT = 30
|
|
164
165
|
|
|
165
166
|
_VALUES_TO_NAMES = {
|
|
166
167
|
0: "COUNT",
|
|
@@ -193,6 +194,7 @@ class TAggregationType(object):
|
|
|
193
194
|
27: "MIN",
|
|
194
195
|
28: "MAX",
|
|
195
196
|
29: "COUNT_ALL",
|
|
197
|
+
30: "APPROX_COUNT_DISTINCT",
|
|
196
198
|
}
|
|
197
199
|
|
|
198
200
|
_NAMES_TO_VALUES = {
|
|
@@ -226,6 +228,7 @@ class TAggregationType(object):
|
|
|
226
228
|
"MIN": 27,
|
|
227
229
|
"MAX": 28,
|
|
228
230
|
"COUNT_ALL": 29,
|
|
231
|
+
"APPROX_COUNT_DISTINCT": 30,
|
|
229
232
|
}
|
|
230
233
|
|
|
231
234
|
|
|
@@ -2533,13 +2536,15 @@ class TServiceProvider(object):
|
|
|
2533
2536
|
Attributes:
|
|
2534
2537
|
- endPoint
|
|
2535
2538
|
- serviceType
|
|
2539
|
+
- nodeId
|
|
2536
2540
|
|
|
2537
2541
|
"""
|
|
2538
2542
|
|
|
2539
2543
|
|
|
2540
|
-
def __init__(self, endPoint=None, serviceType=None,):
|
|
2544
|
+
def __init__(self, endPoint=None, serviceType=None, nodeId=None,):
|
|
2541
2545
|
self.endPoint = endPoint
|
|
2542
2546
|
self.serviceType = serviceType
|
|
2547
|
+
self.nodeId = nodeId
|
|
2543
2548
|
|
|
2544
2549
|
def read(self, iprot):
|
|
2545
2550
|
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
@@ -2561,6 +2566,11 @@ class TServiceProvider(object):
|
|
|
2561
2566
|
self.serviceType = iprot.readI32()
|
|
2562
2567
|
else:
|
|
2563
2568
|
iprot.skip(ftype)
|
|
2569
|
+
elif fid == 3:
|
|
2570
|
+
if ftype == TType.I32:
|
|
2571
|
+
self.nodeId = iprot.readI32()
|
|
2572
|
+
else:
|
|
2573
|
+
iprot.skip(ftype)
|
|
2564
2574
|
else:
|
|
2565
2575
|
iprot.skip(ftype)
|
|
2566
2576
|
iprot.readFieldEnd()
|
|
@@ -2579,6 +2589,10 @@ class TServiceProvider(object):
|
|
|
2579
2589
|
oprot.writeFieldBegin('serviceType', TType.I32, 2)
|
|
2580
2590
|
oprot.writeI32(self.serviceType)
|
|
2581
2591
|
oprot.writeFieldEnd()
|
|
2592
|
+
if self.nodeId is not None:
|
|
2593
|
+
oprot.writeFieldBegin('nodeId', TType.I32, 3)
|
|
2594
|
+
oprot.writeI32(self.nodeId)
|
|
2595
|
+
oprot.writeFieldEnd()
|
|
2582
2596
|
oprot.writeFieldStop()
|
|
2583
2597
|
oprot.writeStructEnd()
|
|
2584
2598
|
|
|
@@ -2587,6 +2601,8 @@ class TServiceProvider(object):
|
|
|
2587
2601
|
raise TProtocolException(message='Required field endPoint is unset!')
|
|
2588
2602
|
if self.serviceType is None:
|
|
2589
2603
|
raise TProtocolException(message='Required field serviceType is unset!')
|
|
2604
|
+
if self.nodeId is None:
|
|
2605
|
+
raise TProtocolException(message='Required field nodeId is unset!')
|
|
2590
2606
|
return
|
|
2591
2607
|
|
|
2592
2608
|
def __repr__(self):
|
|
@@ -3265,6 +3281,7 @@ TServiceProvider.thrift_spec = (
|
|
|
3265
3281
|
None, # 0
|
|
3266
3282
|
(1, TType.STRUCT, 'endPoint', [TEndPoint, None], None, ), # 1
|
|
3267
3283
|
(2, TType.I32, 'serviceType', None, None, ), # 2
|
|
3284
|
+
(3, TType.I32, 'nodeId', None, None, ), # 3
|
|
3268
3285
|
)
|
|
3269
3286
|
all_structs.append(TSender)
|
|
3270
3287
|
TSender.thrift_spec = (
|