apache-iotdb 2.0.3__tar.gz → 2.0.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.
Files changed (90) hide show
  1. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/PKG-INFO +4 -3
  2. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/README.md +2 -2
  3. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/apache_iotdb.egg-info/PKG-INFO +4 -3
  4. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/apache_iotdb.egg-info/requires.txt +1 -0
  5. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/Session.py +16 -2
  6. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/SessionPool.py +3 -1
  7. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/common/ttypes.py +3 -0
  8. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/confignode/IConfigNodeRPCService.py +192 -2
  9. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/confignode/ttypes.py +166 -6
  10. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/Field.py +26 -3
  11. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/SessionDataSet.py +15 -4
  12. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/iotdb_rpc_dataset.py +24 -14
  13. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/rpc_utils.py +41 -0
  14. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/pyproject.toml +3 -2
  15. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/tablet_performance_comparison.py +3 -1
  16. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_new_data_types.py +6 -6
  17. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_tablemodel_query.py +21 -1
  18. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/apache_iotdb.egg-info/SOURCES.txt +0 -0
  19. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/apache_iotdb.egg-info/dependency_links.txt +0 -0
  20. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/apache_iotdb.egg-info/entry_points.txt +0 -0
  21. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/apache_iotdb.egg-info/top_level.txt +0 -0
  22. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/__init__.py +0 -0
  23. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/dbapi/Connection.py +0 -0
  24. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/dbapi/Cursor.py +0 -0
  25. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/dbapi/Exceptions.py +0 -0
  26. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/dbapi/__init__.py +0 -0
  27. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/sqlalchemy/IoTDBDialect.py +0 -0
  28. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/sqlalchemy/IoTDBIdentifierPreparer.py +0 -0
  29. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/sqlalchemy/IoTDBSQLCompiler.py +0 -0
  30. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/sqlalchemy/IoTDBTypeCompiler.py +0 -0
  31. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/sqlalchemy/__init__.py +0 -0
  32. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/table_session.py +0 -0
  33. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/table_session_pool.py +0 -0
  34. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/template/MeasurementNode.py +0 -0
  35. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/template/Template.py +0 -0
  36. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/template/TemplateNode.py +0 -0
  37. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/template/TemplateQueryType.py +0 -0
  38. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/template/__init__.py +0 -0
  39. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/__init__.py +0 -0
  40. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/common/__init__.py +0 -0
  41. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/common/constants.py +0 -0
  42. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/confignode/__init__.py +0 -0
  43. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/confignode/constants.py +0 -0
  44. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/datanode/IDataNodeRPCService.py +0 -0
  45. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/datanode/MPPDataExchangeService.py +0 -0
  46. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/datanode/__init__.py +0 -0
  47. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/datanode/constants.py +0 -0
  48. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/datanode/ttypes.py +0 -0
  49. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/rpc/IClientRPCService.py +0 -0
  50. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/rpc/__init__.py +0 -0
  51. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/rpc/constants.py +0 -0
  52. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/thrift/rpc/ttypes.py +0 -0
  53. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/tsfile/__init__.py +0 -0
  54. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/tsfile/common/__init__.py +0 -0
  55. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/tsfile/common/constant/__init__.py +0 -0
  56. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/tsfile/common/constant/tsfile_constant.py +0 -0
  57. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/tsfile/utils/__init__.py +0 -0
  58. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/tsfile/utils/date_utils.py +0 -0
  59. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/tsfile/utils/pair.py +0 -0
  60. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/tsfile/utils/read_write_io_utils.py +0 -0
  61. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/tsfile/utils/tsblock_serde.py +0 -0
  62. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/BitMap.py +0 -0
  63. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/IoTDBConstants.py +0 -0
  64. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/NumpyTablet.py +0 -0
  65. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/RowRecord.py +0 -0
  66. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/Tablet.py +0 -0
  67. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/__init__.py +0 -0
  68. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/iotdb/utils/exception.py +0 -0
  69. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/setup.cfg +0 -0
  70. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/__init__.py +0 -0
  71. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/__init__.py +0 -0
  72. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/dbapi/__init__.py +0 -0
  73. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/dbapi/test_connection.py +0 -0
  74. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/dbapi/test_cursor.py +0 -0
  75. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/iotdb_container.py +0 -0
  76. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/sqlalchemy/__init__.py +0 -0
  77. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/sqlalchemy/test_dialect.py +0 -0
  78. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_aligned_timeseries.py +0 -0
  79. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_dataframe.py +0 -0
  80. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_delete_data.py +0 -0
  81. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_one_device.py +0 -0
  82. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_relational_session.py +0 -0
  83. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_session.py +0 -0
  84. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_session_pool.py +0 -0
  85. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_tablemodel_insert.py +0 -0
  86. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_tablet.py +0 -0
  87. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_todf.py +0 -0
  88. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/integration/test_treemodel_insert.py +0 -0
  89. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/unit/__init__.py +0 -0
  90. {apache_iotdb-2.0.3 → apache_iotdb-2.0.4}/tests/unit/test_numpy_tablet.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-iotdb
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: Apache IoTDB client API
5
5
  Author-email: Apache IoTDB <dev@iotdb.apache.org>
