apache-iotdb 1.2.0__tar.gz → 1.2.1__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.
Files changed (72) hide show
  1. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/PKG-INFO +1 -1
  2. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/apache_iotdb.egg-info/PKG-INFO +1 -1
  3. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/apache_iotdb.egg-info/SOURCES.txt +2 -0
  4. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/IoTDBContainer.py +11 -0
  5. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/Session.py +1 -0
  6. apache-iotdb-1.2.1/iotdb/SessionPool.py +140 -0
  7. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/thrift/rpc/IClientRPCService.py +201 -12
  8. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/thrift/rpc/ttypes.py +321 -133
  9. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/setup.py +1 -1
  10. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/test_dataframe.py +1 -1
  11. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/test_session.py +42 -26
  12. apache-iotdb-1.2.1/tests/test_session_pool.py +101 -0
  13. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/README.md +0 -0
  14. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/apache_iotdb.egg-info/dependency_links.txt +0 -0
  15. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/apache_iotdb.egg-info/entry_points.txt +0 -0
  16. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/apache_iotdb.egg-info/requires.txt +0 -0
  17. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/apache_iotdb.egg-info/top_level.txt +0 -0
  18. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/__init__.py +0 -0
  19. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/dbapi/Connection.py +0 -0
  20. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/dbapi/Cursor.py +0 -0
  21. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/dbapi/Exceptions.py +0 -0
  22. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/dbapi/__init__.py +0 -0
  23. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/dbapi/tests/__init__.py +0 -0
  24. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/dbapi/tests/test_connection.py +0 -0
  25. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/dbapi/tests/test_cursor.py +0 -0
  26. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/sqlalchemy/IoTDBDialect.py +0 -0
  27. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/sqlalchemy/IoTDBIdentifierPreparer.py +0 -0
  28. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/sqlalchemy/IoTDBSQLCompiler.py +0 -0
  29. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/sqlalchemy/IoTDBTypeCompiler.py +0 -0
  30. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/sqlalchemy/__init__.py +0 -0
  31. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/sqlalchemy/tests/__init__.py +0 -0
  32. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/sqlalchemy/tests/test_dialect.py +0 -0
  33. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/template/InternalNode.py +0 -0
  34. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/template/MeasurementNode.py +0 -0
  35. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/template/Template.py +0 -0
  36. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/template/TemplateNode.py +0 -0
  37. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/template/TemplateQueryType.py +0 -0
  38. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/template/__init__.py +0 -0
  39. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/thrift/__init__.py +0 -0
  40. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/thrift/common/__init__.py +0 -0
  41. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/thrift/common/constants.py +0 -0
  42. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/thrift/common/ttypes.py +0 -0
  43. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/thrift/rpc/__init__.py +0 -0
  44. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/thrift/rpc/constants.py +0 -0
  45. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/tsfile/__init__.py +0 -0
  46. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/tsfile/common/__init__.py +0 -0
  47. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/tsfile/common/constant/TsFileConstant.py +0 -0
  48. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/tsfile/common/constant/__init__.py +0 -0
  49. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/tsfile/utils/Pair.py +0 -0
  50. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/tsfile/utils/ReadWriteIOUtils.py +0 -0
  51. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/tsfile/utils/__init__.py +0 -0
  52. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/utils/BitMap.py +0 -0
  53. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/utils/Field.py +0 -0
  54. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/utils/IoTDBConnectionException.py +0 -0
  55. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/utils/IoTDBConstants.py +0 -0
  56. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/utils/IoTDBRpcDataSet.py +0 -0
  57. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/utils/NumpyTablet.py +0 -0
  58. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/utils/RowRecord.py +0 -0
  59. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/utils/SessionDataSet.py +0 -0
  60. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/utils/Tablet.py +0 -0
  61. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/iotdb/utils/__init__.py +0 -0
  62. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/pyproject.toml +0 -0
  63. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/setup.cfg +0 -0
  64. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/__init__.py +0 -0
  65. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/tablet_performance_comparison.py +0 -0
  66. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/test_aligned_timeseries.py +0 -0
  67. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/test_delete_data.py +0 -0
  68. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/test_numpy_tablet.py +0 -0
  69. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/test_one_device.py +0 -0
  70. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/test_tablet.py +0 -0
  71. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/test_template.py +0 -0
  72. {apache-iotdb-1.2.0 → apache-iotdb-1.2.1}/tests/test_todf.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-iotdb
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: Apache IoTDB client API
5
5
  Home-page: https://github.com/apache/iotdb
