iginx-pyclient 0.7.1__tar.gz → 0.8.0__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.
- {iginx-pyclient-0.7.1/iginx_pyclient.egg-info → iginx-pyclient-0.8.0}/PKG-INFO +1 -1
- iginx-pyclient-0.8.0/iginx_pyclient/__init__.py +20 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient/cluster_info.py +10 -8
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient/dataset.py +10 -8
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient/session.py +28 -13
- iginx-pyclient-0.8.0/iginx_pyclient/thrift/__init__.py +20 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient/thrift/rpc/IService.py +415 -35
- iginx-pyclient-0.8.0/iginx_pyclient/thrift/rpc/__init__.py +21 -0
- iginx-pyclient-0.8.0/iginx_pyclient/thrift/rpc/constants.py +34 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient/thrift/rpc/ttypes.py +1551 -740
- iginx-pyclient-0.8.0/iginx_pyclient/time_series.py +39 -0
- iginx-pyclient-0.8.0/iginx_pyclient/utils/__init__.py +21 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient/utils/bitmap.py +10 -8
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient/utils/byte_utils.py +10 -8
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0/iginx_pyclient.egg-info}/PKG-INFO +1 -1
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/setup.py +11 -9
- iginx-pyclient-0.7.1/iginx_pyclient/__init__.py +0 -19
- iginx-pyclient-0.7.1/iginx_pyclient/thrift/__init__.py +0 -18
- iginx-pyclient-0.7.1/iginx_pyclient/thrift/rpc/__init__.py +0 -19
- iginx-pyclient-0.7.1/iginx_pyclient/thrift/rpc/constants.py +0 -32
- iginx-pyclient-0.7.1/iginx_pyclient/time_series.py +0 -37
- iginx-pyclient-0.7.1/iginx_pyclient/utils/__init__.py +0 -19
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/LICENSE +0 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/MANIFEST.in +0 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/README.md +0 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient.egg-info/SOURCES.txt +0 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient.egg-info/dependency_links.txt +0 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient.egg-info/requires.txt +0 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/iginx_pyclient.egg-info/top_level.txt +0 -0
- {iginx-pyclient-0.7.1 → iginx-pyclient-0.8.0}/setup.cfg +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#
|
|
2
|
+
# IGinX - the polystore system with high performance
|
|
3
|
+
# Copyright (C) Tsinghua University
|
|
4
|
+
# TSIGinX@gmail.com
|
|
5
|
+
#
|
|
6
|
+
# This program is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the GNU Lesser General Public
|
|
8
|
+
# License as published by the Free Software Foundation; either
|
|
9
|
+
# version 3 of the License, or (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# This program is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14
|
+
# Lesser General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
# along with this program; if not, write to the Free Software Foundation,
|
|
18
|
+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
19
|
+
#
|
|
20
|
+
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
#
|
|
2
2
|
# IGinX - the polystore system with high performance
|
|
3
3
|
# Copyright (C) Tsinghua University
|
|
4
|
+
# TSIGinX@gmail.com
|
|
4
5
|
#
|
|
5
|
-
# This program is free software
|
|
6
|
-
# it under the terms of the GNU General Public
|
|
7
|
-
# the Free Software Foundation
|
|
8
|
-
# (at your option) any later version.
|
|
6
|
+
# This program is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the GNU Lesser General Public
|
|
8
|
+
# License as published by the Free Software Foundation; either
|
|
9
|
+
# version 3 of the License, or (at your option) any later version.
|
|
9
10
|
#
|
|
10
11
|
# This program is distributed in the hope that it will be useful,
|
|
11
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
#
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14
|
+
# Lesser General Public License for more details.
|
|
14
15
|
#
|
|
15
|
-
# You should have received a copy of the GNU General Public License
|
|
16
|
-
# along with this program
|
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
# along with this program; if not, write to the Free Software Foundation,
|
|
18
|
+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
17
19
|
#
|
|
18
20
|
|
|
19
21
|
from .thrift.rpc.ttypes import StorageEngineType
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
#
|
|
2
2
|
# IGinX - the polystore system with high performance
|
|
3
3
|
# Copyright (C) Tsinghua University
|
|
4
|
+
# TSIGinX@gmail.com
|
|
4
5
|
#
|
|
5
|
-
# This program is free software
|
|
6
|
-
# it under the terms of the GNU General Public
|
|
7
|
-
# the Free Software Foundation
|
|
8
|
-
# (at your option) any later version.
|
|
6
|
+
# This program is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the GNU Lesser General Public
|
|
8
|
+
# License as published by the Free Software Foundation; either
|
|
9
|
+
# version 3 of the License, or (at your option) any later version.
|
|
9
10
|
#
|
|
10
11
|
# This program is distributed in the hope that it will be useful,
|
|
11
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
#
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14
|
+
# Lesser General Public License for more details.
|
|
14
15
|
#
|
|
15
|
-
# You should have received a copy of the GNU General Public License
|
|
16
|
-
# along with this program
|
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
# along with this program; if not, write to the Free Software Foundation,
|
|
18
|
+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
17
19
|
#
|
|
18
20
|
|
|
19
21
|
from enum import Enum
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
#
|
|
2
2
|
# IGinX - the polystore system with high performance
|
|
3
3
|
# Copyright (C) Tsinghua University
|
|
4
|
+
# TSIGinX@gmail.com
|
|
4
5
|
#
|
|
5
|
-
# This program is free software
|
|
6
|
-
# it under the terms of the GNU General Public
|
|
7
|
-
# the Free Software Foundation
|
|
8
|
-
# (at your option) any later version.
|
|
6
|
+
# This program is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the GNU Lesser General Public
|
|
8
|
+
# License as published by the Free Software Foundation; either
|
|
9
|
+
# version 3 of the License, or (at your option) any later version.
|
|
9
10
|
#
|
|
10
11
|
# This program is distributed in the hope that it will be useful,
|
|
11
12
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
#
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14
|
+
# Lesser General Public License for more details.
|
|
14
15
|
#
|
|
15
|
-
# You should have received a copy of the GNU General Public License
|
|
16
|
-
# along with this program
|
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
# along with this program; if not, write to the Free Software Foundation,
|
|
18
|
+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
17
19
|
#
|
|
18
20
|
|
|
19
21
|
import csv
|
|
20
22
|
import logging
|
|
21
23
|
import os.path
|
|
24
|
+
import time
|
|
22
25
|
from datetime import datetime
|
|
23
26
|
|
|
24
27
|
import pandas as pd
|
|
@@ -56,7 +59,7 @@ from .thrift.rpc.ttypes import (
|
|
|
56
59
|
DebugInfoReq,
|
|
57
60
|
LoadCSVReq,
|
|
58
61
|
|
|
59
|
-
StorageEngine, DataType,
|
|
62
|
+
StorageEngine, DataType, FileChunk, UploadFileReq,
|
|
60
63
|
)
|
|
61
64
|
from .time_series import TimeSeries
|
|
62
65
|
from .utils.bitmap import Bitmap
|
|
@@ -527,11 +530,23 @@ class Session(object):
|
|
|
527
530
|
if not path.endswith(".csv"):
|
|
528
531
|
raise ValueError(f"The file name must end with [.csv], {path} doesn't satisfy the requirement!")
|
|
529
532
|
|
|
533
|
+
chunk_size = 1024 * 1024
|
|
534
|
+
filename = str(time.time() * 1000) + ".csv"
|
|
530
535
|
with open(file, 'rb') as f:
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
536
|
+
offset = 0
|
|
537
|
+
while chunk := f.read(chunk_size):
|
|
538
|
+
chunk_data = FileChunk(
|
|
539
|
+
fileName=filename,
|
|
540
|
+
offset=offset,
|
|
541
|
+
data=chunk,
|
|
542
|
+
chunkSize=len(chunk)
|
|
543
|
+
)
|
|
544
|
+
req = UploadFileReq(sessionId=self.__session_id, fileChunk=chunk_data)
|
|
545
|
+
resp = self.__client.uploadFileChunk(req)
|
|
546
|
+
Session.verify_status(resp.status)
|
|
547
|
+
offset += len(chunk)
|
|
548
|
+
|
|
549
|
+
req = LoadCSVReq(sessionId=self.__session_id, statement=statement, csvFileName=filename)
|
|
535
550
|
resp = self.__client.loadCSV(req)
|
|
536
551
|
Session.verify_status(resp.status)
|
|
537
552
|
return resp
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#
|
|
2
|
+
# IGinX - the polystore system with high performance
|
|
3
|
+
# Copyright (C) Tsinghua University
|
|
4
|
+
# TSIGinX@gmail.com
|
|
5
|
+
#
|
|
6
|
+
# This program is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the GNU Lesser General Public
|
|
8
|
+
# License as published by the Free Software Foundation; either
|
|
9
|
+
# version 3 of the License, or (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# This program is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14
|
+
# Lesser General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
# along with this program; if not, write to the Free Software Foundation,
|
|
18
|
+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
19
|
+
#
|
|
20
|
+
|