6
6
  License-Expression: Apache-2.0
@@ -18,6 +18,7 @@ Requires-Dist: pandas>=1.0.0
18
18
  Requires-Dist: numpy>=1.0.0
19
19
  Requires-Dist: sqlalchemy>=1.4
20
20
  Requires-Dist: sqlalchemy-utils>=0.37.8
21
+ Requires-Dist: tzlocal>=4.0
21
22
 
22
23
  <!--
23
24
 
@@ -94,7 +95,7 @@ session.close()
94
95
  * Initialize a Session
95
96
 
96
97
  ```python
97
- session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8")
98
+ session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="Asia/Shanghai")
98
99
  ```
99
100
 
100
101
  * Open a session, with a parameter to specify whether to enable RPC compression
@@ -396,7 +397,7 @@ ip = "127.0.0.1"
396
397
  port_ = "6667"
397
398
  username_ = "root"
398
399
  password_ = "root"
399
- conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="UTC+8",sqlalchemy_mode=False)
400
+ conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="Asia/Shanghai",sqlalchemy_mode=False)
400
401
  cursor = conn.cursor()
401
402
  ```
402
403
  + simple SQL statement execution
@@ -73,7 +73,7 @@ session.close()
73
73
  * Initialize a Session
74
74
 
75
75
  ```python
76
- session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8")
76
+ session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="Asia/Shanghai")
77
77
  ```
78
78
 
79
79
  * Open a session, with a parameter to specify whether to enable RPC compression
@@ -375,7 +375,7 @@ ip = "127.0.0.1"
375
375
  port_ = "6667"
376
376
  username_ = "root"
377
377
  password_ = "root"
378
- conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="UTC+8",sqlalchemy_mode=False)
378
+ conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="Asia/Shanghai",sqlalchemy_mode=False)
379
379
  cursor = conn.cursor()
380
380
  ```
381
381
  + simple SQL statement execution
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-iotdb
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: Apache IoTDB client API
5
5
  Author-email: Apache IoTDB <dev@iotdb.apache.org>
6
6
  License-Expression: Apache-2.0
@@ -18,6 +18,7 @@ Requires-Dist: pandas>=1.0.0
18
18
  Requires-Dist: numpy>=1.0.0
19
19
  Requires-Dist: sqlalchemy>=1.4
20
20
  Requires-Dist: sqlalchemy-utils>=0.37.8
21
+ Requires-Dist: tzlocal>=4.0
21
22
 
22
23
  <!--
23
24
 
@@ -94,7 +95,7 @@ session.close()
94
95
  * Initialize a Session
95
96
 
96
97
  ```python
97
- session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8")
98
+ session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="Asia/Shanghai")
98
99
  ```
99
100
 
100
101
  * Open a session, with a parameter to specify whether to enable RPC compression
@@ -396,7 +397,7 @@ ip = "127.0.0.1"
396
397
  port_ = "6667"
397
398
  username_ = "root"
398
399
  password_ = "root"
399
- conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="UTC+8",sqlalchemy_mode=False)
400
+ conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="Asia/Shanghai",sqlalchemy_mode=False)
400
401
  cursor = conn.cursor()
