apache-iotdb 2.0.4.dev0__py3-none-any.whl → 2.0.6__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.4.dev0.dist-info → apache_iotdb-2.0.6.dist-info}/METADATA +1 -1
- {apache_iotdb-2.0.4.dev0.dist-info → apache_iotdb-2.0.6.dist-info}/RECORD +19 -15
- {apache_iotdb-2.0.4.dev0.dist-info → apache_iotdb-2.0.6.dist-info}/WHEEL +1 -1
- iotdb/thrift/ainode/IAINodeRPCService.py +803 -0
- iotdb/thrift/ainode/__init__.py +1 -0
- iotdb/thrift/ainode/constants.py +14 -0
- iotdb/thrift/ainode/ttypes.py +916 -0
- iotdb/thrift/common/ttypes.py +156 -21
- iotdb/thrift/confignode/IConfigNodeRPCService.py +1552 -479
- iotdb/thrift/confignode/ttypes.py +1594 -760
- iotdb/thrift/datanode/IDataNodeRPCService.py +581 -8
- iotdb/thrift/datanode/ttypes.py +777 -482
- iotdb/thrift/rpc/IClientRPCService.py +201 -12
- iotdb/thrift/rpc/ttypes.py +625 -421
- tests/integration/iotdb_container.py +4 -1
- tests/integration/sqlalchemy/test_dialect.py +12 -7
- tests/integration/test_treemodel_insert.py +2 -1
- {apache_iotdb-2.0.4.dev0.dist-info → apache_iotdb-2.0.6.dist-info}/entry_points.txt +0 -0
- {apache_iotdb-2.0.4.dev0.dist-info → apache_iotdb-2.0.6.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,803 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Autogenerated by Thrift Compiler (0.14.1)
|
|
3
|
+
#
|
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
5
|
+
#
|
|
6
|
+
# options string: py
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
|
|
10
|
+
from thrift.protocol.TProtocol import TProtocolException
|
|
11
|
+
from thrift.TRecursive import fix_spec
|
|
12
|
+
|
|
13
|
+
import sys
|
|
14
|
+
import logging
|
|
15
|
+
from .ttypes import *
|
|
16
|
+
from thrift.Thrift import TProcessor
|
|
17
|
+
from thrift.transport import TTransport
|
|
18
|
+
all_structs = []
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Iface(object):
|
|
22
|
+
def deleteModel(self, req):
|
|
23
|
+
"""
|
|
24
|
+
Parameters:
|
|
25
|
+
- req
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
def registerModel(self, req):
|
|
31
|
+
"""
|
|
32
|
+
Parameters:
|
|
33
|
+
- req
|
|
34
|
+
|
|
35
|
+
"""
|
|
36
|
+
pass
|
|
37
|
+
|
|
38
|
+
def getAIHeartbeat(self, req):
|
|
39
|
+
"""
|
|
40
|
+
Parameters:
|
|
41
|
+
- req
|
|
42
|
+
|
|
43
|
+
"""
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
def inference(self, req):
|
|
47
|
+
"""
|
|
48
|
+
Parameters:
|
|
49
|
+
- req
|
|
50
|
+
|
|
51
|
+
"""
|
|
52
|
+
pass
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class Client(Iface):
|
|
56
|
+
def __init__(self, iprot, oprot=None):
|
|
57
|
+
self._iprot = self._oprot = iprot
|
|
58
|
+
if oprot is not None:
|
|
59
|
+
self._oprot = oprot
|
|
60
|
+
self._seqid = 0
|
|
61
|
+
|
|
62
|
+
def deleteModel(self, req):
|
|
63
|
+
"""
|
|
64
|
+
Parameters:
|
|
65
|
+
- req
|
|
66
|
+
|
|
67
|
+
"""
|
|
68
|
+
self.send_deleteModel(req)
|
|
69
|
+
return self.recv_deleteModel()
|
|
70
|
+
|
|
71
|
+
def send_deleteModel(self, req):
|
|
72
|
+
self._oprot.writeMessageBegin('deleteModel', TMessageType.CALL, self._seqid)
|
|
73
|
+
args = deleteModel_args()
|
|
74
|
+
args.req = req
|
|
75
|
+
args.write(self._oprot)
|
|
76
|
+
self._oprot.writeMessageEnd()
|
|
77
|
+
self._oprot.trans.flush()
|
|
78
|
+
|
|
79
|
+
def recv_deleteModel(self):
|
|
80
|
+
iprot = self._iprot
|
|
81
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
82
|
+
if mtype == TMessageType.EXCEPTION:
|
|
83
|
+
x = TApplicationException()
|
|
84
|
+
x.read(iprot)
|
|
85
|
+
iprot.readMessageEnd()
|
|
86
|
+
raise x
|
|
87
|
+
result = deleteModel_result()
|
|
88
|
+
result.read(iprot)
|
|
89
|
+
iprot.readMessageEnd()
|
|
90
|
+
if result.success is not None:
|
|
91
|
+
return result.success
|
|
92
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteModel failed: unknown result")
|
|
93
|
+
|
|
94
|
+
def registerModel(self, req):
|
|
95
|
+
"""
|
|
96
|
+
Parameters:
|
|
97
|
+
- req
|
|
98
|
+
|
|
99
|
+
"""
|
|
100
|
+
self.send_registerModel(req)
|
|
101
|
+
return self.recv_registerModel()
|
|
102
|
+
|
|
103
|
+
def send_registerModel(self, req):
|
|
104
|
+
self._oprot.writeMessageBegin('registerModel', TMessageType.CALL, self._seqid)
|
|
105
|
+
args = registerModel_args()
|
|
106
|
+
args.req = req
|
|
107
|
+
args.write(self._oprot)
|
|
108
|
+
self._oprot.writeMessageEnd()
|
|
109
|
+
self._oprot.trans.flush()
|
|
110
|
+
|
|
111
|
+
def recv_registerModel(self):
|
|
112
|
+
iprot = self._iprot
|
|
113
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
114
|
+
if mtype == TMessageType.EXCEPTION:
|
|
115
|
+
x = TApplicationException()
|
|
116
|
+
x.read(iprot)
|
|
117
|
+
iprot.readMessageEnd()
|
|
118
|
+
raise x
|
|
119
|
+
result = registerModel_result()
|
|
120
|
+
result.read(iprot)
|
|
121
|
+
iprot.readMessageEnd()
|
|
122
|
+
if result.success is not None:
|
|
123
|
+
return result.success
|
|
124
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "registerModel failed: unknown result")
|
|
125
|
+
|
|
126
|
+
def getAIHeartbeat(self, req):
|
|
127
|
+
"""
|
|
128
|
+
Parameters:
|
|
129
|
+
- req
|
|
130
|
+
|
|
131
|
+
"""
|
|
132
|
+
self.send_getAIHeartbeat(req)
|
|
133
|
+
return self.recv_getAIHeartbeat()
|
|
134
|
+
|
|
135
|
+
def send_getAIHeartbeat(self, req):
|
|
136
|
+
self._oprot.writeMessageBegin('getAIHeartbeat', TMessageType.CALL, self._seqid)
|
|
137
|
+
args = getAIHeartbeat_args()
|
|
138
|
+
args.req = req
|
|
139
|
+
args.write(self._oprot)
|
|
140
|
+
self._oprot.writeMessageEnd()
|
|
141
|
+
self._oprot.trans.flush()
|
|
142
|
+
|
|
143
|
+
def recv_getAIHeartbeat(self):
|
|
144
|
+
iprot = self._iprot
|
|
145
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
146
|
+
if mtype == TMessageType.EXCEPTION:
|
|
147
|
+
x = TApplicationException()
|
|
148
|
+
x.read(iprot)
|
|
149
|
+
iprot.readMessageEnd()
|
|
150
|
+
raise x
|
|
151
|
+
result = getAIHeartbeat_result()
|
|
152
|
+
result.read(iprot)
|
|
153
|
+
iprot.readMessageEnd()
|
|
154
|
+
if result.success is not None:
|
|
155
|
+
return result.success
|
|
156
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAIHeartbeat failed: unknown result")
|
|
157
|
+
|
|
158
|
+
def inference(self, req):
|
|
159
|
+
"""
|
|
160
|
+
Parameters:
|
|
161
|
+
- req
|
|
162
|
+
|
|
163
|
+
"""
|
|
164
|
+
self.send_inference(req)
|
|
165
|
+
return self.recv_inference()
|
|
166
|
+
|
|
167
|
+
def send_inference(self, req):
|
|
168
|
+
self._oprot.writeMessageBegin('inference', TMessageType.CALL, self._seqid)
|
|
169
|
+
args = inference_args()
|
|
170
|
+
args.req = req
|
|
171
|
+
args.write(self._oprot)
|
|
172
|
+
self._oprot.writeMessageEnd()
|
|
173
|
+
self._oprot.trans.flush()
|
|
174
|
+
|
|
175
|
+
def recv_inference(self):
|
|
176
|
+
iprot = self._iprot
|
|
177
|
+
(fname, mtype, rseqid) = iprot.readMessageBegin()
|
|
178
|
+
if mtype == TMessageType.EXCEPTION:
|
|
179
|
+
x = TApplicationException()
|
|
180
|
+
x.read(iprot)
|
|
181
|
+
iprot.readMessageEnd()
|
|
182
|
+
raise x
|
|
183
|
+
result = inference_result()
|
|
184
|
+
result.read(iprot)
|
|
185
|
+
iprot.readMessageEnd()
|
|
186
|
+
if result.success is not None:
|
|
187
|
+
return result.success
|
|
188
|
+
raise TApplicationException(TApplicationException.MISSING_RESULT, "inference failed: unknown result")
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
class Processor(Iface, TProcessor):
|
|
192
|
+
def __init__(self, handler):
|
|
193
|
+
self._handler = handler
|
|
194
|
+
self._processMap = {}
|
|
195
|
+
self._processMap["deleteModel"] = Processor.process_deleteModel
|
|
196
|
+
self._processMap["registerModel"] = Processor.process_registerModel
|
|
197
|
+
self._processMap["getAIHeartbeat"] = Processor.process_getAIHeartbeat
|
|
198
|
+
self._processMap["inference"] = Processor.process_inference
|
|
199
|
+
self._on_message_begin = None
|
|
200
|
+
|
|
201
|
+
def on_message_begin(self, func):
|
|
202
|
+
self._on_message_begin = func
|
|
203
|
+
|
|
204
|
+
def process(self, iprot, oprot):
|
|
205
|
+
(name, type, seqid) = iprot.readMessageBegin()
|
|
206
|
+
if self._on_message_begin:
|
|
207
|
+
self._on_message_begin(name, type, seqid)
|
|
208
|
+
if name not in self._processMap:
|
|
209
|
+
iprot.skip(TType.STRUCT)
|
|
210
|
+
iprot.readMessageEnd()
|
|
211
|
+
x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
|
|
212
|
+
oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
|
|
213
|
+
x.write(oprot)
|
|
214
|
+
oprot.writeMessageEnd()
|
|
215
|
+
oprot.trans.flush()
|
|
216
|
+
return
|
|
217
|
+
else:
|
|
218
|
+
self._processMap[name](self, seqid, iprot, oprot)
|
|
219
|
+
return True
|
|
220
|
+
|
|
221
|
+
def process_deleteModel(self, seqid, iprot, oprot):
|
|
222
|
+
args = deleteModel_args()
|
|
223
|
+
args.read(iprot)
|
|
224
|
+
iprot.readMessageEnd()
|
|
225
|
+
result = deleteModel_result()
|
|
226
|
+
try:
|
|
227
|
+
result.success = self._handler.deleteModel(args.req)
|
|
228
|
+
msg_type = TMessageType.REPLY
|
|
229
|
+
except TTransport.TTransportException:
|
|
230
|
+
raise
|
|
231
|
+
except TApplicationException as ex:
|
|
232
|
+
logging.exception('TApplication exception in handler')
|
|
233
|
+
msg_type = TMessageType.EXCEPTION
|
|
234
|
+
result = ex
|
|
235
|
+
except Exception:
|
|
236
|
+
logging.exception('Unexpected exception in handler')
|
|
237
|
+
msg_type = TMessageType.EXCEPTION
|
|
238
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
239
|
+
oprot.writeMessageBegin("deleteModel", msg_type, seqid)
|
|
240
|
+
result.write(oprot)
|
|
241
|
+
oprot.writeMessageEnd()
|
|
242
|
+
oprot.trans.flush()
|
|
243
|
+
|
|
244
|
+
def process_registerModel(self, seqid, iprot, oprot):
|
|
245
|
+
args = registerModel_args()
|
|
246
|
+
args.read(iprot)
|
|
247
|
+
iprot.readMessageEnd()
|
|
248
|
+
result = registerModel_result()
|
|
249
|
+
try:
|
|
250
|
+
result.success = self._handler.registerModel(args.req)
|
|
251
|
+
msg_type = TMessageType.REPLY
|
|
252
|
+
except TTransport.TTransportException:
|
|
253
|
+
raise
|
|
254
|
+
except TApplicationException as ex:
|
|
255
|
+
logging.exception('TApplication exception in handler')
|
|
256
|
+
msg_type = TMessageType.EXCEPTION
|
|
257
|
+
result = ex
|
|
258
|
+
except Exception:
|
|
259
|
+
logging.exception('Unexpected exception in handler')
|
|
260
|
+
msg_type = TMessageType.EXCEPTION
|
|
261
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
262
|
+
oprot.writeMessageBegin("registerModel", msg_type, seqid)
|
|
263
|
+
result.write(oprot)
|
|
264
|
+
oprot.writeMessageEnd()
|
|
265
|
+
oprot.trans.flush()
|
|
266
|
+
|
|
267
|
+
def process_getAIHeartbeat(self, seqid, iprot, oprot):
|
|
268
|
+
args = getAIHeartbeat_args()
|
|
269
|
+
args.read(iprot)
|
|
270
|
+
iprot.readMessageEnd()
|
|
271
|
+
result = getAIHeartbeat_result()
|
|
272
|
+
try:
|
|
273
|
+
result.success = self._handler.getAIHeartbeat(args.req)
|
|
274
|
+
msg_type = TMessageType.REPLY
|
|
275
|
+
except TTransport.TTransportException:
|
|
276
|
+
raise
|
|
277
|
+
except TApplicationException as ex:
|
|
278
|
+
logging.exception('TApplication exception in handler')
|
|
279
|
+
msg_type = TMessageType.EXCEPTION
|
|
280
|
+
result = ex
|
|
281
|
+
except Exception:
|
|
282
|
+
logging.exception('Unexpected exception in handler')
|
|
283
|
+
msg_type = TMessageType.EXCEPTION
|
|
284
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
285
|
+
oprot.writeMessageBegin("getAIHeartbeat", msg_type, seqid)
|
|
286
|
+
result.write(oprot)
|
|
287
|
+
oprot.writeMessageEnd()
|
|
288
|
+
oprot.trans.flush()
|
|
289
|
+
|
|
290
|
+
def process_inference(self, seqid, iprot, oprot):
|
|
291
|
+
args = inference_args()
|
|
292
|
+
args.read(iprot)
|
|
293
|
+
iprot.readMessageEnd()
|
|
294
|
+
result = inference_result()
|
|
295
|
+
try:
|
|
296
|
+
result.success = self._handler.inference(args.req)
|
|
297
|
+
msg_type = TMessageType.REPLY
|
|
298
|
+
except TTransport.TTransportException:
|
|
299
|
+
raise
|
|
300
|
+
except TApplicationException as ex:
|
|
301
|
+
logging.exception('TApplication exception in handler')
|
|
302
|
+
msg_type = TMessageType.EXCEPTION
|
|
303
|
+
result = ex
|
|
304
|
+
except Exception:
|
|
305
|
+
logging.exception('Unexpected exception in handler')
|
|
306
|
+
msg_type = TMessageType.EXCEPTION
|
|
307
|
+
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
|
|
308
|
+
oprot.writeMessageBegin("inference", msg_type, seqid)
|
|
309
|
+
result.write(oprot)
|
|
310
|
+
oprot.writeMessageEnd()
|
|
311
|
+
oprot.trans.flush()
|
|
312
|
+
|
|
313
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
class deleteModel_args(object):
|
|
317
|
+
"""
|
|
318
|
+
Attributes:
|
|
319
|
+
- req
|
|
320
|
+
|
|
321
|
+
"""
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
def __init__(self, req=None,):
|
|
325
|
+
self.req = req
|
|
326
|
+
|
|
327
|
+
def read(self, iprot):
|
|
328
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
329
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
330
|
+
return
|
|
331
|
+
iprot.readStructBegin()
|
|
332
|
+
while True:
|
|
333
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
334
|
+
if ftype == TType.STOP:
|
|
335
|
+
break
|
|
336
|
+
if fid == -1:
|
|
337
|
+
if ftype == TType.STRUCT:
|
|
338
|
+
self.req = TDeleteModelReq()
|
|
339
|
+
self.req.read(iprot)
|
|
340
|
+
else:
|
|
341
|
+
iprot.skip(ftype)
|
|
342
|
+
else:
|
|
343
|
+
iprot.skip(ftype)
|
|
344
|
+
iprot.readFieldEnd()
|
|
345
|
+
iprot.readStructEnd()
|
|
346
|
+
|
|
347
|
+
def write(self, oprot):
|
|
348
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
349
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
350
|
+
return
|
|
351
|
+
oprot.writeStructBegin('deleteModel_args')
|
|
352
|
+
if self.req is not None:
|
|
353
|
+
oprot.writeFieldBegin('req', TType.STRUCT, -1)
|
|
354
|
+
self.req.write(oprot)
|
|
355
|
+
oprot.writeFieldEnd()
|
|
356
|
+
oprot.writeFieldStop()
|
|
357
|
+
oprot.writeStructEnd()
|
|
358
|
+
|
|
359
|
+
def validate(self):
|
|
360
|
+
return
|
|
361
|
+
|
|
362
|
+
def __repr__(self):
|
|
363
|
+
L = ['%s=%r' % (key, value)
|
|
364
|
+
for key, value in self.__dict__.items()]
|
|
365
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
366
|
+
|
|
367
|
+
def __eq__(self, other):
|
|
368
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
369
|
+
|
|
370
|
+
def __ne__(self, other):
|
|
371
|
+
return not (self == other)
|
|
372
|
+
all_structs.append(deleteModel_args)
|
|
373
|
+
deleteModel_args.thrift_spec = ()
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
class deleteModel_result(object):
|
|
377
|
+
"""
|
|
378
|
+
Attributes:
|
|
379
|
+
- success
|
|
380
|
+
|
|
381
|
+
"""
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
def __init__(self, success=None,):
|
|
385
|
+
self.success = success
|
|
386
|
+
|
|
387
|
+
def read(self, iprot):
|
|
388
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
389
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
390
|
+
return
|
|
391
|
+
iprot.readStructBegin()
|
|
392
|
+
while True:
|
|
393
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
394
|
+
if ftype == TType.STOP:
|
|
395
|
+
break
|
|
396
|
+
if fid == 0:
|
|
397
|
+
if ftype == TType.STRUCT:
|
|
398
|
+
self.success = iotdb.thrift.common.ttypes.TSStatus()
|
|
399
|
+
self.success.read(iprot)
|
|
400
|
+
else:
|
|
401
|
+
iprot.skip(ftype)
|
|
402
|
+
else:
|
|
403
|
+
iprot.skip(ftype)
|
|
404
|
+
iprot.readFieldEnd()
|
|
405
|
+
iprot.readStructEnd()
|
|
406
|
+
|
|
407
|
+
def write(self, oprot):
|
|
408
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
409
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
410
|
+
return
|
|
411
|
+
oprot.writeStructBegin('deleteModel_result')
|
|
412
|
+
if self.success is not None:
|
|
413
|
+
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
414
|
+
self.success.write(oprot)
|
|
415
|
+
oprot.writeFieldEnd()
|
|
416
|
+
oprot.writeFieldStop()
|
|
417
|
+
oprot.writeStructEnd()
|
|
418
|
+
|
|
419
|
+
def validate(self):
|
|
420
|
+
return
|
|
421
|
+
|
|
422
|
+
def __repr__(self):
|
|
423
|
+
L = ['%s=%r' % (key, value)
|
|
424
|
+
for key, value in self.__dict__.items()]
|
|
425
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
426
|
+
|
|
427
|
+
def __eq__(self, other):
|
|
428
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
429
|
+
|
|
430
|
+
def __ne__(self, other):
|
|
431
|
+
return not (self == other)
|
|
432
|
+
all_structs.append(deleteModel_result)
|
|
433
|
+
deleteModel_result.thrift_spec = (
|
|
434
|
+
(0, TType.STRUCT, 'success', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 0
|
|
435
|
+
)
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
class registerModel_args(object):
|
|
439
|
+
"""
|
|
440
|
+
Attributes:
|
|
441
|
+
- req
|
|
442
|
+
|
|
443
|
+
"""
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
def __init__(self, req=None,):
|
|
447
|
+
self.req = req
|
|
448
|
+
|
|
449
|
+
def read(self, iprot):
|
|
450
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
451
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
452
|
+
return
|
|
453
|
+
iprot.readStructBegin()
|
|
454
|
+
while True:
|
|
455
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
456
|
+
if ftype == TType.STOP:
|
|
457
|
+
break
|
|
458
|
+
if fid == -1:
|
|
459
|
+
if ftype == TType.STRUCT:
|
|
460
|
+
self.req = TRegisterModelReq()
|
|
461
|
+
self.req.read(iprot)
|
|
462
|
+
else:
|
|
463
|
+
iprot.skip(ftype)
|
|
464
|
+
else:
|
|
465
|
+
iprot.skip(ftype)
|
|
466
|
+
iprot.readFieldEnd()
|
|
467
|
+
iprot.readStructEnd()
|
|
468
|
+
|
|
469
|
+
def write(self, oprot):
|
|
470
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
471
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
472
|
+
return
|
|
473
|
+
oprot.writeStructBegin('registerModel_args')
|
|
474
|
+
if self.req is not None:
|
|
475
|
+
oprot.writeFieldBegin('req', TType.STRUCT, -1)
|
|
476
|
+
self.req.write(oprot)
|
|
477
|
+
oprot.writeFieldEnd()
|
|
478
|
+
oprot.writeFieldStop()
|
|
479
|
+
oprot.writeStructEnd()
|
|
480
|
+
|
|
481
|
+
def validate(self):
|
|
482
|
+
return
|
|
483
|
+
|
|
484
|
+
def __repr__(self):
|
|
485
|
+
L = ['%s=%r' % (key, value)
|
|
486
|
+
for key, value in self.__dict__.items()]
|
|
487
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
488
|
+
|
|
489
|
+
def __eq__(self, other):
|
|
490
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
491
|
+
|
|
492
|
+
def __ne__(self, other):
|
|
493
|
+
return not (self == other)
|
|
494
|
+
all_structs.append(registerModel_args)
|
|
495
|
+
registerModel_args.thrift_spec = ()
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
class registerModel_result(object):
|
|
499
|
+
"""
|
|
500
|
+
Attributes:
|
|
501
|
+
- success
|
|
502
|
+
|
|
503
|
+
"""
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
def __init__(self, success=None,):
|
|
507
|
+
self.success = success
|
|
508
|
+
|
|
509
|
+
def read(self, iprot):
|
|
510
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
511
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
512
|
+
return
|
|
513
|
+
iprot.readStructBegin()
|
|
514
|
+
while True:
|
|
515
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
516
|
+
if ftype == TType.STOP:
|
|
517
|
+
break
|
|
518
|
+
if fid == 0:
|
|
519
|
+
if ftype == TType.STRUCT:
|
|
520
|
+
self.success = TRegisterModelResp()
|
|
521
|
+
self.success.read(iprot)
|
|
522
|
+
else:
|
|
523
|
+
iprot.skip(ftype)
|
|
524
|
+
else:
|
|
525
|
+
iprot.skip(ftype)
|
|
526
|
+
iprot.readFieldEnd()
|
|
527
|
+
iprot.readStructEnd()
|
|
528
|
+
|
|
529
|
+
def write(self, oprot):
|
|
530
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
531
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
532
|
+
return
|
|
533
|
+
oprot.writeStructBegin('registerModel_result')
|
|
534
|
+
if self.success is not None:
|
|
535
|
+
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
536
|
+
self.success.write(oprot)
|
|
537
|
+
oprot.writeFieldEnd()
|
|
538
|
+
oprot.writeFieldStop()
|
|
539
|
+
oprot.writeStructEnd()
|
|
540
|
+
|
|
541
|
+
def validate(self):
|
|
542
|
+
return
|
|
543
|
+
|
|
544
|
+
def __repr__(self):
|
|
545
|
+
L = ['%s=%r' % (key, value)
|
|
546
|
+
for key, value in self.__dict__.items()]
|
|
547
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
548
|
+
|
|
549
|
+
def __eq__(self, other):
|
|
550
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
551
|
+
|
|
552
|
+
def __ne__(self, other):
|
|
553
|
+
return not (self == other)
|
|
554
|
+
all_structs.append(registerModel_result)
|
|
555
|
+
registerModel_result.thrift_spec = (
|
|
556
|
+
(0, TType.STRUCT, 'success', [TRegisterModelResp, None], None, ), # 0
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
class getAIHeartbeat_args(object):
|
|
561
|
+
"""
|
|
562
|
+
Attributes:
|
|
563
|
+
- req
|
|
564
|
+
|
|
565
|
+
"""
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
def __init__(self, req=None,):
|
|
569
|
+
self.req = req
|
|
570
|
+
|
|
571
|
+
def read(self, iprot):
|
|
572
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
573
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
574
|
+
return
|
|
575
|
+
iprot.readStructBegin()
|
|
576
|
+
while True:
|
|
577
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
578
|
+
if ftype == TType.STOP:
|
|
579
|
+
break
|
|
580
|
+
if fid == -1:
|
|
581
|
+
if ftype == TType.STRUCT:
|
|
582
|
+
self.req = TAIHeartbeatReq()
|
|
583
|
+
self.req.read(iprot)
|
|
584
|
+
else:
|
|
585
|
+
iprot.skip(ftype)
|
|
586
|
+
else:
|
|
587
|
+
iprot.skip(ftype)
|
|
588
|
+
iprot.readFieldEnd()
|
|
589
|
+
iprot.readStructEnd()
|
|
590
|
+
|
|
591
|
+
def write(self, oprot):
|
|
592
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
593
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
594
|
+
return
|
|
595
|
+
oprot.writeStructBegin('getAIHeartbeat_args')
|
|
596
|
+
if self.req is not None:
|
|
597
|
+
oprot.writeFieldBegin('req', TType.STRUCT, -1)
|
|
598
|
+
self.req.write(oprot)
|
|
599
|
+
oprot.writeFieldEnd()
|
|
600
|
+
oprot.writeFieldStop()
|
|
601
|
+
oprot.writeStructEnd()
|
|
602
|
+
|
|
603
|
+
def validate(self):
|
|
604
|
+
return
|
|
605
|
+
|
|
606
|
+
def __repr__(self):
|
|
607
|
+
L = ['%s=%r' % (key, value)
|
|
608
|
+
for key, value in self.__dict__.items()]
|
|
609
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
610
|
+
|
|
611
|
+
def __eq__(self, other):
|
|
612
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
613
|
+
|
|
614
|
+
def __ne__(self, other):
|
|
615
|
+
return not (self == other)
|
|
616
|
+
all_structs.append(getAIHeartbeat_args)
|
|
617
|
+
getAIHeartbeat_args.thrift_spec = ()
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
class getAIHeartbeat_result(object):
|
|
621
|
+
"""
|
|
622
|
+
Attributes:
|
|
623
|
+
- success
|
|
624
|
+
|
|
625
|
+
"""
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
def __init__(self, success=None,):
|
|
629
|
+
self.success = success
|
|
630
|
+
|
|
631
|
+
def read(self, iprot):
|
|
632
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
633
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
634
|
+
return
|
|
635
|
+
iprot.readStructBegin()
|
|
636
|
+
while True:
|
|
637
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
638
|
+
if ftype == TType.STOP:
|
|
639
|
+
break
|
|
640
|
+
if fid == 0:
|
|
641
|
+
if ftype == TType.STRUCT:
|
|
642
|
+
self.success = TAIHeartbeatResp()
|
|
643
|
+
self.success.read(iprot)
|
|
644
|
+
else:
|
|
645
|
+
iprot.skip(ftype)
|
|
646
|
+
else:
|
|
647
|
+
iprot.skip(ftype)
|
|
648
|
+
iprot.readFieldEnd()
|
|
649
|
+
iprot.readStructEnd()
|
|
650
|
+
|
|
651
|
+
def write(self, oprot):
|
|
652
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
653
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
654
|
+
return
|
|
655
|
+
oprot.writeStructBegin('getAIHeartbeat_result')
|
|
656
|
+
if self.success is not None:
|
|
657
|
+
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
658
|
+
self.success.write(oprot)
|
|
659
|
+
oprot.writeFieldEnd()
|
|
660
|
+
oprot.writeFieldStop()
|
|
661
|
+
oprot.writeStructEnd()
|
|
662
|
+
|
|
663
|
+
def validate(self):
|
|
664
|
+
return
|
|
665
|
+
|
|
666
|
+
def __repr__(self):
|
|
667
|
+
L = ['%s=%r' % (key, value)
|
|
668
|
+
for key, value in self.__dict__.items()]
|
|
669
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
670
|
+
|
|
671
|
+
def __eq__(self, other):
|
|
672
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
673
|
+
|
|
674
|
+
def __ne__(self, other):
|
|
675
|
+
return not (self == other)
|
|
676
|
+
all_structs.append(getAIHeartbeat_result)
|
|
677
|
+
getAIHeartbeat_result.thrift_spec = (
|
|
678
|
+
(0, TType.STRUCT, 'success', [TAIHeartbeatResp, None], None, ), # 0
|
|
679
|
+
)
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
class inference_args(object):
|
|
683
|
+
"""
|
|
684
|
+
Attributes:
|
|
685
|
+
- req
|
|
686
|
+
|
|
687
|
+
"""
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
def __init__(self, req=None,):
|
|
691
|
+
self.req = req
|
|
692
|
+
|
|
693
|
+
def read(self, iprot):
|
|
694
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
695
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
696
|
+
return
|
|
697
|
+
iprot.readStructBegin()
|
|
698
|
+
while True:
|
|
699
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
700
|
+
if ftype == TType.STOP:
|
|
701
|
+
break
|
|
702
|
+
if fid == -1:
|
|
703
|
+
if ftype == TType.STRUCT:
|
|
704
|
+
self.req = TInferenceReq()
|
|
705
|
+
self.req.read(iprot)
|
|
706
|
+
else:
|
|
707
|
+
iprot.skip(ftype)
|
|
708
|
+
else:
|
|
709
|
+
iprot.skip(ftype)
|
|
710
|
+
iprot.readFieldEnd()
|
|
711
|
+
iprot.readStructEnd()
|
|
712
|
+
|
|
713
|
+
def write(self, oprot):
|
|
714
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
715
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
716
|
+
return
|
|
717
|
+
oprot.writeStructBegin('inference_args')
|
|
718
|
+
if self.req is not None:
|
|
719
|
+
oprot.writeFieldBegin('req', TType.STRUCT, -1)
|
|
720
|
+
self.req.write(oprot)
|
|
721
|
+
oprot.writeFieldEnd()
|
|
722
|
+
oprot.writeFieldStop()
|
|
723
|
+
oprot.writeStructEnd()
|
|
724
|
+
|
|
725
|
+
def validate(self):
|
|
726
|
+
return
|
|
727
|
+
|
|
728
|
+
def __repr__(self):
|
|
729
|
+
L = ['%s=%r' % (key, value)
|
|
730
|
+
for key, value in self.__dict__.items()]
|
|
731
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
732
|
+
|
|
733
|
+
def __eq__(self, other):
|
|
734
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
735
|
+
|
|
736
|
+
def __ne__(self, other):
|
|
737
|
+
return not (self == other)
|
|
738
|
+
all_structs.append(inference_args)
|
|
739
|
+
inference_args.thrift_spec = ()
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
class inference_result(object):
|
|
743
|
+
"""
|
|
744
|
+
Attributes:
|
|
745
|
+
- success
|
|
746
|
+
|
|
747
|
+
"""
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
def __init__(self, success=None,):
|
|
751
|
+
self.success = success
|
|
752
|
+
|
|
753
|
+
def read(self, iprot):
|
|
754
|
+
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
755
|
+
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
756
|
+
return
|
|
757
|
+
iprot.readStructBegin()
|
|
758
|
+
while True:
|
|
759
|
+
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
760
|
+
if ftype == TType.STOP:
|
|
761
|
+
break
|
|
762
|
+
if fid == 0:
|
|
763
|
+
if ftype == TType.STRUCT:
|
|
764
|
+
self.success = TInferenceResp()
|
|
765
|
+
self.success.read(iprot)
|
|
766
|
+
else:
|
|
767
|
+
iprot.skip(ftype)
|
|
768
|
+
else:
|
|
769
|
+
iprot.skip(ftype)
|
|
770
|
+
iprot.readFieldEnd()
|
|
771
|
+
iprot.readStructEnd()
|
|
772
|
+
|
|
773
|
+
def write(self, oprot):
|
|
774
|
+
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
775
|
+
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
776
|
+
return
|
|
777
|
+
oprot.writeStructBegin('inference_result')
|
|
778
|
+
if self.success is not None:
|
|
779
|
+
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
780
|
+
self.success.write(oprot)
|
|
781
|
+
oprot.writeFieldEnd()
|
|
782
|
+
oprot.writeFieldStop()
|
|
783
|
+
oprot.writeStructEnd()
|
|
784
|
+
|
|
785
|
+
def validate(self):
|
|
786
|
+
return
|
|
787
|
+
|
|
788
|
+
def __repr__(self):
|
|
789
|
+
L = ['%s=%r' % (key, value)
|
|
790
|
+
for key, value in self.__dict__.items()]
|
|
791
|
+
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
792
|
+
|
|
793
|
+
def __eq__(self, other):
|
|
794
|
+
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
795
|
+
|
|
796
|
+
def __ne__(self, other):
|
|
797
|
+
return not (self == other)
|
|
798
|
+
all_structs.append(inference_result)
|
|
799
|
+
inference_result.thrift_spec = (
|
|
800
|
+
(0, TType.STRUCT, 'success', [TInferenceResp, None], None, ), # 0
|
|
801
|
+
)
|
|
802
|
+
fix_spec(all_structs)
|
|
803
|
+
del all_structs
|