6
6
  Author: Apache Software Foundation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-iotdb
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: Apache IoTDB client API
5
5
  Home-page: https://github.com/apache/iotdb
6
6
  Author: Apache Software Foundation
@@ -9,6 +9,7 @@ apache_iotdb.egg-info/requires.txt
9
9
  apache_iotdb.egg-info/top_level.txt
10
10
  iotdb/IoTDBContainer.py
11
11
  iotdb/Session.py
12
+ iotdb/SessionPool.py
12
13
  iotdb/__init__.py
13
14
  iotdb/dbapi/Connection.py
14
15
  iotdb/dbapi/Cursor.py
@@ -63,6 +64,7 @@ tests/test_delete_data.py
63
64
  tests/test_numpy_tablet.py
64
65
  tests/test_one_device.py
65
66
  tests/test_session.py
67
+ tests/test_session_pool.py
66
68
  tests/test_tablet.py
67
69
  tests/test_template.py
68
70
  tests/test_todf.py
@@ -16,13 +16,17 @@
16
16
  # under the License.
17
17
  #
18
18
 
19
+ import time
19
20
  from os import environ
20
21
 
21
22
  from testcontainers.core.container import DockerContainer
23
+ from testcontainers.core.utils import setup_logger
22
24
  from testcontainers.core.waiting_utils import wait_container_is_ready
23
25
 
24
26
  from iotdb.Session import Session
25
27
 
28
+ logger = setup_logger(__name__)
29
+
26
30
 
27
31
  class IoTDBContainer(DockerContainer):
28
32
  IOTDB_USER = environ.get("IOTDB_USER", "root")
@@ -48,4 +52,11 @@ class IoTDBContainer(DockerContainer):
48
52
  self._configure()
49
53
  super().start()
50
54
  self._connect()
55
+ # sleep 2s to make sure the confignode cached the datanode info
56
+ time.sleep(2)
57
+ return self
58
+
59
+ def stop(self, force=True, delete_volume=True):
60
+ logger.info(self.get_wrapped_container().logs().decode("utf-8"))
61
+ super().stop(force, delete_volume)
51
62
  return self
@@ -15,6 +15,7 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
  #
18
+
18
19
  import logging
19
20
  import random
20
21
  import struct
@@ -0,0 +1,140 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ import logging
19
+ import multiprocessing
20
+ import time
21
+ from queue import Queue
22
+ from threading import Lock
23
+
24
+ from iotdb.Session import Session
25
+
26
+ DEFAULT_MULTIPIE = 5
27
+ DEFAULT_FETCH_SIZE = 5000
28
+ DEFAULT_MAX_RETRY = 3
29
+ DEFAULT_TIME_ZONE = "UTC+8"
30
+ logger = logging.getLogger("IoTDB")
31
+
32
+
33
+ class PoolConfig(object):
34
+ def __init__(self, host: str = None, port: str = None, user_name: str = None, password: str = None,
35
+ node_urls: list = None,
36
+ fetch_size: int = DEFAULT_FETCH_SIZE, time_zone: str = DEFAULT_TIME_ZONE,
37
+ max_retry: int = DEFAULT_MAX_RETRY, enable_compression: bool = False):
38
+ self.host = host
39
+ self.port = port
40
+ if node_urls is None:
41
+ if host is None or port is None:
42
+ raise ValueError("(host,port) and node_urls cannot be None at the same time.")
43
+ node_urls = []
44
+ self.node_urls = node_urls
45
+ self.user_name = user_name
46
+ self.password = password
47
+ self.fetch_size = fetch_size
48
+ self.time_zone = time_zone
49
+ self.max_retry = max_retry
50
+ self.enable_compression = enable_compression
51
+
52
+
53
+ class SessionPool(object):
54
+
55
+ def __init__(self, pool_config: PoolConfig, max_pool_size: int, wait_timeout_in_ms: int):
56
+ self.__pool_config = pool_config
57
+ self.__max_pool_size = max_pool_size
58
+ self.__wait_timeout_in_ms = wait_timeout_in_ms / 1000
59
+ self.__pool_size = 0
60
+ self.__queue = Queue(max_pool_size)
61
+ self.__lock = Lock()
62
+ self.__closed = False
63
+
64
+ def __construct_session(self) -> Session:
65
+ if len(self.__pool_config.node_urls) > 0:
66
+ session = Session.init_from_node_urls(self.__pool_config.node_urls, self.__pool_config.user_name,
67
+ self.__pool_config.password, self.__pool_config.fetch_size,
68
+ self.__pool_config.time_zone)
69
+
70
+ else:
71
+ session = Session(self.__pool_config.host, self.__pool_config.port, self.__pool_config.user_name,
72
+ self.__pool_config.password, self.__pool_config.fetch_size, self.__pool_config.time_zone)
73
+
74
+ session.open(self.__pool_config.enable_compression)
75
+ return session
76
+
77
+ def __poll_session(self):
78
+ q = None
79
+ if not self.__queue.empty():
80
+ q = self.__queue.get(block=False)
81
+ return q
82
+
83
+ def get_session(self) -> Session:
84
+
85
+ if self.__closed:
86
+ raise ConnectionError("SessionPool has already been closed.")
87
+
88
+ should_create = False
89
+ start = time.time()
90
+
91
+ session = self.__poll_session()
92
+ while session is None:
93
+ with self.__lock:
94
+ if self.__pool_size < self.__max_pool_size:
95
+ self.__pool_size += 1
96
+ should_create = True
97
+ break
98
+ else:
99
+ if time.time() - start > self.__wait_timeout_in_ms:
100
+ raise TimeoutError("Wait to get session timeout in SessionPool, current pool size: {0}"
101
+ .format(self.__max_pool_size))
102
+ time.sleep(1)
103
+ session = self.__poll_session()
104
+
105
+ if should_create:
106
+ try:
107
+ session = self.__construct_session()
108
+ except Exception as e:
109
+ with self.__lock:
110
+ self.__pool_size -= 1
111
+ raise e
112
+
113
+ return session
114
+
115
+ def put_back(self, session: Session):
116
+
117
+ if self.__closed:
118
+ raise ConnectionError("SessionPool has already been closed, please close the session manually.")
119
+
120
+ if session.is_open():
121
+ self.__queue.put(session)
122
+ else:
123
+ with self.__lock:
124
+ self.__pool_size -= 1
125
+
126
+ def close(self):
127
+
128
+ with self.__lock:
129
+ while not self.__queue.empty():
130
+ session = self.__queue.get(block=False)
131
+ session.close()
132
+ self.__pool_size -= 1
133
+ self.__closed = True
134
+ logger.info("SessionPool has been closed successfully.")
135
+
136
+
137
+ def create_session_pool(pool_config: PoolConfig, max_pool_size: int, wait_timeout_in_ms: int) -> SessionPool:
138
+ if max_pool_size <= 0:
139
+ max_pool_size = multiprocessing.cpu_count() * DEFAULT_MULTIPIE
140
+ return SessionPool(pool_config, max_pool_size, wait_timeout_in_ms)
@@ -59,6 +59,14 @@ class Iface(object):
59
59
  """
60
60
  pass
61
61
 
62
+ def executeFastLastDataQueryForOneDeviceV2(self, req):
63
+ """
64
+ Parameters:
65
+ - req
66
+
67
+ """
68
+ pass
69
+
62
70
  def executeAggregationQueryV2(self, req):
63
71
  """
64
72
  Parameters:
@@ -664,6 +672,38 @@ class Client(Iface):
664
672
  return result.success
665
673
  raise TApplicationException(TApplicationException.MISSING_RESULT, "executeLastDataQueryV2 failed: unknown result")
666
674
 
675
+ def executeFastLastDataQueryForOneDeviceV2(self, req):
676
+ """
677
+ Parameters:
678
+ - req
679
+
680
+ """
681
+ self.send_executeFastLastDataQueryForOneDeviceV2(req)
682
+ return self.recv_executeFastLastDataQueryForOneDeviceV2()
683
+
684
+ def send_executeFastLastDataQueryForOneDeviceV2(self, req):
685
+ self._oprot.writeMessageBegin('executeFastLastDataQueryForOneDeviceV2', TMessageType.CALL, self._seqid)
686
+ args = executeFastLastDataQueryForOneDeviceV2_args()
687
+ args.req = req
688
+ args.write(self._oprot)
689
+ self._oprot.writeMessageEnd()
690
+ self._oprot.trans.flush()
691
+
692
+ def recv_executeFastLastDataQueryForOneDeviceV2(self):
693
+ iprot = self._iprot
694
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
695
+ if mtype == TMessageType.EXCEPTION:
696
+ x = TApplicationException()
697
+ x.read(iprot)
698
+ iprot.readMessageEnd()
699
+ raise x
700
+ result = executeFastLastDataQueryForOneDeviceV2_result()
701
+ result.read(iprot)
702
+ iprot.readMessageEnd()
703
+ if result.success is not None:
704
+ return result.success
705
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "executeFastLastDataQueryForOneDeviceV2 failed: unknown result")
706
+
667
707
  def executeAggregationQueryV2(self, req):
668
708
  """
669
709
  Parameters:
@@ -2456,6 +2496,7 @@ class Processor(Iface, TProcessor):
2456
2496
  self._processMap["executeStatementV2"] = Processor.process_executeStatementV2
2457
2497
  self._processMap["executeRawDataQueryV2"] = Processor.process_executeRawDataQueryV2
2458
2498
  self._processMap["executeLastDataQueryV2"] = Processor.process_executeLastDataQueryV2
2499
+ self._processMap["executeFastLastDataQueryForOneDeviceV2"] = Processor.process_executeFastLastDataQueryForOneDeviceV2
2459
2500
  self._processMap["executeAggregationQueryV2"] = Processor.process_executeAggregationQueryV2
2460
2501
  self._processMap["executeGroupByQueryIntervalQuery"] = Processor.process_executeGroupByQueryIntervalQuery
2461
2502
  self._processMap["fetchResultsV2"] = Processor.process_fetchResultsV2
@@ -2649,6 +2690,29 @@ class Processor(Iface, TProcessor):
2649
2690
  oprot.writeMessageEnd()
2650
2691
  oprot.trans.flush()
2651
2692
 
2693
+ def process_executeFastLastDataQueryForOneDeviceV2(self, seqid, iprot, oprot):
2694
+ args = executeFastLastDataQueryForOneDeviceV2_args()
2695
+ args.read(iprot)
2696
+ iprot.readMessageEnd()
2697
+ result = executeFastLastDataQueryForOneDeviceV2_result()
2698
+ try:
2699
+ result.success = self._handler.executeFastLastDataQueryForOneDeviceV2(args.req)
2700
+ msg_type = TMessageType.REPLY
2701
+ except TTransport.TTransportException:
2702
+ raise
2703
+ except TApplicationException as ex:
2704
+ logging.exception('TApplication exception in handler')
2705
+ msg_type = TMessageType.EXCEPTION
2706
+ result = ex
2707
+ except Exception:
2708
+ logging.exception('Unexpected exception in handler')
2709
+ msg_type = TMessageType.EXCEPTION
2710
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
2711
+ oprot.writeMessageBegin("executeFastLastDataQueryForOneDeviceV2", msg_type, seqid)
2712
+ result.write(oprot)
2713
+ oprot.writeMessageEnd()
2714
+ oprot.trans.flush()
2715
+
2652
2716
  def process_executeAggregationQueryV2(self, seqid, iprot, oprot):
2653
2717
  args = executeAggregationQueryV2_args()
2654
2718
  args.read(iprot)
@@ -4565,6 +4629,131 @@ executeLastDataQueryV2_result.thrift_spec = (
4565
4629
  )
4566
4630
 
4567
4631
 
4632
+ class executeFastLastDataQueryForOneDeviceV2_args(object):
4633
+ """
4634
+ Attributes:
4635
+ - req
4636
+
4637
+ """
4638
+
4639
+
4640
+ def __init__(self, req=None,):
4641
+ self.req = req
4642
+
4643
+ def read(self, iprot):
4644
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
4645
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
4646
+ return
4647
+ iprot.readStructBegin()
4648
+ while True:
4649
+ (fname, ftype, fid) = iprot.readFieldBegin()
4650
+ if ftype == TType.STOP:
4651
+ break
4652
+ if fid == 1:
4653
+ if ftype == TType.STRUCT:
4654
+ self.req = TSFastLastDataQueryForOneDeviceReq()
4655
+ self.req.read(iprot)
4656
+ else:
4657
+ iprot.skip(ftype)
4658
+ else:
4659
+ iprot.skip(ftype)
4660
+ iprot.readFieldEnd()
4661
+ iprot.readStructEnd()
4662
+
4663
+ def write(self, oprot):
4664
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
4665
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
4666
+ return
4667
+ oprot.writeStructBegin('executeFastLastDataQueryForOneDeviceV2_args')
4668
+ if self.req is not None:
4669
+ oprot.writeFieldBegin('req', TType.STRUCT, 1)
4670
+ self.req.write(oprot)
4671
+ oprot.writeFieldEnd()
4672
+ oprot.writeFieldStop()
4673
+ oprot.writeStructEnd()
4674
+
4675
+ def validate(self):
4676
+ return
4677
+
4678
+ def __repr__(self):
4679
+ L = ['%s=%r' % (key, value)
4680
+ for key, value in self.__dict__.items()]
4681
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4682
+
4683
+ def __eq__(self, other):
4684
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4685
+
4686
+ def __ne__(self, other):
4687
+ return not (self == other)
4688
+ all_structs.append(executeFastLastDataQueryForOneDeviceV2_args)
4689
+ executeFastLastDataQueryForOneDeviceV2_args.thrift_spec = (
4690
+ None, # 0
4691
+ (1, TType.STRUCT, 'req', [TSFastLastDataQueryForOneDeviceReq, None], None, ), # 1
4692
+ )
4693
+
4694
+
4695
+ class executeFastLastDataQueryForOneDeviceV2_result(object):
4696
+ """
4697
+ Attributes:
4698
+ - success
4699
+
4700
+ """
4701
+
4702
+
4703
+ def __init__(self, success=None,):
4704
+ self.success = success
4705
+
4706
+ def read(self, iprot):
4707
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
4708
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
4709
+ return
4710
+ iprot.readStructBegin()
4711
+ while True:
4712
+ (fname, ftype, fid) = iprot.readFieldBegin()
4713
+ if ftype == TType.STOP:
4714
+ break
4715
+ if fid == 0:
4716
+ if ftype == TType.STRUCT:
4717
+ self.success = TSExecuteStatementResp()
4718
+ self.success.read(iprot)
4719
+ else:
4720
+ iprot.skip(ftype)
4721
+ else:
4722
+ iprot.skip(ftype)
4723
+ iprot.readFieldEnd()
4724
+ iprot.readStructEnd()
4725
+
4726
+ def write(self, oprot):
4727
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
4728
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
4729
+ return
4730
+ oprot.writeStructBegin('executeFastLastDataQueryForOneDeviceV2_result')
4731
+ if self.success is not None:
4732
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
4733
+ self.success.write(oprot)
4734
+ oprot.writeFieldEnd()
4735
+ oprot.writeFieldStop()
4736
+ oprot.writeStructEnd()
4737
+
4738
+ def validate(self):
4739
+ return
4740
+
4741
+ def __repr__(self):
4742
+ L = ['%s=%r' % (key, value)
4743
+ for key, value in self.__dict__.items()]
4744
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4745
+
4746
+ def __eq__(self, other):
4747
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4748
+
4749
+ def __ne__(self, other):
4750
+ return not (self == other)
4751
+ all_structs.append(executeFastLastDataQueryForOneDeviceV2_result)
4752
+ executeFastLastDataQueryForOneDeviceV2_result.thrift_spec = (
4753
+ (0, TType.STRUCT, 'success', [TSExecuteStatementResp, None], None, ), # 0
4754
+ )
4755
+
4756
+
4568
4757
  class executeAggregationQueryV2_args(object):
4569
4758
  """
4570
4759
  Attributes:
@@ -7085,10 +7274,10 @@ class deleteTimeseries_args(object):
7085
7274
  elif fid == 2:
7086
7275
  if ftype == TType.LIST:
7087
7276
  self.path = []
7088
- (_etype627, _size624) = iprot.readListBegin()
7089
- for _i628 in range(_size624):
7090
- _elem629 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
7091
- self.path.append(_elem629)
7277
+ (_etype634, _size631) = iprot.readListBegin()
7278
+ for _i635 in range(_size631):
7279
+ _elem636 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
7280
+ self.path.append(_elem636)
7092
7281
  iprot.readListEnd()
7093
7282
  else:
7094
7283
  iprot.skip(ftype)
@@ -7109,8 +7298,8 @@ class deleteTimeseries_args(object):
7109
7298
  if self.path is not None:
7110
7299
  oprot.writeFieldBegin('path', TType.LIST, 2)
7111
7300
  oprot.writeListBegin(TType.STRING, len(self.path))
7112
- for iter630 in self.path:
7113
- oprot.writeString(iter630.encode('utf-8') if sys.version_info[0] == 2 else iter630)
7301
+ for iter637 in self.path:
7302
+ oprot.writeString(iter637.encode('utf-8') if sys.version_info[0] == 2 else iter637)
7114
7303
  oprot.writeListEnd()
7115
7304
  oprot.writeFieldEnd()
7116
7305
  oprot.writeFieldStop()
@@ -7229,10 +7418,10 @@ class deleteStorageGroups_args(object):
7229
7418
  elif fid == 2:
7230
7419
  if ftype == TType.LIST:
7231
7420
  self.storageGroup = []
7232
- (_etype634, _size631) = iprot.readListBegin()
7233
- for _i635 in range(_size631):
7234
- _elem636 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
7235
- self.storageGroup.append(_elem636)
7421
+ (_etype641, _size638) = iprot.readListBegin()
7422
+ for _i642 in range(_size638):
7423
+ _elem643 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
7424
+ self.storageGroup.append(_elem643)
7236
7425
  iprot.readListEnd()
7237
7426
  else:
7238
7427
  iprot.skip(ftype)
@@ -7253,8 +7442,8 @@ class deleteStorageGroups_args(object):
7253
7442
  if self.storageGroup is not None:
7254
7443
  oprot.writeFieldBegin('storageGroup', TType.LIST, 2)
7255
7444
  oprot.writeListBegin(TType.STRING, len(self.storageGroup))
7256
- for iter637 in self.storageGroup:
7257
- oprot.writeString(iter637.encode('utf-8') if sys.version_info[0] == 2 else iter637)
7445
+ for iter644 in self.storageGroup:
7446
+ oprot.writeString(iter644.encode('utf-8') if sys.version_info[0] == 2 else iter644)
7258
7447
  oprot.writeListEnd()
7259
7448
  oprot.writeFieldEnd()
7260
7449
  oprot.writeFieldStop()