401
402
  ```
402
403
  + simple SQL statement execution
@@ -3,3 +3,4 @@ pandas>=1.0.0
3
3
  numpy>=1.0.0
4
4
  sqlalchemy>=1.4
5
5
  sqlalchemy-utils>=0.37.8
6
+ tzlocal>=4.0
@@ -20,10 +20,10 @@ import logging
20
20
  import random
21
21
  import sys
22
22
  import struct
23
- import time
24
23
  import warnings
25
24
  from thrift.protocol import TBinaryProtocol, TCompactProtocol
26
25
  from thrift.transport import TSocket, TTransport
26
+ from tzlocal import get_localzone_name
27
27
 
28
28
  from iotdb.utils.SessionDataSet import SessionDataSet
29
29
  from .template.Template import Template
@@ -71,7 +71,7 @@ class Session(object):
71
71
  DEFAULT_FETCH_SIZE = 5000
72
72
  DEFAULT_USER = "root"
73
73
  DEFAULT_PASSWORD = "root"
74
- DEFAULT_ZONE_ID = time.strftime("%z")
74
+ DEFAULT_ZONE_ID = get_localzone_name()
75
75
  RETRY_NUM = 3
76
76
  SQL_DIALECT = "tree"
77
77
 
@@ -112,6 +112,7 @@ class Session(object):
112
112
  self.__use_ssl = use_ssl
113
113
  self.__ca_certs = ca_certs
114
114
  self.__connection_timeout_in_ms = connection_timeout_in_ms
115
+ self.__time_precision = "ms"
115
116
 
116
117
  @classmethod
117
118
  def init_from_node_urls(
@@ -206,6 +207,11 @@ class Session(object):
206
207
  try:
207
208
  open_resp = client.openSession(open_req)
208
209
  rpc_utils.verify_success(open_resp.status)
210
+ if open_resp.configuration is not None:
211
+ if "timestamp_precision" in open_resp.configuration:
212
+ self.__time_precision = open_resp.configuration[
213
+ "timestamp_precision"
214
+ ]
209
215
 
210
216
  if self.protocol_version != open_resp.serverProtocolVersion:
211
217
  logger.exception(
@@ -1518,6 +1524,8 @@ class Session(object):
1518
1524
  timeout,
1519
1525
  resp.moreData,
1520
1526
  self.__fetch_size,
1527
+ self.__zone_id,
1528
+ self.__time_precision,
1521
1529
  resp.columnIndex2TsBlockColumnIndexList,
1522
1530
  )
1523
1531
 
@@ -1587,6 +1595,8 @@ class Session(object):
1587
1595
  timeout,
1588
1596
  resp.moreData,
1589
1597
  self.__fetch_size,
1598
+ self.__zone_id,
1599
+ self.__time_precision,
1590
1600
  resp.columnIndex2TsBlockColumnIndexList,
1591
1601
  )
1592
1602
  else:
@@ -1748,6 +1758,8 @@ class Session(object):
1748
1758
  0,
1749
1759
  resp.moreData,
1750
1760
  self.__fetch_size,
1761
+ self.__zone_id,
1762
+ self.__time_precision,
1751
1763
  resp.columnIndex2TsBlockColumnIndexList,
1752
1764
  )
1753
1765
 
@@ -1793,6 +1805,8 @@ class Session(object):
1793
1805
  0,
1794
1806
  resp.moreData,
1795
1807
  self.__fetch_size,
1808
+ self.__zone_id,
1809
+ self.__time_precision,
1796
1810
  resp.columnIndex2TsBlockColumnIndexList,
1797
1811
  )
1798
1812
 
@@ -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 = "UTC+8"
31
+ DEFAULT_TIME_ZONE = get_localzone_name()
30
32
  SQL_DIALECT = "tree"
31
33
  logger = logging.getLogger("IoTDB")
32
34
 
@@ -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
 
@@ -1245,7 +1245,17 @@ class Iface(object):
1245
1245
 
1246
1246
  def dropSubscription(self, req):
1247
1247
  """
1248
- Close subscription
1248
+ Close subscription by consumer
1249
+
1250
+ Parameters:
1251
+ - req
1252
+
1253
+ """
1254
+ pass
1255
+
1256
+ def dropSubscriptionById(self, req):
1257
+ """
1258
+ Close subscription by session
1249
1259
 
1250
1260
  Parameters:
1251
1261
  - req
@@ -5626,7 +5636,7 @@ class Client(Iface):
5626
5636
 
5627
5637
  def dropSubscription(self, req):
5628
5638
  """
5629
- Close subscription
5639
+ Close subscription by consumer
5630
5640
 
5631
5641
  Parameters:
5632
5642
  - req
@@ -5658,6 +5668,40 @@ class Client(Iface):
5658
5668
  return result.success
5659
5669
  raise TApplicationException(TApplicationException.MISSING_RESULT, "dropSubscription failed: unknown result")
5660
5670
 
5671
+ def dropSubscriptionById(self, req):
5672
+ """
5673
+ Close subscription by session
5674
+
5675
+ Parameters:
5676
+ - req
5677
+
5678
+ """
5679
+ self.send_dropSubscriptionById(req)
5680
+ return self.recv_dropSubscriptionById()
5681
+
5682
+ def send_dropSubscriptionById(self, req):
5683
+ self._oprot.writeMessageBegin('dropSubscriptionById', TMessageType.CALL, self._seqid)
5684
+ args = dropSubscriptionById_args()
5685
+ args.req = req
5686
+ args.write(self._oprot)
5687
+ self._oprot.writeMessageEnd()
5688
+ self._oprot.trans.flush()
5689
+
5690
+ def recv_dropSubscriptionById(self):
5691
+ iprot = self._iprot
5692
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
5693
+ if mtype == TMessageType.EXCEPTION:
5694
+ x = TApplicationException()
5695
+ x.read(iprot)
5696
+ iprot.readMessageEnd()
5697
+ raise x
5698
+ result = dropSubscriptionById_result()
5699
+ result.read(iprot)
5700
+ iprot.readMessageEnd()
5701
+ if result.success is not None:
5702
+ return result.success
5703
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "dropSubscriptionById failed: unknown result")
5704
+
5661
5705
  def showSubscription(self, req):
5662
5706
  """
5663
5707
  Show Subscription on topic name, if name is empty, show all subscriptions
@@ -6735,6 +6779,7 @@ class Processor(Iface, TProcessor):
6735
6779
  self._processMap["closeConsumer"] = Processor.process_closeConsumer
6736
6780
  self._processMap["createSubscription"] = Processor.process_createSubscription
6737
6781
  self._processMap["dropSubscription"] = Processor.process_dropSubscription
6782
+ self._processMap["dropSubscriptionById"] = Processor.process_dropSubscriptionById
6738
6783
  self._processMap["showSubscription"] = Processor.process_showSubscription
6739
6784
  self._processMap["getAllSubscriptionInfo"] = Processor.process_getAllSubscriptionInfo
6740
6785
  self._processMap["getRegionId"] = Processor.process_getRegionId
@@ -9592,6 +9637,29 @@ class Processor(Iface, TProcessor):
9592
9637
  oprot.writeMessageEnd()
9593
9638
  oprot.trans.flush()
9594
9639
 
9640
+ def process_dropSubscriptionById(self, seqid, iprot, oprot):
9641
+ args = dropSubscriptionById_args()
9642
+ args.read(iprot)
9643
+ iprot.readMessageEnd()
9644
+ result = dropSubscriptionById_result()
9645
+ try:
9646
+ result.success = self._handler.dropSubscriptionById(args.req)
9647
+ msg_type = TMessageType.REPLY
9648
+ except TTransport.TTransportException:
9649
+ raise
9650
+ except TApplicationException as ex:
9651
+ logging.exception('TApplication exception in handler')
9652
+ msg_type = TMessageType.EXCEPTION
9653
+ result = ex
9654
+ except Exception:
9655
+ logging.exception('Unexpected exception in handler')
9656
+ msg_type = TMessageType.EXCEPTION
9657
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
9658
+ oprot.writeMessageBegin("dropSubscriptionById", msg_type, seqid)
9659
+ result.write(oprot)
9660
+ oprot.writeMessageEnd()
9661
+ oprot.trans.flush()
9662
+
9595
9663
  def process_showSubscription(self, seqid, iprot, oprot):
9596
9664
  args = showSubscription_args()
9597
9665
  args.read(iprot)
@@ -24798,6 +24866,128 @@ dropSubscription_result.thrift_spec = (
24798
24866
  )
24799
24867
 
24800
24868
 
24869
+ class dropSubscriptionById_args(object):
24870
+ """
24871
+ Attributes:
24872
+ - req
24873
+
24874
+ """
24875
+
24876
+
24877
+ def __init__(self, req=None,):
24878
+ self.req = req
24879
+
24880
+ def read(self, iprot):
24881
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
24882
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
24883
+ return
24884
+ iprot.readStructBegin()
24885
+ while True:
24886
+ (fname, ftype, fid) = iprot.readFieldBegin()
24887
+ if ftype == TType.STOP:
24888
+ break
24889
+ if fid == -1:
24890
+ if ftype == TType.STRUCT:
24891
+ self.req = TDropSubscriptionReq()
24892
+ self.req.read(iprot)
24893
+ else:
24894
+ iprot.skip(ftype)
24895
+ else:
24896
+ iprot.skip(ftype)
24897
+ iprot.readFieldEnd()
24898
+ iprot.readStructEnd()
24899
+
24900
+ def write(self, oprot):
24901
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
24902
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
24903
+ return
24904
+ oprot.writeStructBegin('dropSubscriptionById_args')
24905
+ if self.req is not None:
24906
+ oprot.writeFieldBegin('req', TType.STRUCT, -1)
24907
+ self.req.write(oprot)
24908
+ oprot.writeFieldEnd()
24909
+ oprot.writeFieldStop()
24910
+ oprot.writeStructEnd()
24911
+
24912
+ def validate(self):
24913
+ return
24914
+
24915
+ def __repr__(self):
24916
+ L = ['%s=%r' % (key, value)
24917
+ for key, value in self.__dict__.items()]
24918
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
24919
+
24920
+ def __eq__(self, other):
24921
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
24922
+
24923
+ def __ne__(self, other):
24924
+ return not (self == other)
24925
+ all_structs.append(dropSubscriptionById_args)
24926
+ dropSubscriptionById_args.thrift_spec = ()
24927
+
24928
+
24929
+ class dropSubscriptionById_result(object):
24930
+ """
24931
+ Attributes:
24932
+ - success
24933
+
24934
+ """
24935
+
24936
+
24937
+ def __init__(self, success=None,):
24938
+ self.success = success
24939
+
24940
+ def read(self, iprot):
24941
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
24942
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
24943
+ return
24944
+ iprot.readStructBegin()
24945
+ while True:
24946
+ (fname, ftype, fid) = iprot.readFieldBegin()
24947
+ if ftype == TType.STOP:
24948
+ break
24949
+ if fid == 0:
24950
+ if ftype == TType.STRUCT:
24951
+ self.success = iotdb.thrift.common.ttypes.TSStatus()
24952
+ self.success.read(iprot)
24953
+ else:
24954
+ iprot.skip(ftype)
24955
+ else:
24956
+ iprot.skip(ftype)
24957
+ iprot.readFieldEnd()
24958
+ iprot.readStructEnd()
24959
+
24960
+ def write(self, oprot):
24961
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
24962
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
24963
+ return
24964
+ oprot.writeStructBegin('dropSubscriptionById_result')
24965
+ if self.success is not None:
24966
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
24967
+ self.success.write(oprot)
24968
+ oprot.writeFieldEnd()
24969
+ oprot.writeFieldStop()
24970
+ oprot.writeStructEnd()
24971
+
24972
+ def validate(self):
24973
+ return
24974
+
24975
+ def __repr__(self):
24976
+ L = ['%s=%r' % (key, value)
24977
+ for key, value in self.__dict__.items()]
24978
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
24979
+
24980
+ def __eq__(self, other):
24981
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
24982
+
24983
+ def __ne__(self, other):
24984
+ return not (self == other)
24985
+ all_structs.append(dropSubscriptionById_result)
24986
+ dropSubscriptionById_result.thrift_spec = (
24987
+ (0, TType.STRUCT, 'success', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 0
24988
+ )
24989
+
24990
+
24801
24991
  class showSubscription_args(object):
24802
24992
  """
24803
24993
  Attributes: