Skip to content

Commit c1dc4fd

Browse files
committed
Correct binary column memory calculation (#14796)
* use getSizeInBytes instead of getRetainedSizeInBytes in some places * change tsfile version (cherry picked from commit a49958c)
1 parent 260d982 commit c1dc4fd

31 files changed

Lines changed: 85480 additions & 17 deletions
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Generated by Git-Commit-Id-Plugin
2+
git.commit.id.abbrev=a8f1e40
3+
git.dirty=true
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
19+
artifactId=iotdb-ainode
20+
groupId=org.apache.iotdb
21+
version=2.0.4-SNAPSHOT

iotdb-core/ainode/ainode/thrift/__init__.py

Whitespace-only changes.
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
#!/usr/bin/env python
2+
#
3+
# Autogenerated by Thrift Compiler (0.14.1)
4+
#
5+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6+
#
7+
# options string: py
8+
#
9+
10+
import sys
11+
import pprint
12+
if sys.version_info[0] > 2:
13+
from urllib.parse import urlparse
14+
else:
15+
from urlparse import urlparse
16+
from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
17+
from thrift.protocol.TBinaryProtocol import TBinaryProtocol
18+
19+
from iotdb.thrift.ainode import IAINodeRPCService
20+
from iotdb.thrift.ainode.ttypes import *
21+
22+
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
23+
print('')
24+
print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
25+
print('')
26+
print('Functions:')
27+
print(' TSStatus deleteModel(TDeleteModelReq req)')
28+
print(' TRegisterModelResp registerModel(TRegisterModelReq req)')
29+
print(' TAIHeartbeatResp getAIHeartbeat(TAIHeartbeatReq req)')
30+
print(' TSStatus createTrainingTask(TTrainingReq req)')
31+
print(' TInferenceResp inference(TInferenceReq req)')
32+
print(' TForecastResp forecast(TForecastReq req)')
33+
print('')
34+
sys.exit(0)
35+
36+
pp = pprint.PrettyPrinter(indent=2)
37+
host = 'localhost'
38+
port = 9090
39+
uri = ''
40+
framed = False
41+
ssl = False
42+
validate = True
43+
ca_certs = None
44+
keyfile = None
45+
certfile = None
46+
http = False
47+
argi = 1
48+
49+
if sys.argv[argi] == '-h':
50+
parts = sys.argv[argi + 1].split(':')
51+
host = parts[0]
52+
if len(parts) > 1:
53+
port = int(parts[1])
54+
argi += 2
55+
56+
if sys.argv[argi] == '-u':
57+
url = urlparse(sys.argv[argi + 1])
58+
parts = url[1].split(':')
59+
host = parts[0]
60+
if len(parts) > 1:
61+
port = int(parts[1])
62+
else:
63+
port = 80
64+
uri = url[2]
65+
if url[4]:
66+
uri += '?%s' % url[4]
67+
http = True
68+
argi += 2
69+
70+
if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
71+
framed = True
72+
argi += 1
73+
74+
if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl':
75+
ssl = True
76+
argi += 1
77+
78+
if sys.argv[argi] == '-novalidate':
79+
validate = False
80+
argi += 1
81+
82+
if sys.argv[argi] == '-ca_certs':
83+
ca_certs = sys.argv[argi+1]
84+
argi += 2
85+
86+
if sys.argv[argi] == '-keyfile':
87+
keyfile = sys.argv[argi+1]
88+
argi += 2
89+
90+
if sys.argv[argi] == '-certfile':
91+
certfile = sys.argv[argi+1]
92+
argi += 2
93+
94+
cmd = sys.argv[argi]
95+
args = sys.argv[argi + 1:]
96+
97+
if http:
98+
transport = THttpClient.THttpClient(host, port, uri)
99+
else:
100+
if ssl:
101+
socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile)
102+
else:
103+
socket = TSocket.TSocket(host, port)
104+
if framed:
105+
transport = TTransport.TFramedTransport(socket)
106+
else:
107+
transport = TTransport.TBufferedTransport(socket)
108+
protocol = TBinaryProtocol(transport)
109+
client = IAINodeRPCService.Client(protocol)
110+
transport.open()
111+
112+
if cmd == 'deleteModel':
113+
if len(args) != 1:
114+
print('deleteModel requires 1 args')
115+
sys.exit(1)
116+
pp.pprint(client.deleteModel(eval(args[0]),))
117+
118+
elif cmd == 'registerModel':
119+
if len(args) != 1:
120+
print('registerModel requires 1 args')
121+
sys.exit(1)
122+
pp.pprint(client.registerModel(eval(args[0]),))
123+
124+
elif cmd == 'getAIHeartbeat':
125+
if len(args) != 1:
126+
print('getAIHeartbeat requires 1 args')
127+
sys.exit(1)
128+
pp.pprint(client.getAIHeartbeat(eval(args[0]),))
129+
130+
elif cmd == 'createTrainingTask':
131+
if len(args) != 1:
132+
print('createTrainingTask requires 1 args')
133+
sys.exit(1)
134+
pp.pprint(client.createTrainingTask(eval(args[0]),))
135+
136+
elif cmd == 'inference':
137+
if len(args) != 1:
138+
print('inference requires 1 args')
139+
sys.exit(1)
140+
pp.pprint(client.inference(eval(args[0]),))
141+
142+
elif cmd == 'forecast':
143+
if len(args) != 1:
144+
print('forecast requires 1 args')
145+
sys.exit(1)
146+
pp.pprint(client.forecast(eval(args[0]),))
147+
148+
else:
149+
print('Unrecognized method %s' % cmd)
150+
sys.exit(1)
151+
152+
transport.close()

0 commit comments

Comments
 (0)