diff --git a/.github/workflows/deploy_release.yaml b/.github/workflows/deploy_release.yaml index 48595fbd..ec42d1ed 100644 --- a/.github/workflows/deploy_release.yaml +++ b/.github/workflows/deploy_release.yaml @@ -18,25 +18,18 @@ jobs: pip3 install setuptools wheel twine pip install . pip install -r requirements/dev.txt - - name: Test with pytest - run: | - docker-compose up -d - sleep 45 - pytest -s -v -k "not TestSSLConnection and not TestSSLConnectionSelfSigned" - docker-compose down -v - working-directory: tests - - name: Test SSL connection with pytest - run: | - enable_ssl=true docker-compose up -d - sleep 45 - pytest -s -v test_ssl_connection.py::TestSSLConnection - working-directory: tests - - name: Test self-signed SSL connection with pytest - run: | - enable_ssl=true docker-compose up -d - sleep 45 - pytest -s -v test_ssl_connection.py::TestSSLConnectionSelfSigned - working-directory: tests + - name: Test with pytest + run: | + docker-compose -f docker-compose.yaml up -d + sleep 45 + pytest -s -v -k "not SSL" + working-directory: tests + - name: Test SSL connection with pytest + run: | + enable_ssl=true docker-compose -f docker-compose-ssl.yaml up -d + sleep 45 + pytest -s -v -k "SSL" + working-directory: tests - name: Build and publish env: diff --git a/CHANGELOG.md b/CHANGELOG.md index a7a11c8e..975f7c46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ Compatible with the v2.5.0 version of nebula-graph - fix get offline host info from list_hosts https://github.com/vesoft-inc/nebula-python/pull/104 - fix fbthrift timeout bug https://github.com/vesoft-inc/nebula-python/pull/126 - incompatible - - the ErrorCode define is changed, all ErrorCode is defined in nebula2.common.ttypes.ErrorCode + - the ErrorCode define is changed, all ErrorCode is defined in nebula3.common.ttypes.ErrorCode ## v2.0.0(2021-03-23) Compatible with the v2.0.0 version of nebula-graph diff --git a/Makefile b/Makefile index 423fd28b..a079dc01 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ LINUX_BLACK = ~/.local/bin/black MAC_BLACK = black -FMT_EXCLUDE = --extend-exclude nebula2/common/\|nebula2/storage/\|nebula2/graph/\|nebula2/meta\|nebula2/common\|nebula2/fbthrift/ +FMT_EXCLUDE = --extend-exclude nebula3/common/\|nebula3/storage/\|nebula3/graph/\|nebula3/meta\|nebula3/common\|nebula3/fbthrift/ fmt: pip install --user black diff --git a/README.md b/README.md index 59460092..dfcd8fa8 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ # nebula-python -This directory holds the Python API for Nebula Graph. It is used to connect with Nebula Graph 2.0. +This directory holds the Python API for Nebula Graph. It is used to connect with Nebula Graph 3.0. ## Before you start -Before you start, please read this section to choose the right branch for you. In branch v1.0, the API works only for Nebula Graph 1.0. In the master branch, the API works only for Nebula Graph 2.0. +Before you start, please read this section to choose the right branch for you. In branch v1.0, the API works only for Nebula Graph 1.0. In the master branch, the API works only for Nebula Graph 3.0. ## The directory structure ```text |--nebula-python | - |-- nebula2 // client code + |-- nebula3 // client code | |-- fbthrift // the fbthrift lib code | |-- common | |-- data @@ -31,16 +31,16 @@ Before you start, please read this section to choose the right branch for you. I | |-- setup.py // used to install or package | - |__ README.md // the introduction of nebula2-python + |__ README.md // the introduction of nebula3-python ``` -## How to get nebula2-python +## How to get nebula3-python ### Option one: install with pip ```python -pip install nebula2-python==$version +pip install nebula3-python==$version ``` ### Option two: install from the source code @@ -61,8 +61,8 @@ pip install . ## Quick example to use graph-client to connect graphd ```python -from nebula2.gclient.net import ConnectionPool -from nebula2.Config import Config +from nebula3.gclient.net import ConnectionPool +from nebula3.Config import Config # define a config config = Config() @@ -101,8 +101,8 @@ connection_pool.close() You should make sure the scan client can connect to the address of storage which see from `SHOW HOSTS` ```python -from nebula2.mclient import MetaCache, HostAddr -from nebula2.sclient.GraphStorageClient import GraphStorageClient +from nebula3.mclient import MetaCache, HostAddr +from nebula3.sclient.GraphStorageClient import GraphStorageClient # the metad servers's address meta_cache = MetaCache([('172.28.1.1', 9559), @@ -138,13 +138,14 @@ while resp.has_next(): ## How to choose nebula-python -| Nebula2-Python Version | NebulaGraph Version | +| Nebula3-Python Version | NebulaGraph Version | |---|---| | 2.0.0b1 | 2.0.0beta | | 2.0.0rc1 | 2.0.0-rc1 | | 2.0.0 | 2.0.0/2.0.1 | | 2.5.0 | 2.5.0 | | 2.6.0 | 2.6.0/2.6.1 | +| 3.0.0 | 3.0.0 | ## How to contribute to nebula-python diff --git a/example/GraphClientMultiThreadExample.py b/example/GraphClientMultiThreadExample.py index 173f0fe5..c3c8d8d0 100644 --- a/example/GraphClientMultiThreadExample.py +++ b/example/GraphClientMultiThreadExample.py @@ -14,8 +14,8 @@ sys.path.insert(0, '../') -from nebula2.gclient.net import ConnectionPool -from nebula2.Config import Config +from nebula3.gclient.net import ConnectionPool +from nebula3.Config import Config from FormatResp import print_resp diff --git a/example/GraphClientSimpleExample.py b/example/GraphClientSimpleExample.py index 7c931aa3..34a9f70b 100644 --- a/example/GraphClientSimpleExample.py +++ b/example/GraphClientSimpleExample.py @@ -9,10 +9,10 @@ import time import json -from nebula2.gclient.net import ConnectionPool +from nebula3.gclient.net import ConnectionPool -from nebula2.Config import Config -from nebula2.common import * +from nebula3.Config import Config +from nebula3.common import * from FormatResp import print_resp if __name__ == '__main__': @@ -64,6 +64,8 @@ resp = client.execute('DROP SPACE test') assert resp.is_succeeded(), resp.error_msg() + print("Example finished") + except Exception as x: import traceback diff --git a/example/ScanVertexEdgeExample.py b/example/ScanVertexEdgeExample.py index 080e1729..d68302ec 100644 --- a/example/ScanVertexEdgeExample.py +++ b/example/ScanVertexEdgeExample.py @@ -12,10 +12,10 @@ sys.path.insert(0, '../') -from nebula2.Config import Config -from nebula2.gclient.net import ConnectionPool -from nebula2.mclient import MetaCache -from nebula2.sclient.GraphStorageClient import GraphStorageClient +from nebula3.Config import Config +from nebula3.gclient.net import ConnectionPool +from nebula3.mclient import MetaCache +from nebula3.sclient.GraphStorageClient import GraphStorageClient def prepare_data(): diff --git a/nebula2/gclient/net/__init__.py b/nebula2/gclient/net/__init__.py deleted file mode 100644 index 2dd7bb2f..00000000 --- a/nebula2/gclient/net/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -# --coding:utf-8-- - -# Copyright (c) 2020 vesoft inc. All rights reserved. -# -# This source code is licensed under Apache 2.0 License. - - -from nebula2.common.ttypes import ErrorCode -from nebula2.Exception import ( - AuthFailedException, - IOErrorException, - NotValidConnectionException, - InValidHostname, -) - -from nebula2.data.ResultSet import ResultSet - -from nebula2.gclient.net.AuthResult import AuthResult -from nebula2.gclient.net.Session import Session -from nebula2.gclient.net.Connection import Connection -from nebula2.gclient.net.ConnectionPool import ConnectionPool diff --git a/nebula2/Config.py b/nebula3/Config.py similarity index 100% rename from nebula2/Config.py rename to nebula3/Config.py diff --git a/nebula2/Exception.py b/nebula3/Exception.py similarity index 100% rename from nebula2/Exception.py rename to nebula3/Exception.py diff --git a/nebula2/__init__.py b/nebula3/__init__.py similarity index 84% rename from nebula2/__init__.py rename to nebula3/__init__.py index 957526b6..ca6128aa 100644 --- a/nebula2/__init__.py +++ b/nebula3/__init__.py @@ -6,6 +6,6 @@ # This source code is licensed under Apache 2.0 License. -from nebula2.common.ttypes import Value +from nebula3.common.ttypes import Value Value.__hash__ = lambda self: self.value.__hash__() diff --git a/nebula2/common/__init__.py b/nebula3/common/__init__.py similarity index 100% rename from nebula2/common/__init__.py rename to nebula3/common/__init__.py diff --git a/nebula2/common/constants.py b/nebula3/common/constants.py similarity index 78% rename from nebula2/common/constants.py rename to nebula3/common/constants.py index 80b6f3c0..3212a5b8 100644 --- a/nebula2/common/constants.py +++ b/nebula3/common/constants.py @@ -7,13 +7,13 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException from .ttypes import UTF8STRINGS, NullType, PropertyType, ErrorCode, SchemaID, Date, Time, DateTime, Value, NList, NMap, NSet, Row, DataSet, Coordinate, Point, LineString, Polygon, Geography, Tag, Vertex, Edge, Step, Path, HostAddr, KeyValue, Duration, LogInfo, DirInfo, CheckpointInfo, LogEntry, ClusterID, GraphSpaceID, PartitionID, TagID, EdgeType, EdgeRanking, LogID, TermID, Timestamp, IndexID, Port, SessionID, ExecutionPlanID -version = "2.6.0" +version = "3.0.0" diff --git a/nebula2/common/ttypes.py b/nebula3/common/ttypes.py similarity index 99% rename from nebula2/common/ttypes.py rename to nebula3/common/ttypes.py index 41582dc3..761ae9bb 100644 --- a/nebula2/common/ttypes.py +++ b/nebula3/common/ttypes.py @@ -7,22 +7,22 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException import pprint import warnings -from nebula2.fbthrift import Thrift -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.fbthrift.protocol import TCompactProtocol -from nebula2.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift import Thrift +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.protocol import TCompactProtocol +from nebula3.fbthrift.protocol import THeaderProtocol fastproto = None try: - from nebula2.fbthrift.protocol import fastproto + from nebula3.fbthrift.protocol import fastproto except ImportError: pass all_structs = [] diff --git a/nebula2/data/DataObject.py b/nebula3/data/DataObject.py similarity index 99% rename from nebula2/data/DataObject.py rename to nebula3/data/DataObject.py index a46047d3..0139e127 100644 --- a/nebula2/data/DataObject.py +++ b/nebula3/data/DataObject.py @@ -8,13 +8,13 @@ import pytz from datetime import datetime, timezone, timedelta -from nebula2.Exception import ( +from nebula3.Exception import ( InvalidValueTypeException, InvalidKeyException, OutOfRangeException, ) -from nebula2.common.ttypes import ( +from nebula3.common.ttypes import ( Geography, Value, Vertex, diff --git a/nebula2/data/ResultSet.py b/nebula3/data/ResultSet.py similarity index 97% rename from nebula2/data/ResultSet.py rename to nebula3/data/ResultSet.py index 0b5ed3ba..b9a5954b 100644 --- a/nebula2/data/ResultSet.py +++ b/nebula3/data/ResultSet.py @@ -6,9 +6,9 @@ # This source code is licensed under Apache 2.0 License. -from nebula2.common.ttypes import ErrorCode +from nebula3.common.ttypes import ErrorCode -from nebula2.data.DataObject import DataSetWrapper +from nebula3.data.DataObject import DataSetWrapper class ResultSet(object): @@ -47,7 +47,7 @@ def is_succeeded(self): def error_code(self): """if the response is failed, the service return the error code - :return: nebula2.common.ttypes.ErrorCode + :return: nebula3.common.ttypes.ErrorCode """ return self._resp.error_code diff --git a/nebula2/data/__init__.py b/nebula3/data/__init__.py similarity index 100% rename from nebula2/data/__init__.py rename to nebula3/data/__init__.py diff --git a/nebula2/fbthrift/TMultiplexedProcessor.py b/nebula3/fbthrift/TMultiplexedProcessor.py similarity index 96% rename from nebula2/fbthrift/TMultiplexedProcessor.py rename to nebula3/fbthrift/TMultiplexedProcessor.py index af7eec5f..5f61316c 100644 --- a/nebula2/fbthrift/TMultiplexedProcessor.py +++ b/nebula3/fbthrift/TMultiplexedProcessor.py @@ -21,8 +21,8 @@ import sys -from nebula2.fbthrift.Thrift import TProcessor, TMessageType, TException -from nebula2.fbthrift.protocol import TProtocolDecorator, TMultiplexedProtocol +from nebula3.fbthrift.Thrift import TProcessor, TMessageType, TException +from nebula3.fbthrift.protocol import TProtocolDecorator, TMultiplexedProtocol class TMultiplexedProcessor(TProcessor): def __init__(self): diff --git a/nebula2/fbthrift/TSCons.py b/nebula3/fbthrift/TSCons.py similarity index 100% rename from nebula2/fbthrift/TSCons.py rename to nebula3/fbthrift/TSCons.py diff --git a/nebula2/fbthrift/Thrift.py b/nebula3/fbthrift/Thrift.py similarity index 100% rename from nebula2/fbthrift/Thrift.py rename to nebula3/fbthrift/Thrift.py diff --git a/nebula2/fbthrift/__init__.py b/nebula3/fbthrift/__init__.py similarity index 100% rename from nebula2/fbthrift/__init__.py rename to nebula3/fbthrift/__init__.py diff --git a/nebula2/fbthrift/protocol/TBinaryProtocol.py b/nebula3/fbthrift/protocol/TBinaryProtocol.py similarity index 99% rename from nebula2/fbthrift/protocol/TBinaryProtocol.py rename to nebula3/fbthrift/protocol/TBinaryProtocol.py index 00505827..22e9a7f2 100644 --- a/nebula2/fbthrift/protocol/TBinaryProtocol.py +++ b/nebula3/fbthrift/protocol/TBinaryProtocol.py @@ -19,7 +19,7 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.protocol.TProtocol import * +from nebula3.fbthrift.protocol.TProtocol import * from struct import pack, unpack class TBinaryProtocol(TProtocolBase): diff --git a/nebula2/fbthrift/protocol/TCompactProtocol.py b/nebula3/fbthrift/protocol/TCompactProtocol.py similarity index 99% rename from nebula2/fbthrift/protocol/TCompactProtocol.py rename to nebula3/fbthrift/protocol/TCompactProtocol.py index 1ff4a56e..e201d6be 100644 --- a/nebula2/fbthrift/protocol/TCompactProtocol.py +++ b/nebula3/fbthrift/protocol/TCompactProtocol.py @@ -20,7 +20,7 @@ from __future__ import unicode_literals import sys -from nebula2.fbthrift.protocol.TProtocol import * +from nebula3.fbthrift.protocol.TProtocol import * from struct import pack, unpack __all__ = [ diff --git a/nebula2/fbthrift/protocol/THeaderProtocol.py b/nebula3/fbthrift/protocol/THeaderProtocol.py similarity index 95% rename from nebula2/fbthrift/protocol/THeaderProtocol.py rename to nebula3/fbthrift/protocol/THeaderProtocol.py index ab32a6aa..84fba97e 100644 --- a/nebula2/fbthrift/protocol/THeaderProtocol.py +++ b/nebula3/fbthrift/protocol/THeaderProtocol.py @@ -19,11 +19,11 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.protocol.TProtocol import TProtocolBase, TProtocolException -from nebula2.fbthrift.Thrift import TApplicationException, TMessageType -from nebula2.fbthrift.protocol.TBinaryProtocol import TBinaryProtocolAccelerated -from nebula2.fbthrift.protocol.TCompactProtocol import TCompactProtocolAccelerated -from nebula2.fbthrift.transport.THeaderTransport import THeaderTransport, CLIENT_TYPE +from nebula3.fbthrift.protocol.TProtocol import TProtocolBase, TProtocolException +from nebula3.fbthrift.Thrift import TApplicationException, TMessageType +from nebula3.fbthrift.protocol.TBinaryProtocol import TBinaryProtocolAccelerated +from nebula3.fbthrift.protocol.TCompactProtocol import TCompactProtocolAccelerated +from nebula3.fbthrift.transport.THeaderTransport import THeaderTransport, CLIENT_TYPE class THeaderProtocolAccelerate(object): diff --git a/nebula2/fbthrift/protocol/TJSONProtocol.py b/nebula3/fbthrift/protocol/TJSONProtocol.py similarity index 99% rename from nebula2/fbthrift/protocol/TJSONProtocol.py rename to nebula3/fbthrift/protocol/TJSONProtocol.py index 5e479e92..2a41d0dc 100644 --- a/nebula2/fbthrift/protocol/TJSONProtocol.py +++ b/nebula3/fbthrift/protocol/TJSONProtocol.py @@ -19,8 +19,8 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.protocol.TProtocol import TProtocolBase, TProtocolException -from nebula2.fbthrift.Thrift import TType +from nebula3.fbthrift.protocol.TProtocol import TProtocolBase, TProtocolException +from nebula3.fbthrift.Thrift import TType import json, base64, sys __all__ = ['TJSONProtocol', 'TJSONProtocolFactory'] diff --git a/nebula2/fbthrift/protocol/TMultiplexedProtocol.py b/nebula3/fbthrift/protocol/TMultiplexedProtocol.py similarity index 92% rename from nebula2/fbthrift/protocol/TMultiplexedProtocol.py rename to nebula3/fbthrift/protocol/TMultiplexedProtocol.py index f084a3bd..501337a7 100644 --- a/nebula2/fbthrift/protocol/TMultiplexedProtocol.py +++ b/nebula3/fbthrift/protocol/TMultiplexedProtocol.py @@ -19,8 +19,8 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.Thrift import TMessageType -from nebula2.fbthrift.protocol import TProtocolDecorator +from nebula3.fbthrift.Thrift import TMessageType +from nebula3.fbthrift.protocol import TProtocolDecorator SEPARATOR = ":" diff --git a/nebula2/fbthrift/protocol/TProtocol.py b/nebula3/fbthrift/protocol/TProtocol.py similarity index 99% rename from nebula2/fbthrift/protocol/TProtocol.py rename to nebula3/fbthrift/protocol/TProtocol.py index b889b1a5..0039f2ff 100644 --- a/nebula2/fbthrift/protocol/TProtocol.py +++ b/nebula3/fbthrift/protocol/TProtocol.py @@ -19,7 +19,7 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.Thrift import * +from nebula3.fbthrift.Thrift import * class TProtocolException(TException): diff --git a/nebula2/fbthrift/protocol/TProtocolDecorator.py b/nebula3/fbthrift/protocol/TProtocolDecorator.py similarity index 96% rename from nebula2/fbthrift/protocol/TProtocolDecorator.py rename to nebula3/fbthrift/protocol/TProtocolDecorator.py index 6cca18cf..29292682 100644 --- a/nebula2/fbthrift/protocol/TProtocolDecorator.py +++ b/nebula3/fbthrift/protocol/TProtocolDecorator.py @@ -19,7 +19,7 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.protocol.TProtocol import TProtocolBase +from nebula3.fbthrift.protocol.TProtocol import TProtocolBase from types import * class TProtocolDecorator(): diff --git a/nebula2/fbthrift/protocol/TSimpleJSONProtocol.py b/nebula3/fbthrift/protocol/TSimpleJSONProtocol.py similarity index 99% rename from nebula2/fbthrift/protocol/TSimpleJSONProtocol.py rename to nebula3/fbthrift/protocol/TSimpleJSONProtocol.py index 8ea0335e..79d0433c 100644 --- a/nebula2/fbthrift/protocol/TSimpleJSONProtocol.py +++ b/nebula3/fbthrift/protocol/TSimpleJSONProtocol.py @@ -23,8 +23,8 @@ import json import sys -from nebula2.fbthrift.protocol.TProtocol import TProtocolBase, TProtocolException -from nebula2.fbthrift.Thrift import TType +from nebula3.fbthrift.protocol.TProtocol import TProtocolBase, TProtocolException +from nebula3.fbthrift.Thrift import TType JSON_OBJECT_START = b'{' JSON_OBJECT_END = b'}' diff --git a/nebula2/fbthrift/protocol/__init__.py b/nebula3/fbthrift/protocol/__init__.py similarity index 100% rename from nebula2/fbthrift/protocol/__init__.py rename to nebula3/fbthrift/protocol/__init__.py diff --git a/nebula2/fbthrift/protocol/exceptions.py b/nebula3/fbthrift/protocol/exceptions.py similarity index 100% rename from nebula2/fbthrift/protocol/exceptions.py rename to nebula3/fbthrift/protocol/exceptions.py diff --git a/nebula2/fbthrift/server/TAsyncioServer.py b/nebula3/fbthrift/server/TAsyncioServer.py similarity index 96% rename from nebula2/fbthrift/server/TAsyncioServer.py rename to nebula3/fbthrift/server/TAsyncioServer.py index f467e1eb..65ae5cc9 100644 --- a/nebula2/fbthrift/server/TAsyncioServer.py +++ b/nebula3/fbthrift/server/TAsyncioServer.py @@ -18,12 +18,12 @@ import logging import traceback -from nebula2.fbthrift.server.TServer import TServerEventHandler -from nebula2.fbthrift.Thrift import ( +from nebula3.fbthrift.server.TServer import TServerEventHandler +from nebula3.fbthrift.Thrift import ( TException, TProcessor, ) -from nebula2.fbthrift.util.async_common import ( +from nebula3.fbthrift.util.async_common import ( AsyncioRpcConnectionContext, FramedProtocol, THeaderProtocol, @@ -69,8 +69,8 @@ async def ThriftAsyncServerFactory( ssl is an instance of ssl.SSLContext. If None (default) or False SSL/TLS is not used. - event_handler must be a subclass of nebula2.fbthrift.server.TServer. If None, - nebula2.fbthrift.server.TServer.TServerEventHandler is used. Specify a custom handler + event_handler must be a subclass of nebula3.fbthrift.server.TServer. If None, + nebula3.fbthrift.server.TServer.TServerEventHandler is used. Specify a custom handler for custom event handling (e.g. handling new connections) protocol_factory is a function that takes a triplet of diff --git a/nebula2/fbthrift/server/TCppServer.py b/nebula3/fbthrift/server/TCppServer.py similarity index 96% rename from nebula2/fbthrift/server/TCppServer.py rename to nebula3/fbthrift/server/TCppServer.py index 5fbdf429..03f5c138 100644 --- a/nebula2/fbthrift/server/TCppServer.py +++ b/nebula3/fbthrift/server/TCppServer.py @@ -21,13 +21,13 @@ import threading import traceback -from nebula2.fbthrift.protocol.THeaderProtocol import THeaderProtocol -from nebula2.fbthrift.server.TServer import TServer, TConnectionContext -from nebula2.fbthrift.Thrift import TPriority -from nebula2.fbthrift.transport.THeaderTransport import THeaderTransport, MAX_BIG_FRAME_SIZE -from nebula2.fbthrift.transport.TTransport import TMemoryBuffer +from nebula3.fbthrift.protocol.THeaderProtocol import THeaderProtocol +from nebula3.fbthrift.server.TServer import TServer, TConnectionContext +from nebula3.fbthrift.Thrift import TPriority +from nebula3.fbthrift.transport.THeaderTransport import THeaderTransport, MAX_BIG_FRAME_SIZE +from nebula3.fbthrift.transport.TTransport import TMemoryBuffer -from nebula2.fbthrift.server.CppServerWrapper import CppServerWrapper, CppContextData, \ +from nebula3.fbthrift.server.CppServerWrapper import CppServerWrapper, CppContextData, \ SSLPolicy, SSLVerifyPeerEnum, SSLVersion, CallbackWrapper, CallTimestamps from concurrent.futures import Future diff --git a/nebula2/fbthrift/server/TServer.py b/nebula3/fbthrift/server/TServer.py similarity index 96% rename from nebula2/fbthrift/server/TServer.py rename to nebula3/fbthrift/server/TServer.py index 1e766519..18ec30d7 100644 --- a/nebula2/fbthrift/server/TServer.py +++ b/nebula3/fbthrift/server/TServer.py @@ -31,10 +31,10 @@ import Queue import warnings -from nebula2.fbthrift.Thrift import TProcessor, TApplicationException -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.fbthrift.protocol.THeaderProtocol import THeaderProtocolFactory +from nebula3.fbthrift.Thrift import TProcessor, TApplicationException +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.protocol.THeaderProtocol import THeaderProtocolFactory class TConnectionContext: def getPeerName(self): diff --git a/nebula2/fbthrift/server/__init__.py b/nebula3/fbthrift/server/__init__.py similarity index 100% rename from nebula2/fbthrift/server/__init__.py rename to nebula3/fbthrift/server/__init__.py diff --git a/nebula2/fbthrift/transport/THeaderTransport.py b/nebula3/fbthrift/transport/THeaderTransport.py similarity index 99% rename from nebula2/fbthrift/transport/THeaderTransport.py rename to nebula3/fbthrift/transport/THeaderTransport.py index b87aa5ea..335dd434 100644 --- a/nebula2/fbthrift/transport/THeaderTransport.py +++ b/nebula3/fbthrift/transport/THeaderTransport.py @@ -35,12 +35,12 @@ from struct import pack, unpack import zlib -from nebula2.fbthrift.Thrift import TApplicationException -from nebula2.fbthrift.protocol.TBinaryProtocol import TBinaryProtocol -from nebula2.fbthrift.transport.TTransport import ( +from nebula3.fbthrift.Thrift import TApplicationException +from nebula3.fbthrift.protocol.TBinaryProtocol import TBinaryProtocol +from nebula3.fbthrift.transport.TTransport import ( TTransportException, TTransportBase, CReadableTransport ) -from nebula2.fbthrift.protocol.TCompactProtocol import ( +from nebula3.fbthrift.protocol.TCompactProtocol import ( getVarint, readVarint, TCompactProtocol ) diff --git a/nebula2/fbthrift/transport/THttpClient.py b/nebula3/fbthrift/transport/THttpClient.py similarity index 99% rename from nebula2/fbthrift/transport/THttpClient.py rename to nebula3/fbthrift/transport/THttpClient.py index 9631999f..bdf5b39c 100644 --- a/nebula2/fbthrift/transport/THttpClient.py +++ b/nebula3/fbthrift/transport/THttpClient.py @@ -19,7 +19,7 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.transport.TTransport import * +from nebula3.fbthrift.transport.TTransport import * import os import socket diff --git a/nebula2/fbthrift/transport/TSSLSocket.py b/nebula3/fbthrift/transport/TSSLSocket.py similarity index 99% rename from nebula2/fbthrift/transport/TSSLSocket.py rename to nebula3/fbthrift/transport/TSSLSocket.py index 42beaa8f..e9bb9b90 100644 --- a/nebula2/fbthrift/transport/TSSLSocket.py +++ b/nebula3/fbthrift/transport/TSSLSocket.py @@ -19,8 +19,8 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.transport.TSocket import * -from nebula2.fbthrift.transport.TTransport import * +from nebula3.fbthrift.transport.TSocket import * +from nebula3.fbthrift.transport.TTransport import * import socket import ssl import traceback diff --git a/nebula2/fbthrift/transport/TSSLSocketOverHttpTunnel.py b/nebula3/fbthrift/transport/TSSLSocketOverHttpTunnel.py similarity index 94% rename from nebula2/fbthrift/transport/TSSLSocketOverHttpTunnel.py rename to nebula3/fbthrift/transport/TSSLSocketOverHttpTunnel.py index d12c650e..acf1f95e 100644 --- a/nebula2/fbthrift/transport/TSSLSocketOverHttpTunnel.py +++ b/nebula3/fbthrift/transport/TSSLSocketOverHttpTunnel.py @@ -20,8 +20,8 @@ import socket import ssl -from nebula2.fbthrift.transport.TSocketOverHttpTunnel import TSocketOverHttpTunnel -from nebula2.fbthrift.transport.TTransport import TTransportException +from nebula3.fbthrift.transport.TSocketOverHttpTunnel import TSocketOverHttpTunnel +from nebula3.fbthrift.transport.TTransport import TTransportException class TSSLSocketOverHttpTunnel(TSocketOverHttpTunnel): def __init__(self, host, port, proxy_host, proxy_port, diff --git a/nebula2/fbthrift/transport/TSocket.py b/nebula3/fbthrift/transport/TSocket.py similarity index 99% rename from nebula2/fbthrift/transport/TSocket.py rename to nebula3/fbthrift/transport/TSocket.py index 22ca998f..3ec3b9c7 100644 --- a/nebula2/fbthrift/transport/TSocket.py +++ b/nebula3/fbthrift/transport/TSocket.py @@ -20,7 +20,7 @@ from __future__ import unicode_literals -from nebula2.fbthrift.transport.TTransport import TTransportBase, TTransportException, \ +from nebula3.fbthrift.transport.TTransport import TTransportBase, TTransportException, \ TServerTransportBase import os import errno diff --git a/nebula2/fbthrift/transport/TSocketOverHttpTunnel.py b/nebula3/fbthrift/transport/TSocketOverHttpTunnel.py similarity index 94% rename from nebula2/fbthrift/transport/TSocketOverHttpTunnel.py rename to nebula3/fbthrift/transport/TSocketOverHttpTunnel.py index 35a124ca..b6746385 100644 --- a/nebula2/fbthrift/transport/TSocketOverHttpTunnel.py +++ b/nebula3/fbthrift/transport/TSocketOverHttpTunnel.py @@ -17,8 +17,8 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.transport.TSocket import TSocket -from nebula2.fbthrift.transport.TTransport import TTransportException +from nebula3.fbthrift.transport.TSocket import TSocket +from nebula3.fbthrift.transport.TTransport import TTransportException import socket diff --git a/nebula2/fbthrift/transport/TSocketTest.py b/nebula3/fbthrift/transport/TSocketTest.py similarity index 98% rename from nebula2/fbthrift/transport/TSocketTest.py rename to nebula3/fbthrift/transport/TSocketTest.py index 89a0d901..c1b4efe8 100644 --- a/nebula2/fbthrift/transport/TSocketTest.py +++ b/nebula3/fbthrift/transport/TSocketTest.py @@ -24,8 +24,8 @@ import time import unittest -import nebula2.fbthrift.transport.TSocket as TSocket -import nebula2.fbthrift.transport.TTransport as TTransport +import nebula3.fbthrift.transport.TSocket as TSocket +import nebula3.fbthrift.transport.TTransport as TTransport class TSocketTest(unittest.TestCase): diff --git a/nebula2/fbthrift/transport/TTransport.py b/nebula3/fbthrift/transport/TTransport.py similarity index 98% rename from nebula2/fbthrift/transport/TTransport.py rename to nebula3/fbthrift/transport/TTransport.py index 8ea15918..897723ad 100644 --- a/nebula2/fbthrift/transport/TTransport.py +++ b/nebula3/fbthrift/transport/TTransport.py @@ -22,13 +22,13 @@ import sys if sys.version_info[0] >= 3: from io import BytesIO - from nebula2.fbthrift.util.BytesStrIO import BytesStrIO + from nebula3.fbthrift.util.BytesStrIO import BytesStrIO StringIO = BytesStrIO else: from cStringIO import StringIO from struct import pack, unpack -from nebula2.fbthrift.Thrift import TException +from nebula3.fbthrift.Thrift import TException class TTransportException(TException): diff --git a/nebula2/fbthrift/transport/__init__.py b/nebula3/fbthrift/transport/__init__.py similarity index 100% rename from nebula2/fbthrift/transport/__init__.py rename to nebula3/fbthrift/transport/__init__.py diff --git a/nebula2/fbthrift/util/BytesStrIO.py b/nebula3/fbthrift/util/BytesStrIO.py similarity index 100% rename from nebula2/fbthrift/util/BytesStrIO.py rename to nebula3/fbthrift/util/BytesStrIO.py diff --git a/nebula2/fbthrift/util/Decorators.py b/nebula3/fbthrift/util/Decorators.py similarity index 99% rename from nebula2/fbthrift/util/Decorators.py rename to nebula3/fbthrift/util/Decorators.py index 2069ef7c..fcc7148a 100644 --- a/nebula2/fbthrift/util/Decorators.py +++ b/nebula3/fbthrift/util/Decorators.py @@ -32,13 +32,13 @@ resource = None -from nebula2.fbthrift.Thrift import ( +from nebula3.fbthrift.Thrift import ( TApplicationException, TException, TMessageType, TRequestContext, ) -from nebula2.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift.protocol import THeaderProtocol log = logging.getLogger(__name__) diff --git a/nebula2/fbthrift/util/Recursive.py b/nebula3/fbthrift/util/Recursive.py similarity index 97% rename from nebula2/fbthrift/util/Recursive.py rename to nebula3/fbthrift/util/Recursive.py index 3493bc6f..ff8de92f 100644 --- a/nebula2/fbthrift/util/Recursive.py +++ b/nebula3/fbthrift/util/Recursive.py @@ -19,7 +19,7 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.Thrift import TType +from nebula3.fbthrift.Thrift import TType def fix_spec(all_structs): for s in all_structs: diff --git a/nebula2/fbthrift/util/Serializer.py b/nebula3/fbthrift/util/Serializer.py similarity index 95% rename from nebula2/fbthrift/util/Serializer.py rename to nebula3/fbthrift/util/Serializer.py index 0f66e49b..788673de 100644 --- a/nebula2/fbthrift/util/Serializer.py +++ b/nebula3/fbthrift/util/Serializer.py @@ -21,8 +21,8 @@ from typing import Any, AnyStr, TypeVar # noqa: F401 -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import THeaderProtocol # pyre-fixme[34]: `Variable[AnyStr <: [str, bytes]]` isn't present in the function's diff --git a/nebula2/fbthrift/util/TCppServerTestManager.py b/nebula3/fbthrift/util/TCppServerTestManager.py similarity index 96% rename from nebula2/fbthrift/util/TCppServerTestManager.py rename to nebula3/fbthrift/util/TCppServerTestManager.py index f351ec8d..899c9a31 100644 --- a/nebula2/fbthrift/util/TCppServerTestManager.py +++ b/nebula3/fbthrift/util/TCppServerTestManager.py @@ -18,8 +18,8 @@ from __future__ import unicode_literals import threading -from nebula2.fbthrift.Thrift import TProcessor -from nebula2.fbthrift.server.TCppServer import TCppServer +from nebula3.fbthrift.Thrift import TProcessor +from nebula3.fbthrift.server.TCppServer import TCppServer class TCppServerTestManager(object): """ @@ -30,7 +30,7 @@ class TCppServerTestManager(object): Basic example: from mylib import MyServiceHandler - from nebula2.fbthrift.util.TCppServerTestManager import TCppServerTestManager + from nebula3.fbthrift.util.TCppServerTestManager import TCppServerTestManager class MyServiceTest(unittest.TestCase) diff --git a/nebula2/fbthrift/util/TCppServerTestManagerTest.py b/nebula3/fbthrift/util/TCppServerTestManagerTest.py similarity index 95% rename from nebula2/fbthrift/util/TCppServerTestManagerTest.py rename to nebula3/fbthrift/util/TCppServerTestManagerTest.py index ce2c6713..9aae5313 100644 --- a/nebula2/fbthrift/util/TCppServerTestManagerTest.py +++ b/nebula3/fbthrift/util/TCppServerTestManagerTest.py @@ -20,22 +20,22 @@ import threading import unittest -from nebula2.fbthrift.Thrift import ( +from nebula3.fbthrift.Thrift import ( TApplicationException, TPriority, TProcessorEventHandler, ) -from nebula2.fbthrift.protocol import THeaderProtocol -from nebula2.fbthrift.transport import TSocket -from nebula2.fbthrift.transport import THeaderTransport -from nebula2.fbthrift.transport.TTransport import TTransportException -from nebula2.fbthrift.util.TCppServerTestManager import TCppServerTestManager -from nebula2.fbthrift.util.test_service import ( +from nebula3.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift.transport import TSocket +from nebula3.fbthrift.transport import THeaderTransport +from nebula3.fbthrift.transport.TTransport import TTransportException +from nebula3.fbthrift.util.TCppServerTestManager import TCppServerTestManager +from nebula3.fbthrift.util.test_service import ( TestService, PriorityService, SubPriorityService ) -from nebula2.fbthrift.util.test_service.ttypes import UserException2 +from nebula3.fbthrift.util.test_service.ttypes import UserException2 class BaseTest(unittest.TestCase): diff --git a/nebula2/fbthrift/util/TValidator.py b/nebula3/fbthrift/util/TValidator.py similarity index 98% rename from nebula2/fbthrift/util/TValidator.py rename to nebula3/fbthrift/util/TValidator.py index 1d437102..765b1d90 100644 --- a/nebula2/fbthrift/util/TValidator.py +++ b/nebula3/fbthrift/util/TValidator.py @@ -19,10 +19,10 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift.Thrift import TType +from nebula3.fbthrift.Thrift import TType import logging -_log = logging.getLogger('nebula2.fbthrift.validator') +_log = logging.getLogger('nebula3.fbthrift.validator') import sys if sys.version_info[0] >= 3: diff --git a/nebula2/fbthrift/util/__init__.py b/nebula3/fbthrift/util/__init__.py similarity index 97% rename from nebula2/fbthrift/util/__init__.py rename to nebula3/fbthrift/util/__init__.py index 4d37d3f5..77f963ab 100644 --- a/nebula2/fbthrift/util/__init__.py +++ b/nebula3/fbthrift/util/__init__.py @@ -18,7 +18,7 @@ from collections import OrderedDict, namedtuple -from nebula2.fbthrift.Thrift import TType +from nebula3.fbthrift.Thrift import TType __all__ = ["create_client", "Serializer", "struct_to_dict", "parse_struct_spec"] @@ -37,8 +37,8 @@ def create_client( Given a thrift client class, and a host/port return a client using HeaderTransport """ - from nebula2.fbthrift.transport.TSocket import TSocket - from nebula2.fbthrift.protocol.THeaderProtocol import THeaderProtocol + from nebula3.fbthrift.transport.TSocket import TSocket + from nebula3.fbthrift.protocol.THeaderProtocol import THeaderProtocol sock = TSocket(host=host, port=port, unix_socket=path) sock.setTimeout(timeout) diff --git a/nebula2/fbthrift/util/async_common.py b/nebula3/fbthrift/util/async_common.py similarity index 97% rename from nebula2/fbthrift/util/async_common.py rename to nebula3/fbthrift/util/async_common.py index 729f1b04..8a3fc493 100644 --- a/nebula2/fbthrift/util/async_common.py +++ b/nebula3/fbthrift/util/async_common.py @@ -32,19 +32,19 @@ import struct import warnings -import nebula2.fbthrift +import nebula3.fbthrift from collections import defaultdict from io import BytesIO -from nebula2.fbthrift.protocol.THeaderProtocol import THeaderProtocolFactory -from nebula2.fbthrift.server.TServer import TConnectionContext -from nebula2.fbthrift.transport.TTransport import ( +from nebula3.fbthrift.protocol.THeaderProtocol import THeaderProtocolFactory +from nebula3.fbthrift.server.TServer import TConnectionContext +from nebula3.fbthrift.transport.TTransport import ( TTransportBase, TTransportException, ) -from nebula2.fbthrift.transport.THeaderTransport import ( +from nebula3.fbthrift.transport.THeaderTransport import ( THeaderTransport, HEADER_FLAG, MAX_FRAME_SIZE, CLIENT_TYPE ) -from nebula2.fbthrift.Thrift import ( +from nebula3.fbthrift.Thrift import ( TApplicationException, TMessageType, ) diff --git a/nebula2/fbthrift/util/asyncio.py b/nebula3/fbthrift/util/asyncio.py similarity index 95% rename from nebula2/fbthrift/util/asyncio.py rename to nebula3/fbthrift/util/asyncio.py index 6ac199c0..7751d958 100644 --- a/nebula2/fbthrift/util/asyncio.py +++ b/nebula3/fbthrift/util/asyncio.py @@ -15,8 +15,8 @@ import asyncio -from nebula2.fbthrift.server.TAsyncioServer import ThriftClientProtocolFactory -from nebula2.fbthrift.util.Decorators import protocol_manager +from nebula3.fbthrift.server.TAsyncioServer import ThriftClientProtocolFactory +from nebula3.fbthrift.util.Decorators import protocol_manager class async_protocol_manager: diff --git a/nebula2/fbthrift/util/converter.py b/nebula3/fbthrift/util/converter.py similarity index 93% rename from nebula2/fbthrift/util/converter.py rename to nebula3/fbthrift/util/converter.py index d5e44c1c..1c999f4d 100644 --- a/nebula2/fbthrift/util/converter.py +++ b/nebula3/fbthrift/util/converter.py @@ -17,9 +17,9 @@ from typing import Any, Type, TypeVar -from nebula2.fbthrift.py3.types import Enum, Struct -from nebula2.fbthrift.Thrift import TType -from nebula2.fbthrift.util import parse_struct_spec +from nebula3.fbthrift.py3.types import Enum, Struct +from nebula3.fbthrift.Thrift import TType +from nebula3.fbthrift.util import parse_struct_spec T = TypeVar("T") diff --git a/nebula2/fbthrift/util/fuzzer.py b/nebula3/fbthrift/util/fuzzer.py similarity index 99% rename from nebula2/fbthrift/util/fuzzer.py rename to nebula3/fbthrift/util/fuzzer.py index a8610638..bfdad0f4 100644 --- a/nebula2/fbthrift/util/fuzzer.py +++ b/nebula3/fbthrift/util/fuzzer.py @@ -44,10 +44,10 @@ except ImportError: SR_AVAILABLE = False -from nebula2.fbthrift import Thrift -from nebula2.fbthrift.transport import TTransport, TSocket, TSSLSocket, THttpClient -from nebula2.fbthrift.protocol import TBinaryProtocol, TCompactProtocol, THeaderProtocol -from nebula2.fbthrift.util import randomizer +from nebula3.fbthrift import Thrift +from nebula3.fbthrift.transport import TTransport, TSocket, TSSLSocket, THttpClient +from nebula3.fbthrift.protocol import TBinaryProtocol, TCompactProtocol, THeaderProtocol +from nebula3.fbthrift.util import randomizer if six.PY3: from importlib.machinery import SourceFileLoader @@ -455,7 +455,7 @@ def load_methods(self, exclude_ifaces=None): """Load a service's methods. If exclude_ifaces is not None, it should be a collection and only - methods from nebula2.fbthrift interfaces not included in that collection will + methods from nebula3.fbthrift interfaces not included in that collection will be considered.""" exclude_ifaces = exclude_ifaces or [] diff --git a/nebula2/fbthrift/util/inspect.py b/nebula3/fbthrift/util/inspect.py similarity index 99% rename from nebula2/fbthrift/util/inspect.py rename to nebula3/fbthrift/util/inspect.py index 58d35fd8..2322e556 100644 --- a/nebula2/fbthrift/util/inspect.py +++ b/nebula3/fbthrift/util/inspect.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from nebula2.fbthrift.Thrift import TType +from nebula3.fbthrift.Thrift import TType import inspect import sys diff --git a/nebula2/fbthrift/util/randomizer.py b/nebula3/fbthrift/util/randomizer.py similarity index 99% rename from nebula2/fbthrift/util/randomizer.py rename to nebula3/fbthrift/util/randomizer.py index 2a3e846f..73c2e378 100644 --- a/nebula2/fbthrift/util/randomizer.py +++ b/nebula3/fbthrift/util/randomizer.py @@ -30,9 +30,9 @@ import six import six.moves as sm -from nebula2.fbthrift import Thrift +from nebula3.fbthrift import Thrift -from nebula2.fbthrift.util.type_inspect import get_spec, ThriftPyTypeSpec +from nebula3.fbthrift.util.type_inspect import get_spec, ThriftPyTypeSpec INFINITY = float('inf') diff --git a/nebula2/fbthrift/util/remote.py b/nebula3/fbthrift/util/remote.py similarity index 99% rename from nebula2/fbthrift/util/remote.py rename to nebula3/fbthrift/util/remote.py index 5c556b51..332fcc96 100644 --- a/nebula2/fbthrift/util/remote.py +++ b/nebula3/fbthrift/util/remote.py @@ -48,10 +48,10 @@ from six.moves.urllib.parse import urlparse from six import string_types -from nebula2.fbthrift import Thrift -from nebula2.fbthrift.transport import TTransport, TSocket, TSSLSocket, THttpClient -from nebula2.fbthrift.transport.THeaderTransport import THeaderTransport -from nebula2.fbthrift.protocol import TBinaryProtocol, TCompactProtocol, \ +from nebula3.fbthrift import Thrift +from nebula3.fbthrift.transport import TTransport, TSocket, TSSLSocket, THttpClient +from nebula3.fbthrift.transport.THeaderTransport import THeaderTransport +from nebula3.fbthrift.protocol import TBinaryProtocol, TCompactProtocol, \ TJSONProtocol, THeaderProtocol, TSimpleJSONProtocol diff --git a/nebula2/fbthrift/util/type_inspect.py b/nebula3/fbthrift/util/type_inspect.py similarity index 99% rename from nebula2/fbthrift/util/type_inspect.py rename to nebula3/fbthrift/util/type_inspect.py index 4a61f09d..4f62fa6c 100644 --- a/nebula2/fbthrift/util/type_inspect.py +++ b/nebula3/fbthrift/util/type_inspect.py @@ -23,7 +23,7 @@ from __future__ import print_function from __future__ import unicode_literals -from nebula2.fbthrift import Thrift +from nebula3.fbthrift import Thrift def get_spec(ttype, spec_args): diff --git a/nebula2/gclient/__init__.py b/nebula3/gclient/__init__.py similarity index 100% rename from nebula2/gclient/__init__.py rename to nebula3/gclient/__init__.py diff --git a/nebula2/gclient/net/AuthResult.py b/nebula3/gclient/net/AuthResult.py similarity index 100% rename from nebula2/gclient/net/AuthResult.py rename to nebula3/gclient/net/AuthResult.py diff --git a/nebula2/gclient/net/Connection.py b/nebula3/gclient/net/Connection.py similarity index 94% rename from nebula2/gclient/net/Connection.py rename to nebula3/gclient/net/Connection.py index a727685a..4a971054 100644 --- a/nebula2/gclient/net/Connection.py +++ b/nebula3/gclient/net/Connection.py @@ -7,22 +7,22 @@ import time -from nebula2.fbthrift.transport import TSocket, TTransport, TSSLSocket -from nebula2.fbthrift.transport.TTransport import TTransportException -from nebula2.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.transport import TSocket, TTransport, TSSLSocket +from nebula3.fbthrift.transport.TTransport import TTransportException +from nebula3.fbthrift.protocol import TBinaryProtocol -from nebula2.common.ttypes import ErrorCode -from nebula2.graph import GraphService -from nebula2.graph.ttypes import VerifyClientVersionReq -from nebula2.logger import logger +from nebula3.common.ttypes import ErrorCode +from nebula3.graph import GraphService +from nebula3.graph.ttypes import VerifyClientVersionReq +from nebula3.logger import logger -from nebula2.Exception import ( +from nebula3.Exception import ( AuthFailedException, IOErrorException, ClientServerIncompatibleException, ) -from nebula2.gclient.net.AuthResult import AuthResult +from nebula3.gclient.net.AuthResult import AuthResult class Connection(object): diff --git a/nebula2/gclient/net/ConnectionPool.py b/nebula3/gclient/net/ConnectionPool.py similarity index 98% rename from nebula2/gclient/net/ConnectionPool.py rename to nebula3/gclient/net/ConnectionPool.py index cb68a682..d9ad4099 100644 --- a/nebula2/gclient/net/ConnectionPool.py +++ b/nebula3/gclient/net/ConnectionPool.py @@ -11,11 +11,11 @@ from collections import deque from threading import RLock, Timer -from nebula2.Exception import NotValidConnectionException, InValidHostname +from nebula3.Exception import NotValidConnectionException, InValidHostname -from nebula2.gclient.net.Session import Session -from nebula2.gclient.net.Connection import Connection -from nebula2.logger import logger +from nebula3.gclient.net.Session import Session +from nebula3.gclient.net.Connection import Connection +from nebula3.logger import logger class ConnectionPool(object): diff --git a/nebula2/gclient/net/Session.py b/nebula3/gclient/net/Session.py similarity index 98% rename from nebula2/gclient/net/Session.py rename to nebula3/gclient/net/Session.py index d1155cdb..13a4d044 100644 --- a/nebula2/gclient/net/Session.py +++ b/nebula3/gclient/net/Session.py @@ -7,14 +7,14 @@ import time -from nebula2.Exception import ( +from nebula3.Exception import ( IOErrorException, NotValidConnectionException, ) -from nebula2.data.ResultSet import ResultSet -from nebula2.gclient.net.AuthResult import AuthResult -from nebula2.logger import logger +from nebula3.data.ResultSet import ResultSet +from nebula3.gclient.net.AuthResult import AuthResult +from nebula3.logger import logger class Session(object): diff --git a/nebula3/gclient/net/__init__.py b/nebula3/gclient/net/__init__.py new file mode 100644 index 00000000..527d5c79 --- /dev/null +++ b/nebula3/gclient/net/__init__.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +# --coding:utf-8-- + +# Copyright (c) 2020 vesoft inc. All rights reserved. +# +# This source code is licensed under Apache 2.0 License. + + +from nebula3.common.ttypes import ErrorCode +from nebula3.Exception import ( + AuthFailedException, + IOErrorException, + NotValidConnectionException, + InValidHostname, +) + +from nebula3.data.ResultSet import ResultSet + +from nebula3.gclient.net.AuthResult import AuthResult +from nebula3.gclient.net.Session import Session +from nebula3.gclient.net.Connection import Connection +from nebula3.gclient.net.ConnectionPool import ConnectionPool diff --git a/nebula2/graph/GraphService-fuzzer b/nebula3/graph/GraphService-fuzzer similarity index 92% rename from nebula2/graph/GraphService-fuzzer rename to nebula3/graph/GraphService-fuzzer index b8c07170..2337abce 100755 --- a/nebula2/graph/GraphService-fuzzer +++ b/nebula3/graph/GraphService-fuzzer @@ -41,5 +41,5 @@ from . import GraphService from . import ttypes from . import constants -import nebula2.fbthrift.util.fuzzer -nebula2.fbthrift.util.fuzzer.fuzz_service(GraphService, ttypes, constants) +import nebula3.fbthrift.util.fuzzer +nebula3.fbthrift.util.fuzzer.fuzz_service(GraphService, ttypes, constants) diff --git a/nebula2/graph/GraphService-remote b/nebula3/graph/GraphService-remote similarity index 96% rename from nebula2/graph/GraphService-remote rename to nebula3/graph/GraphService-remote index 1e893112..31dec05c 100755 --- a/nebula2/graph/GraphService-remote +++ b/nebula3/graph/GraphService-remote @@ -38,8 +38,8 @@ if (not sys.argv[0].endswith("par") and from . import GraphService from . import ttypes -from nebula2.fbthrift.util.remote import Function -from nebula2.fbthrift.remote import Remote +from nebula3.fbthrift.util.remote import Function +from nebula3.fbthrift.remote import Remote FUNCTIONS = { 'authenticate': Function('authenticate', 'GraphService', 'AuthResponse', [('binary', 'username', 'binary'), ('binary', 'password', 'binary')]), diff --git a/nebula2/graph/GraphService.py b/nebula3/graph/GraphService.py similarity index 98% rename from nebula2/graph/GraphService.py rename to nebula3/graph/GraphService.py index 2fefa5cb..ea497f36 100644 --- a/nebula2/graph/GraphService.py +++ b/nebula3/graph/GraphService.py @@ -7,32 +7,32 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException from .ttypes import UTF8STRINGS, ProfilingStats, PlanNodeBranchInfo, Pair, PlanNodeDescription, PlanDescription, ExecutionResponse, AuthResponse, VerifyClientVersionResp, VerifyClientVersionReq -import nebula2.common.ttypes +import nebula3.common.ttypes -from nebula2.fbthrift.Thrift import TProcessor +from nebula3.fbthrift.Thrift import TProcessor import pprint import warnings -from nebula2.fbthrift import Thrift -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.fbthrift.protocol import TCompactProtocol -from nebula2.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift import Thrift +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.protocol import TCompactProtocol +from nebula3.fbthrift.protocol import THeaderProtocol fastproto = None try: - from nebula2.fbthrift.protocol import fastproto + from nebula3.fbthrift.protocol import fastproto except ImportError: pass all_structs = [] UTF8STRINGS = bool(0) or sys.version_info.major >= 3 -from nebula2.fbthrift.util.Decorators import ( +from nebula3.fbthrift.util.Decorators import ( future_process_main, future_process_method, process_main as thrift_process_main, @@ -713,13 +713,13 @@ def read(self, iprot): if _size54 >= 0: for _i58 in range(_size54): _key59 = iprot.readString() - _val60 = nebula2.common.ttypes.Value() + _val60 = nebula3.common.ttypes.Value() _val60.read(iprot) self.parameterMap[_key59] = _val60 else: while iprot.peekMap(): _key61 = iprot.readString() - _val62 = nebula2.common.ttypes.Value() + _val62 = nebula3.common.ttypes.Value() _val62.read(iprot) self.parameterMap[_key61] = _val62 iprot.readMapEnd() @@ -791,7 +791,7 @@ def __ne__(self, other): None, # 0 (1, TType.I64, 'sessionId', None, None, 2, ), # 1 (2, TType.STRING, 'stmt', False, None, 2, ), # 2 - (3, TType.MAP, 'parameterMap', (TType.STRING,False,TType.STRUCT,[nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 3 + (3, TType.MAP, 'parameterMap', (TType.STRING,False,TType.STRUCT,[nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 3 ) executeWithParameter_args.thrift_struct_annotations = { @@ -1161,13 +1161,13 @@ def read(self, iprot): if _size65 >= 0: for _i69 in range(_size65): _key70 = iprot.readString() - _val71 = nebula2.common.ttypes.Value() + _val71 = nebula3.common.ttypes.Value() _val71.read(iprot) self.parameterMap[_key70] = _val71 else: while iprot.peekMap(): _key72 = iprot.readString() - _val73 = nebula2.common.ttypes.Value() + _val73 = nebula3.common.ttypes.Value() _val73.read(iprot) self.parameterMap[_key72] = _val73 iprot.readMapEnd() @@ -1239,7 +1239,7 @@ def __ne__(self, other): None, # 0 (1, TType.I64, 'sessionId', None, None, 2, ), # 1 (2, TType.STRING, 'stmt', False, None, 2, ), # 2 - (3, TType.MAP, 'parameterMap', (TType.STRING,False,TType.STRUCT,[nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 3 + (3, TType.MAP, 'parameterMap', (TType.STRING,False,TType.STRUCT,[nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 3 ) executeJsonWithParameter_args.thrift_struct_annotations = { diff --git a/nebula2/graph/__init__.py b/nebula3/graph/__init__.py similarity index 100% rename from nebula2/graph/__init__.py rename to nebula3/graph/__init__.py diff --git a/nebula2/graph/constants.py b/nebula3/graph/constants.py similarity index 70% rename from nebula2/graph/constants.py rename to nebula3/graph/constants.py index 58cc467a..8b30ebdb 100644 --- a/nebula2/graph/constants.py +++ b/nebula3/graph/constants.py @@ -7,12 +7,12 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException -import nebula2.common.ttypes +import nebula3.common.ttypes from .ttypes import UTF8STRINGS, ProfilingStats, PlanNodeBranchInfo, Pair, PlanNodeDescription, PlanDescription, ExecutionResponse, AuthResponse, VerifyClientVersionResp, VerifyClientVersionReq diff --git a/nebula2/graph/ttypes.py b/nebula3/graph/ttypes.py similarity index 98% rename from nebula2/graph/ttypes.py rename to nebula3/graph/ttypes.py index e6e5853c..69c7f9eb 100644 --- a/nebula2/graph/ttypes.py +++ b/nebula3/graph/ttypes.py @@ -7,24 +7,24 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException -import nebula2.common.ttypes +import nebula3.common.ttypes import pprint import warnings -from nebula2.fbthrift import Thrift -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.fbthrift.protocol import TCompactProtocol -from nebula2.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift import Thrift +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.protocol import TCompactProtocol +from nebula3.fbthrift.protocol import THeaderProtocol fastproto = None try: - from nebula2.fbthrift.protocol import fastproto + from nebula3.fbthrift.protocol import fastproto except ImportError: pass all_structs = [] @@ -723,7 +723,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.data = nebula2.common.ttypes.DataSet() + self.data = nebula3.common.ttypes.DataSet() self.data.read(iprot) else: iprot.skip(ftype) @@ -1291,9 +1291,9 @@ def PlanDescription__setstate__(self, state): all_structs.append(ExecutionResponse) ExecutionResponse.thrift_spec = ( None, # 0 - (1, TType.I32, 'error_code', nebula2.common.ttypes.ErrorCode, None, 0, ), # 1 + (1, TType.I32, 'error_code', nebula3.common.ttypes.ErrorCode, None, 0, ), # 1 (2, TType.I64, 'latency_in_us', None, None, 0, ), # 2 - (3, TType.STRUCT, 'data', [nebula2.common.ttypes.DataSet, nebula2.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 3 + (3, TType.STRUCT, 'data', [nebula3.common.ttypes.DataSet, nebula3.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 3 (4, TType.STRING, 'space_name', False, None, 1, ), # 4 (5, TType.STRING, 'error_msg', False, None, 1, ), # 5 (6, TType.STRUCT, 'plan_desc', [PlanDescription, PlanDescription.thrift_spec, False], None, 1, ), # 6 @@ -1334,7 +1334,7 @@ def ExecutionResponse__setstate__(self, state): all_structs.append(AuthResponse) AuthResponse.thrift_spec = ( None, # 0 - (1, TType.I32, 'error_code', nebula2.common.ttypes.ErrorCode, None, 0, ), # 1 + (1, TType.I32, 'error_code', nebula3.common.ttypes.ErrorCode, None, 0, ), # 1 (2, TType.STRING, 'error_msg', False, None, 1, ), # 2 (3, TType.I64, 'session_id', None, None, 1, ), # 3 (4, TType.I32, 'time_zone_offset_seconds', None, None, 1, ), # 4 @@ -1371,7 +1371,7 @@ def AuthResponse__setstate__(self, state): all_structs.append(VerifyClientVersionResp) VerifyClientVersionResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'error_code', nebula2.common.ttypes.ErrorCode, None, 0, ), # 1 + (1, TType.I32, 'error_code', nebula3.common.ttypes.ErrorCode, None, 0, ), # 1 (2, TType.STRING, 'error_msg', False, None, 1, ), # 2 ) @@ -1397,7 +1397,7 @@ def VerifyClientVersionResp__setstate__(self, state): all_structs.append(VerifyClientVersionReq) VerifyClientVersionReq.thrift_spec = ( None, # 0 - (1, TType.STRING, 'version', False, "2.6.0", 0, ), # 1 + (1, TType.STRING, 'version', False, "3.0.0", 0, ), # 1 ) VerifyClientVersionReq.thrift_struct_annotations = { @@ -1411,7 +1411,7 @@ def VerifyClientVersionReq__init__(self, version=VerifyClientVersionReq.thrift_s VerifyClientVersionReq.__init__ = VerifyClientVersionReq__init__ def VerifyClientVersionReq__setstate__(self, state): - state.setdefault('version', "2.6.0") + state.setdefault('version', "3.0.0") self.__dict__ = state VerifyClientVersionReq.__getstate__ = lambda self: self.__dict__.copy() diff --git a/nebula2/logger.py b/nebula3/logger.py similarity index 100% rename from nebula2/logger.py rename to nebula3/logger.py diff --git a/nebula2/mclient/__init__.py b/nebula3/mclient/__init__.py similarity index 98% rename from nebula2/mclient/__init__.py rename to nebula3/mclient/__init__.py index fbc868f5..113350d0 100644 --- a/nebula2/mclient/__init__.py +++ b/nebula3/mclient/__init__.py @@ -9,15 +9,15 @@ import socket from _thread import RLock -from nebula2.Exception import ( +from nebula3.Exception import ( InValidHostname, PartNotFoundException, SpaceNotFoundException, TagNotFoundException, EdgeNotFoundException, ) -from nebula2.common.ttypes import HostAddr, ErrorCode -from nebula2.meta.ttypes import ( +from nebula3.common.ttypes import HostAddr, ErrorCode +from nebula3.meta.ttypes import ( HostStatus, ListTagsReq, ListEdgesReq, @@ -26,11 +26,11 @@ ListHostsReq, HostRole, ) -from nebula2.meta import ttypes, MetaService +from nebula3.meta import ttypes, MetaService -from nebula2.fbthrift.transport import TSocket, TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.logger import logger +from nebula3.fbthrift.transport import TSocket, TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.logger import logger class MetaClient(object): diff --git a/nebula2/meta/MetaService-fuzzer b/nebula3/meta/MetaService-fuzzer similarity index 92% rename from nebula2/meta/MetaService-fuzzer rename to nebula3/meta/MetaService-fuzzer index 669090c3..8dbf6f69 100755 --- a/nebula2/meta/MetaService-fuzzer +++ b/nebula3/meta/MetaService-fuzzer @@ -41,5 +41,5 @@ from . import MetaService from . import ttypes from . import constants -import nebula2.fbthrift.util.fuzzer -nebula2.fbthrift.util.fuzzer.fuzz_service(MetaService, ttypes, constants) +import nebula3.fbthrift.util.fuzzer +nebula3.fbthrift.util.fuzzer.fuzz_service(MetaService, ttypes, constants) diff --git a/nebula2/meta/MetaService-remote b/nebula3/meta/MetaService-remote similarity index 99% rename from nebula2/meta/MetaService-remote rename to nebula3/meta/MetaService-remote index dfbbd90a..8ce69942 100755 --- a/nebula2/meta/MetaService-remote +++ b/nebula3/meta/MetaService-remote @@ -38,8 +38,8 @@ if (not sys.argv[0].endswith("par") and from . import MetaService from . import ttypes -from nebula2.fbthrift.util.remote import Function -from nebula2.fbthrift.remote import Remote +from nebula3.fbthrift.util.remote import Function +from nebula3.fbthrift.remote import Remote FUNCTIONS = { 'createSpace': Function('createSpace', 'MetaService', 'ExecResp', [('CreateSpaceReq', 'req', 'CreateSpaceReq')]), diff --git a/nebula2/meta/MetaService.py b/nebula3/meta/MetaService.py similarity index 99% rename from nebula2/meta/MetaService.py rename to nebula3/meta/MetaService.py index 2a437943..1790a82d 100644 --- a/nebula2/meta/MetaService.py +++ b/nebula3/meta/MetaService.py @@ -7,32 +7,32 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException from .ttypes import UTF8STRINGS, AlterSchemaOp, RoleType, GeoShape, IsolationLevel, HostStatus, SnapshotStatus, AlterSpaceOp, AdminJobOp, AdminCmd, JobStatus, ListHostType, HostRole, TaskResult, ConfigModule, ConfigMode, ListenerType, ExternalServiceType, QueryStatus, ID, ColumnTypeDef, ColumnDef, SchemaProp, Schema, IdName, SpaceDesc, SpaceItem, TagItem, AlterSchemaItem, EdgeItem, IndexParams, IndexItem, HostItem, UserItem, RoleItem, ExecResp, AlterSpaceReq, AdminJobReq, JobDesc, TaskDesc, AdminJobResult, AdminJobResp, Correlativity, StatsItem, CreateSpaceReq, CreateSpaceAsReq, DropSpaceReq, ListSpacesReq, ListSpacesResp, GetSpaceReq, GetSpaceResp, CreateTagReq, AlterTagReq, DropTagReq, ListTagsReq, ListTagsResp, GetTagReq, GetTagResp, CreateEdgeReq, AlterEdgeReq, GetEdgeReq, GetEdgeResp, DropEdgeReq, ListEdgesReq, ListEdgesResp, AddHostsReq, DropHostsReq, ListHostsReq, ListHostsResp, PartItem, ListPartsReq, ListPartsResp, GetPartsAllocReq, GetPartsAllocResp, GetWorkerIdReq, GetWorkerIdResp, MultiPutReq, GetReq, GetResp, MultiGetReq, MultiGetResp, RemoveReq, RemoveRangeReq, ScanReq, ScanResp, HBResp, LeaderInfo, PartitionList, HBReq, ServiceInfo, AgentHBReq, AgentHBResp, IndexFieldDef, CreateTagIndexReq, DropTagIndexReq, GetTagIndexReq, GetTagIndexResp, ListTagIndexesReq, ListTagIndexesResp, CreateEdgeIndexReq, DropEdgeIndexReq, GetEdgeIndexReq, GetEdgeIndexResp, ListEdgeIndexesReq, ListEdgeIndexesResp, RebuildIndexReq, CreateUserReq, DropUserReq, AlterUserReq, GrantRoleReq, RevokeRoleReq, ListUsersReq, ListUsersResp, ListRolesReq, ListRolesResp, GetUserRolesReq, ChangePasswordReq, BalanceTask, ConfigItem, RegConfigReq, GetConfigReq, GetConfigResp, SetConfigReq, ListConfigsReq, ListConfigsResp, CreateSnapshotReq, DropSnapshotReq, ListSnapshotsReq, Snapshot, ListSnapshotsResp, ListIndexStatusReq, IndexStatus, ListIndexStatusResp, MergeZoneReq, DropZoneReq, DivideZoneReq, RenameZoneReq, AddHostsIntoZoneReq, GetZoneReq, GetZoneResp, ListZonesReq, Zone, ListZonesResp, AddListenerReq, RemoveListenerReq, ListListenerReq, ListenerInfo, ListListenerResp, GetStatsReq, GetStatsResp, HostBackupInfo, SpaceBackupInfo, BackupMeta, CreateBackupReq, CreateBackupResp, HostPair, RestoreMetaReq, ServiceClient, SignInServiceReq, SignOutServiceReq, ListServiceClientsReq, ListServiceClientsResp, FTIndex, CreateFTIndexReq, DropFTIndexReq, ListFTIndexesReq, ListFTIndexesResp, QueryDesc, Session, CreateSessionReq, CreateSessionResp, UpdateSessionsReq, UpdateSessionsResp, ListSessionsReq, ListSessionsResp, GetSessionReq, GetSessionResp, RemoveSessionReq, KillQueryReq, ReportTaskReq, ListClusterInfoResp, ListClusterInfoReq, GetMetaDirInfoResp, GetMetaDirInfoReq, VerifyClientVersionResp, VerifyClientVersionReq, SchemaVer, ClusterID -import nebula2.common.ttypes +import nebula3.common.ttypes -from nebula2.fbthrift.Thrift import TProcessor +from nebula3.fbthrift.Thrift import TProcessor import pprint import warnings -from nebula2.fbthrift import Thrift -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.fbthrift.protocol import TCompactProtocol -from nebula2.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift import Thrift +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.protocol import TCompactProtocol +from nebula3.fbthrift.protocol import THeaderProtocol fastproto = None try: - from nebula2.fbthrift.protocol import fastproto + from nebula3.fbthrift.protocol import fastproto except ImportError: pass all_structs = [] UTF8STRINGS = bool(0) or sys.version_info.major >= 3 -from nebula2.fbthrift.util.Decorators import ( +from nebula3.fbthrift.util.Decorators import ( future_process_main, future_process_method, process_main as thrift_process_main, diff --git a/nebula2/meta/__init__.py b/nebula3/meta/__init__.py similarity index 100% rename from nebula2/meta/__init__.py rename to nebula3/meta/__init__.py diff --git a/nebula2/meta/constants.py b/nebula3/meta/constants.py similarity index 93% rename from nebula2/meta/constants.py rename to nebula3/meta/constants.py index f7306bb4..0f295d33 100644 --- a/nebula2/meta/constants.py +++ b/nebula3/meta/constants.py @@ -7,12 +7,12 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException -import nebula2.common.ttypes +import nebula3.common.ttypes from .ttypes import UTF8STRINGS, AlterSchemaOp, RoleType, GeoShape, IsolationLevel, HostStatus, SnapshotStatus, AlterSpaceOp, AdminJobOp, AdminCmd, JobStatus, ListHostType, HostRole, TaskResult, ConfigModule, ConfigMode, ListenerType, ExternalServiceType, QueryStatus, ID, ColumnTypeDef, ColumnDef, SchemaProp, Schema, IdName, SpaceDesc, SpaceItem, TagItem, AlterSchemaItem, EdgeItem, IndexParams, IndexItem, HostItem, UserItem, RoleItem, ExecResp, AlterSpaceReq, AdminJobReq, JobDesc, TaskDesc, AdminJobResult, AdminJobResp, Correlativity, StatsItem, CreateSpaceReq, CreateSpaceAsReq, DropSpaceReq, ListSpacesReq, ListSpacesResp, GetSpaceReq, GetSpaceResp, CreateTagReq, AlterTagReq, DropTagReq, ListTagsReq, ListTagsResp, GetTagReq, GetTagResp, CreateEdgeReq, AlterEdgeReq, GetEdgeReq, GetEdgeResp, DropEdgeReq, ListEdgesReq, ListEdgesResp, AddHostsReq, DropHostsReq, ListHostsReq, ListHostsResp, PartItem, ListPartsReq, ListPartsResp, GetPartsAllocReq, GetPartsAllocResp, GetWorkerIdReq, GetWorkerIdResp, MultiPutReq, GetReq, GetResp, MultiGetReq, MultiGetResp, RemoveReq, RemoveRangeReq, ScanReq, ScanResp, HBResp, LeaderInfo, PartitionList, HBReq, ServiceInfo, AgentHBReq, AgentHBResp, IndexFieldDef, CreateTagIndexReq, DropTagIndexReq, GetTagIndexReq, GetTagIndexResp, ListTagIndexesReq, ListTagIndexesResp, CreateEdgeIndexReq, DropEdgeIndexReq, GetEdgeIndexReq, GetEdgeIndexResp, ListEdgeIndexesReq, ListEdgeIndexesResp, RebuildIndexReq, CreateUserReq, DropUserReq, AlterUserReq, GrantRoleReq, RevokeRoleReq, ListUsersReq, ListUsersResp, ListRolesReq, ListRolesResp, GetUserRolesReq, ChangePasswordReq, BalanceTask, ConfigItem, RegConfigReq, GetConfigReq, GetConfigResp, SetConfigReq, ListConfigsReq, ListConfigsResp, CreateSnapshotReq, DropSnapshotReq, ListSnapshotsReq, Snapshot, ListSnapshotsResp, ListIndexStatusReq, IndexStatus, ListIndexStatusResp, MergeZoneReq, DropZoneReq, DivideZoneReq, RenameZoneReq, AddHostsIntoZoneReq, GetZoneReq, GetZoneResp, ListZonesReq, Zone, ListZonesResp, AddListenerReq, RemoveListenerReq, ListListenerReq, ListenerInfo, ListListenerResp, GetStatsReq, GetStatsResp, HostBackupInfo, SpaceBackupInfo, BackupMeta, CreateBackupReq, CreateBackupResp, HostPair, RestoreMetaReq, ServiceClient, SignInServiceReq, SignOutServiceReq, ListServiceClientsReq, ListServiceClientsResp, FTIndex, CreateFTIndexReq, DropFTIndexReq, ListFTIndexesReq, ListFTIndexesResp, QueryDesc, Session, CreateSessionReq, CreateSessionResp, UpdateSessionsReq, UpdateSessionsResp, ListSessionsReq, ListSessionsResp, GetSessionReq, GetSessionResp, RemoveSessionReq, KillQueryReq, ReportTaskReq, ListClusterInfoResp, ListClusterInfoReq, GetMetaDirInfoResp, GetMetaDirInfoReq, VerifyClientVersionResp, VerifyClientVersionReq, SchemaVer, ClusterID diff --git a/nebula2/meta/ttypes.py b/nebula3/meta/ttypes.py similarity index 97% rename from nebula2/meta/ttypes.py rename to nebula3/meta/ttypes.py index 534b6565..5423a048 100644 --- a/nebula2/meta/ttypes.py +++ b/nebula3/meta/ttypes.py @@ -7,24 +7,24 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException -import nebula2.common.ttypes +import nebula3.common.ttypes import pprint import warnings -from nebula2.fbthrift import Thrift -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.fbthrift.protocol import TCompactProtocol -from nebula2.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift import Thrift +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.protocol import TCompactProtocol +from nebula3.fbthrift.protocol import THeaderProtocol fastproto = None try: - from nebula2.fbthrift.protocol import fastproto + from nebula3.fbthrift.protocol import fastproto except ImportError: pass all_structs = [] @@ -1837,7 +1837,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.schema_id = nebula2.common.ttypes.SchemaID() + self.schema_id = nebula3.common.ttypes.SchemaID() self.schema_id.read(iprot) else: iprot.skip(ftype) @@ -2001,7 +2001,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.hostAddr = nebula2.common.ttypes.HostAddr() + self.hostAddr = nebula3.common.ttypes.HostAddr() self.hostAddr.read(iprot) else: iprot.skip(ftype) @@ -2498,7 +2498,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -2978,7 +2978,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.host = nebula2.common.ttypes.HostAddr() + self.host = nebula3.common.ttypes.HostAddr() self.host.read(iprot) else: iprot.skip(ftype) @@ -3262,7 +3262,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -4037,7 +4037,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -4225,7 +4225,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -4744,7 +4744,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -4960,7 +4960,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -5407,7 +5407,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -5681,7 +5681,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -5794,12 +5794,12 @@ def read(self, iprot): (_etype233, _size230) = iprot.readListBegin() if _size230 >= 0: for _i234 in range(_size230): - _elem235 = nebula2.common.ttypes.HostAddr() + _elem235 = nebula3.common.ttypes.HostAddr() _elem235.read(iprot) self.hosts.append(_elem235) else: while iprot.peekList(): - _elem236 = nebula2.common.ttypes.HostAddr() + _elem236 = nebula3.common.ttypes.HostAddr() _elem236.read(iprot) self.hosts.append(_elem236) iprot.readListEnd() @@ -5881,12 +5881,12 @@ def read(self, iprot): (_etype241, _size238) = iprot.readListBegin() if _size238 >= 0: for _i242 in range(_size238): - _elem243 = nebula2.common.ttypes.HostAddr() + _elem243 = nebula3.common.ttypes.HostAddr() _elem243.read(iprot) self.hosts.append(_elem243) else: while iprot.peekList(): - _elem244 = nebula2.common.ttypes.HostAddr() + _elem244 = nebula3.common.ttypes.HostAddr() _elem244.read(iprot) self.hosts.append(_elem244) iprot.readListEnd() @@ -6043,7 +6043,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -6160,7 +6160,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -6170,12 +6170,12 @@ def read(self, iprot): (_etype257, _size254) = iprot.readListBegin() if _size254 >= 0: for _i258 in range(_size254): - _elem259 = nebula2.common.ttypes.HostAddr() + _elem259 = nebula3.common.ttypes.HostAddr() _elem259.read(iprot) self.peers.append(_elem259) else: while iprot.peekList(): - _elem260 = nebula2.common.ttypes.HostAddr() + _elem260 = nebula3.common.ttypes.HostAddr() _elem260.read(iprot) self.peers.append(_elem260) iprot.readListEnd() @@ -6187,12 +6187,12 @@ def read(self, iprot): (_etype264, _size261) = iprot.readListBegin() if _size261 >= 0: for _i265 in range(_size261): - _elem266 = nebula2.common.ttypes.HostAddr() + _elem266 = nebula3.common.ttypes.HostAddr() _elem266.read(iprot) self.losts.append(_elem266) else: while iprot.peekList(): - _elem267 = nebula2.common.ttypes.HostAddr() + _elem267 = nebula3.common.ttypes.HostAddr() _elem267.read(iprot) self.losts.append(_elem267) iprot.readListEnd() @@ -6403,7 +6403,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -6592,7 +6592,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -6607,12 +6607,12 @@ def read(self, iprot): (_etype296, _size293) = iprot.readListBegin() if _size293 >= 0: for _i297 in range(_size293): - _elem298 = nebula2.common.ttypes.HostAddr() + _elem298 = nebula3.common.ttypes.HostAddr() _elem298.read(iprot) _val292.append(_elem298) else: while iprot.peekList(): - _elem299 = nebula2.common.ttypes.HostAddr() + _elem299 = nebula3.common.ttypes.HostAddr() _elem299.read(iprot) _val292.append(_elem299) iprot.readListEnd() @@ -6624,12 +6624,12 @@ def read(self, iprot): (_etype305, _size302) = iprot.readListBegin() if _size302 >= 0: for _i306 in range(_size302): - _elem307 = nebula2.common.ttypes.HostAddr() + _elem307 = nebula3.common.ttypes.HostAddr() _elem307.read(iprot) _val301.append(_elem307) else: while iprot.peekList(): - _elem308 = nebula2.common.ttypes.HostAddr() + _elem308 = nebula3.common.ttypes.HostAddr() _elem308.read(iprot) _val301.append(_elem308) iprot.readListEnd() @@ -6837,7 +6837,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -6941,12 +6941,12 @@ def read(self, iprot): (_etype326, _size323) = iprot.readListBegin() if _size323 >= 0: for _i327 in range(_size323): - _elem328 = nebula2.common.ttypes.KeyValue() + _elem328 = nebula3.common.ttypes.KeyValue() _elem328.read(iprot) self.pairs.append(_elem328) else: while iprot.peekList(): - _elem329 = nebula2.common.ttypes.KeyValue() + _elem329 = nebula3.common.ttypes.KeyValue() _elem329.read(iprot) self.pairs.append(_elem329) iprot.readListEnd() @@ -7125,7 +7125,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -7325,7 +7325,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -7725,7 +7725,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -7841,7 +7841,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -8144,7 +8144,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.host = nebula2.common.ttypes.HostAddr() + self.host = nebula3.common.ttypes.HostAddr() self.host.read(iprot) else: iprot.skip(ftype) @@ -8246,7 +8246,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 7: if ftype == TType.STRUCT: - self.dir = nebula2.common.ttypes.DirInfo() + self.dir = nebula3.common.ttypes.DirInfo() self.dir.read(iprot) else: iprot.skip(ftype) @@ -8397,13 +8397,13 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.dir = nebula2.common.ttypes.DirInfo() + self.dir = nebula3.common.ttypes.DirInfo() self.dir.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.addr = nebula2.common.ttypes.HostAddr() + self.addr = nebula3.common.ttypes.HostAddr() self.addr.read(iprot) else: iprot.skip(ftype) @@ -8499,7 +8499,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.host = nebula2.common.ttypes.HostAddr() + self.host = nebula3.common.ttypes.HostAddr() self.host.read(iprot) else: iprot.skip(ftype) @@ -8605,7 +8605,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -9165,7 +9165,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -9339,7 +9339,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -9813,7 +9813,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -9987,7 +9987,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -10661,7 +10661,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -10850,7 +10850,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -11277,7 +11277,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRUCT: - self.value = nebula2.common.ttypes.Value() + self.value = nebula3.common.ttypes.Value() self.value.read(iprot) else: iprot.skip(ftype) @@ -11541,7 +11541,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -11816,7 +11816,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -12212,7 +12212,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -12486,7 +12486,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -12781,12 +12781,12 @@ def read(self, iprot): (_etype537, _size534) = iprot.readListBegin() if _size534 >= 0: for _i538 in range(_size534): - _elem539 = nebula2.common.ttypes.HostAddr() + _elem539 = nebula3.common.ttypes.HostAddr() _elem539.read(iprot) _val533.append(_elem539) else: while iprot.peekList(): - _elem540 = nebula2.common.ttypes.HostAddr() + _elem540 = nebula3.common.ttypes.HostAddr() _elem540.read(iprot) _val533.append(_elem540) iprot.readListEnd() @@ -12798,12 +12798,12 @@ def read(self, iprot): (_etype546, _size543) = iprot.readListBegin() if _size543 >= 0: for _i547 in range(_size543): - _elem548 = nebula2.common.ttypes.HostAddr() + _elem548 = nebula3.common.ttypes.HostAddr() _elem548.read(iprot) _val542.append(_elem548) else: while iprot.peekList(): - _elem549 = nebula2.common.ttypes.HostAddr() + _elem549 = nebula3.common.ttypes.HostAddr() _elem549.read(iprot) _val542.append(_elem549) iprot.readListEnd() @@ -12987,12 +12987,12 @@ def read(self, iprot): (_etype556, _size553) = iprot.readListBegin() if _size553 >= 0: for _i557 in range(_size553): - _elem558 = nebula2.common.ttypes.HostAddr() + _elem558 = nebula3.common.ttypes.HostAddr() _elem558.read(iprot) self.hosts.append(_elem558) else: while iprot.peekList(): - _elem559 = nebula2.common.ttypes.HostAddr() + _elem559 = nebula3.common.ttypes.HostAddr() _elem559.read(iprot) self.hosts.append(_elem559) iprot.readListEnd() @@ -13175,7 +13175,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -13185,12 +13185,12 @@ def read(self, iprot): (_etype564, _size561) = iprot.readListBegin() if _size561 >= 0: for _i565 in range(_size561): - _elem566 = nebula2.common.ttypes.HostAddr() + _elem566 = nebula3.common.ttypes.HostAddr() _elem566.read(iprot) self.hosts.append(_elem566) else: while iprot.peekList(): - _elem567 = nebula2.common.ttypes.HostAddr() + _elem567 = nebula3.common.ttypes.HostAddr() _elem567.read(iprot) self.hosts.append(_elem567) iprot.readListEnd() @@ -13348,12 +13348,12 @@ def read(self, iprot): (_etype572, _size569) = iprot.readListBegin() if _size569 >= 0: for _i573 in range(_size569): - _elem574 = nebula2.common.ttypes.HostAddr() + _elem574 = nebula3.common.ttypes.HostAddr() _elem574.read(iprot) self.nodes.append(_elem574) else: while iprot.peekList(): - _elem575 = nebula2.common.ttypes.HostAddr() + _elem575 = nebula3.common.ttypes.HostAddr() _elem575.read(iprot) self.nodes.append(_elem575) iprot.readListEnd() @@ -13446,7 +13446,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -13571,12 +13571,12 @@ def read(self, iprot): (_etype588, _size585) = iprot.readListBegin() if _size585 >= 0: for _i589 in range(_size585): - _elem590 = nebula2.common.ttypes.HostAddr() + _elem590 = nebula3.common.ttypes.HostAddr() _elem590.read(iprot) self.hosts.append(_elem590) else: while iprot.peekList(): - _elem591 = nebula2.common.ttypes.HostAddr() + _elem591 = nebula3.common.ttypes.HostAddr() _elem591.read(iprot) self.hosts.append(_elem591) iprot.readListEnd() @@ -13836,7 +13836,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.host = nebula2.common.ttypes.HostAddr() + self.host = nebula3.common.ttypes.HostAddr() self.host.read(iprot) else: iprot.skip(ftype) @@ -13950,7 +13950,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -14138,7 +14138,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -14234,7 +14234,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.host = nebula2.common.ttypes.HostAddr() + self.host = nebula3.common.ttypes.HostAddr() self.host.read(iprot) else: iprot.skip(ftype) @@ -14244,12 +14244,12 @@ def read(self, iprot): (_etype604, _size601) = iprot.readListBegin() if _size601 >= 0: for _i605 in range(_size601): - _elem606 = nebula2.common.ttypes.CheckpointInfo() + _elem606 = nebula3.common.ttypes.CheckpointInfo() _elem606.read(iprot) self.checkpoints.append(_elem606) else: while iprot.peekList(): - _elem607 = nebula2.common.ttypes.CheckpointInfo() + _elem607 = nebula3.common.ttypes.CheckpointInfo() _elem607.read(iprot) self.checkpoints.append(_elem607) iprot.readListEnd() @@ -14702,7 +14702,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -14798,13 +14798,13 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.from_host = nebula2.common.ttypes.HostAddr() + self.from_host = nebula3.common.ttypes.HostAddr() self.from_host.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.to_host = nebula2.common.ttypes.HostAddr() + self.to_host = nebula3.common.ttypes.HostAddr() self.to_host.read(iprot) else: iprot.skip(ftype) @@ -15002,7 +15002,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.host = nebula2.common.ttypes.HostAddr() + self.host = nebula3.common.ttypes.HostAddr() self.host.read(iprot) else: iprot.skip(ftype) @@ -15366,7 +15366,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -15510,7 +15510,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.depend_schema = nebula2.common.ttypes.SchemaID() + self.depend_schema = nebula3.common.ttypes.SchemaID() self.depend_schema.read(iprot) else: iprot.skip(ftype) @@ -15851,7 +15851,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -15987,7 +15987,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 5: if ftype == TType.STRUCT: - self.graph_addr = nebula2.common.ttypes.HostAddr() + self.graph_addr = nebula3.common.ttypes.HostAddr() self.graph_addr.read(iprot) else: iprot.skip(ftype) @@ -16126,7 +16126,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 6: if ftype == TType.STRUCT: - self.graph_addr = nebula2.common.ttypes.HostAddr() + self.graph_addr = nebula3.common.ttypes.HostAddr() self.graph_addr.read(iprot) else: iprot.skip(ftype) @@ -16147,13 +16147,13 @@ def read(self, iprot): if _size713 >= 0: for _i717 in range(_size713): _key718 = iprot.readString() - _val719 = nebula2.common.ttypes.Value() + _val719 = nebula3.common.ttypes.Value() _val719.read(iprot) self.configs[_key718] = _val719 else: while iprot.peekMap(): _key720 = iprot.readString() - _val721 = nebula2.common.ttypes.Value() + _val721 = nebula3.common.ttypes.Value() _val721.read(iprot) self.configs[_key720] = _val721 iprot.readMapEnd() @@ -16334,7 +16334,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.graph_addr = nebula2.common.ttypes.HostAddr() + self.graph_addr = nebula3.common.ttypes.HostAddr() self.graph_addr.read(iprot) else: iprot.skip(ftype) @@ -16435,7 +16435,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -16624,7 +16624,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -16827,7 +16827,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -17015,7 +17015,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -17415,7 +17415,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -17612,7 +17612,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.dir = nebula2.common.ttypes.DirInfo() + self.dir = nebula3.common.ttypes.DirInfo() self.dir.read(iprot) else: iprot.skip(ftype) @@ -17754,7 +17754,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -17855,7 +17855,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.host = nebula2.common.ttypes.HostAddr() + self.host = nebula3.common.ttypes.HostAddr() self.host.read(iprot) else: iprot.skip(ftype) @@ -17967,7 +17967,7 @@ def ID__init__(self, space_id=None, tag_id=None, edge_type=None, index_id=None, all_structs.append(ColumnTypeDef) ColumnTypeDef.thrift_spec = ( None, # 0 - (1, TType.I32, 'type', nebula2.common.ttypes.PropertyType, None, 0, ), # 1 + (1, TType.I32, 'type', nebula3.common.ttypes.PropertyType, None, 0, ), # 1 (2, TType.I16, 'type_length', None, 0, 1, ), # 2 (3, TType.I32, 'geo_shape', GeoShape, None, 1, ), # 3 ) @@ -18314,7 +18314,7 @@ def IndexParams__setstate__(self, state): None, # 0 (1, TType.I32, 'index_id', None, None, 2, ), # 1 (2, TType.STRING, 'index_name', False, None, 2, ), # 2 - (3, TType.STRUCT, 'schema_id', [nebula2.common.ttypes.SchemaID, nebula2.common.ttypes.SchemaID.thrift_spec, True], None, 2, ), # 3 + (3, TType.STRUCT, 'schema_id', [nebula3.common.ttypes.SchemaID, nebula3.common.ttypes.SchemaID.thrift_spec, True], None, 2, ), # 3 (4, TType.STRING, 'schema_name', False, None, 2, ), # 4 (5, TType.LIST, 'fields', (TType.STRUCT,[ColumnDef, ColumnDef.thrift_spec, False]), None, 2, ), # 5 (6, TType.STRING, 'comment', False, None, 1, ), # 6 @@ -18353,7 +18353,7 @@ def IndexItem__setstate__(self, state): all_structs.append(HostItem) HostItem.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'hostAddr', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 1 + (1, TType.STRUCT, 'hostAddr', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 1 (2, TType.I32, 'status', HostStatus, None, 2, ), # 2 (3, TType.MAP, 'leader_parts', (TType.STRING,False,TType.LIST,(TType.I32,None)), None, 2, ), # 3 (4, TType.MAP, 'all_parts', (TType.STRING,False,TType.LIST,(TType.I32,None)), None, 2, ), # 4 @@ -18464,9 +18464,9 @@ def RoleItem__setstate__(self, state): all_structs.append(ExecResp) ExecResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 (2, TType.STRUCT, 'id', [ID, ID.thrift_spec, True], None, 2, ), # 2 - (3, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 3 + (3, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 3 ) ExecResp.thrift_struct_annotations = { @@ -18590,7 +18590,7 @@ def JobDesc__setstate__(self, state): TaskDesc.thrift_spec = ( None, # 0 (1, TType.I32, 'task_id', None, None, 2, ), # 1 - (2, TType.STRUCT, 'host', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (2, TType.STRUCT, 'host', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.I32, 'status', JobStatus, None, 2, ), # 3 (4, TType.I64, 'start_time', None, None, 2, ), # 4 (5, TType.I64, 'stop_time', None, None, 2, ), # 5 @@ -18659,8 +18659,8 @@ def AdminJobResult__setstate__(self, state): all_structs.append(AdminJobResp) AdminJobResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRUCT, 'result', [AdminJobResult, AdminJobResult.thrift_spec, False], None, 2, ), # 3 ) @@ -18842,8 +18842,8 @@ def DropSpaceReq__setstate__(self, state): all_structs.append(ListSpacesResp) ListSpacesResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'spaces', (TType.STRUCT,[IdName, IdName.thrift_spec, False]), None, 2, ), # 3 ) @@ -18894,8 +18894,8 @@ def GetSpaceReq__setstate__(self, state): all_structs.append(GetSpaceResp) GetSpaceResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRUCT, 'item', [SpaceItem, SpaceItem.thrift_spec, False], None, 2, ), # 3 ) @@ -19039,8 +19039,8 @@ def ListTagsReq__setstate__(self, state): all_structs.append(ListTagsResp) ListTagsResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'tags', (TType.STRUCT,[TagItem, TagItem.thrift_spec, False]), None, 2, ), # 3 ) @@ -19097,8 +19097,8 @@ def GetTagReq__setstate__(self, state): all_structs.append(GetTagResp) GetTagResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRUCT, 'schema', [Schema, Schema.thrift_spec, False], None, 2, ), # 3 ) @@ -19219,8 +19219,8 @@ def GetEdgeReq__setstate__(self, state): all_structs.append(GetEdgeResp) GetEdgeResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRUCT, 'schema', [Schema, Schema.thrift_spec, False], None, 2, ), # 3 ) @@ -19300,8 +19300,8 @@ def ListEdgesReq__setstate__(self, state): all_structs.append(ListEdgesResp) ListEdgesResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'edges', (TType.STRUCT,[EdgeItem, EdgeItem.thrift_spec, False]), None, 2, ), # 3 ) @@ -19329,7 +19329,7 @@ def ListEdgesResp__setstate__(self, state): all_structs.append(AddHostsReq) AddHostsReq.thrift_spec = ( None, # 0 - (1, TType.LIST, 'hosts', (TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 1 + (1, TType.LIST, 'hosts', (TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 1 ) AddHostsReq.thrift_struct_annotations = { @@ -19352,7 +19352,7 @@ def AddHostsReq__setstate__(self, state): all_structs.append(DropHostsReq) DropHostsReq.thrift_spec = ( None, # 0 - (1, TType.LIST, 'hosts', (TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 1 + (1, TType.LIST, 'hosts', (TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 1 ) DropHostsReq.thrift_struct_annotations = { @@ -19398,8 +19398,8 @@ def ListHostsReq__setstate__(self, state): all_structs.append(ListHostsResp) ListHostsResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'hosts', (TType.STRUCT,[HostItem, HostItem.thrift_spec, False]), None, 2, ), # 3 ) @@ -19428,9 +19428,9 @@ def ListHostsResp__setstate__(self, state): PartItem.thrift_spec = ( None, # 0 (1, TType.I32, 'part_id', None, None, 0, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 1, ), # 2 - (3, TType.LIST, 'peers', (TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False]), None, 0, ), # 3 - (4, TType.LIST, 'losts', (TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False]), None, 0, ), # 4 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 1, ), # 2 + (3, TType.LIST, 'peers', (TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False]), None, 0, ), # 3 + (4, TType.LIST, 'losts', (TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False]), None, 0, ), # 4 ) PartItem.thrift_struct_annotations = { @@ -19485,8 +19485,8 @@ def ListPartsReq__setstate__(self, state): all_structs.append(ListPartsResp) ListPartsResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'parts', (TType.STRUCT,[PartItem, PartItem.thrift_spec, False]), None, 2, ), # 3 ) @@ -19537,9 +19537,9 @@ def GetPartsAllocReq__setstate__(self, state): all_structs.append(GetPartsAllocResp) GetPartsAllocResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 - (3, TType.MAP, 'parts', (TType.I32,None,TType.LIST,(TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False])), None, 2, ), # 3 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (3, TType.MAP, 'parts', (TType.I32,None,TType.LIST,(TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False])), None, 2, ), # 3 (4, TType.MAP, 'terms', (TType.I32,None,TType.I64,None), None, 1, ), # 4 ) @@ -19592,8 +19592,8 @@ def GetWorkerIdReq__setstate__(self, state): all_structs.append(GetWorkerIdResp) GetWorkerIdResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.I64, 'workerid', None, None, 2, ), # 3 ) @@ -19622,7 +19622,7 @@ def GetWorkerIdResp__setstate__(self, state): MultiPutReq.thrift_spec = ( None, # 0 (1, TType.STRING, 'segment', False, None, 2, ), # 1 - (2, TType.LIST, 'pairs', (TType.STRUCT,[nebula2.common.ttypes.KeyValue, nebula2.common.ttypes.KeyValue.thrift_spec, False]), None, 2, ), # 2 + (2, TType.LIST, 'pairs', (TType.STRUCT,[nebula3.common.ttypes.KeyValue, nebula3.common.ttypes.KeyValue.thrift_spec, False]), None, 2, ), # 2 ) MultiPutReq.thrift_struct_annotations = { @@ -19673,8 +19673,8 @@ def GetReq__setstate__(self, state): all_structs.append(GetResp) GetResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRING, 'value', False, None, 2, ), # 3 ) @@ -19728,8 +19728,8 @@ def MultiGetReq__setstate__(self, state): all_structs.append(MultiGetResp) MultiGetResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'values', (TType.STRING,False), None, 2, ), # 3 ) @@ -19841,8 +19841,8 @@ def ScanReq__setstate__(self, state): all_structs.append(ScanResp) ScanResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'values', (TType.STRING,False), None, 2, ), # 3 ) @@ -19870,8 +19870,8 @@ def ScanResp__setstate__(self, state): all_structs.append(HBResp) HBResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.I64, 'cluster_id', None, None, 2, ), # 3 (4, TType.I64, 'last_update_time_in_ms', None, None, 2, ), # 4 (5, TType.I32, 'meta_version', None, None, 2, ), # 5 @@ -19955,12 +19955,12 @@ def PartitionList__setstate__(self, state): HBReq.thrift_spec = ( None, # 0 (1, TType.I32, 'role', HostRole, None, 2, ), # 1 - (2, TType.STRUCT, 'host', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (2, TType.STRUCT, 'host', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.I64, 'cluster_id', None, None, 2, ), # 3 (4, TType.MAP, 'leader_partIds', (TType.I32,None,TType.LIST,(TType.STRUCT,[LeaderInfo, LeaderInfo.thrift_spec, False])), None, 1, ), # 4 (5, TType.STRING, 'git_info_sha', False, None, 2, ), # 5 (6, TType.MAP, 'disk_parts', (TType.I32,None,TType.MAP,(TType.STRING,False,TType.STRUCT,[PartitionList, PartitionList.thrift_spec, False])), None, 1, ), # 6 - (7, TType.STRUCT, 'dir', [nebula2.common.ttypes.DirInfo, nebula2.common.ttypes.DirInfo.thrift_spec, False], None, 1, ), # 7 + (7, TType.STRUCT, 'dir', [nebula3.common.ttypes.DirInfo, nebula3.common.ttypes.DirInfo.thrift_spec, False], None, 1, ), # 7 (8, TType.STRING, 'version', False, None, 1, ), # 8 ) @@ -19998,8 +19998,8 @@ def HBReq__setstate__(self, state): all_structs.append(ServiceInfo) ServiceInfo.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'dir', [nebula2.common.ttypes.DirInfo, nebula2.common.ttypes.DirInfo.thrift_spec, False], None, 2, ), # 1 - (2, TType.STRUCT, 'addr', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.STRUCT, 'dir', [nebula3.common.ttypes.DirInfo, nebula3.common.ttypes.DirInfo.thrift_spec, False], None, 2, ), # 1 + (2, TType.STRUCT, 'addr', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.I32, 'role', HostRole, None, 2, ), # 3 ) @@ -20027,7 +20027,7 @@ def ServiceInfo__setstate__(self, state): all_structs.append(AgentHBReq) AgentHBReq.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'host', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 1 + (1, TType.STRUCT, 'host', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 1 (2, TType.STRING, 'git_info_sha', False, None, 2, ), # 2 (3, TType.STRING, 'version', False, None, 1, ), # 3 ) @@ -20056,8 +20056,8 @@ def AgentHBReq__setstate__(self, state): all_structs.append(AgentHBResp) AgentHBResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'service_list', (TType.STRUCT,[ServiceInfo, ServiceInfo.thrift_spec, False]), None, 2, ), # 3 ) @@ -20207,8 +20207,8 @@ def GetTagIndexReq__setstate__(self, state): all_structs.append(GetTagIndexResp) GetTagIndexResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRUCT, 'item', [IndexItem, IndexItem.thrift_spec, False], None, 2, ), # 3 ) @@ -20259,8 +20259,8 @@ def ListTagIndexesReq__setstate__(self, state): all_structs.append(ListTagIndexesResp) ListTagIndexesResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'items', (TType.STRUCT,[IndexItem, IndexItem.thrift_spec, False]), None, 2, ), # 3 ) @@ -20384,8 +20384,8 @@ def GetEdgeIndexReq__setstate__(self, state): all_structs.append(GetEdgeIndexResp) GetEdgeIndexResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRUCT, 'item', [IndexItem, IndexItem.thrift_spec, False], None, 2, ), # 3 ) @@ -20436,8 +20436,8 @@ def ListEdgeIndexesReq__setstate__(self, state): all_structs.append(ListEdgeIndexesResp) ListEdgeIndexesResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'items', (TType.STRUCT,[IndexItem, IndexItem.thrift_spec, False]), None, 2, ), # 3 ) @@ -20627,8 +20627,8 @@ def RevokeRoleReq__setstate__(self, state): all_structs.append(ListUsersResp) ListUsersResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.MAP, 'users', (TType.STRING,False,TType.STRING,False), None, 2, ), # 3 ) @@ -20679,8 +20679,8 @@ def ListRolesReq__setstate__(self, state): all_structs.append(ListRolesResp) ListRolesResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'roles', (TType.STRUCT,[RoleItem, RoleItem.thrift_spec, False]), None, 2, ), # 3 ) @@ -20798,7 +20798,7 @@ def BalanceTask__setstate__(self, state): (1, TType.I32, 'module', ConfigModule, None, 2, ), # 1 (2, TType.STRING, 'name', False, None, 2, ), # 2 (3, TType.I32, 'mode', ConfigMode, None, 2, ), # 3 - (4, TType.STRUCT, 'value', [nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True], None, 2, ), # 4 + (4, TType.STRUCT, 'value', [nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True], None, 2, ), # 4 ) ConfigItem.thrift_struct_annotations = { @@ -20873,8 +20873,8 @@ def GetConfigReq__setstate__(self, state): all_structs.append(GetConfigResp) GetConfigResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'items', (TType.STRUCT,[ConfigItem, ConfigItem.thrift_spec, False]), None, 2, ), # 3 ) @@ -20951,8 +20951,8 @@ def ListConfigsReq__setstate__(self, state): all_structs.append(ListConfigsResp) ListConfigsResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'items', (TType.STRUCT,[ConfigItem, ConfigItem.thrift_spec, False]), None, 2, ), # 3 ) @@ -21050,8 +21050,8 @@ def Snapshot__setstate__(self, state): all_structs.append(ListSnapshotsResp) ListSnapshotsResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'snapshots', (TType.STRUCT,[Snapshot, Snapshot.thrift_spec, False]), None, 2, ), # 3 ) @@ -21128,8 +21128,8 @@ def IndexStatus__setstate__(self, state): all_structs.append(ListIndexStatusResp) ListIndexStatusResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'statuses', (TType.STRUCT,[IndexStatus, IndexStatus.thrift_spec, False]), None, 2, ), # 3 ) @@ -21207,7 +21207,7 @@ def DropZoneReq__setstate__(self, state): DivideZoneReq.thrift_spec = ( None, # 0 (1, TType.STRING, 'zone_name', False, None, 2, ), # 1 - (2, TType.MAP, 'zone_items', (TType.STRING,False,TType.LIST,(TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False])), None, 2, ), # 2 + (2, TType.MAP, 'zone_items', (TType.STRING,False,TType.LIST,(TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False])), None, 2, ), # 2 ) DivideZoneReq.thrift_struct_annotations = { @@ -21258,7 +21258,7 @@ def RenameZoneReq__setstate__(self, state): all_structs.append(AddHostsIntoZoneReq) AddHostsIntoZoneReq.thrift_spec = ( None, # 0 - (1, TType.LIST, 'hosts', (TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 1 + (1, TType.LIST, 'hosts', (TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 1 (2, TType.STRING, 'zone_name', False, None, 2, ), # 2 (3, TType.BOOL, 'is_new', None, None, 2, ), # 3 ) @@ -21310,9 +21310,9 @@ def GetZoneReq__setstate__(self, state): all_structs.append(GetZoneResp) GetZoneResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 - (3, TType.LIST, 'hosts', (TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 3 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (3, TType.LIST, 'hosts', (TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 3 ) GetZoneResp.thrift_struct_annotations = { @@ -21349,7 +21349,7 @@ def GetZoneResp__setstate__(self, state): Zone.thrift_spec = ( None, # 0 (1, TType.STRING, 'zone_name', False, None, 2, ), # 1 - (2, TType.LIST, 'nodes', (TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 2 + (2, TType.LIST, 'nodes', (TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 2 ) Zone.thrift_struct_annotations = { @@ -21374,8 +21374,8 @@ def Zone__setstate__(self, state): all_structs.append(ListZonesResp) ListZonesResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'zones', (TType.STRUCT,[Zone, Zone.thrift_spec, False]), None, 2, ), # 3 ) @@ -21405,7 +21405,7 @@ def ListZonesResp__setstate__(self, state): None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 (2, TType.I32, 'type', ListenerType, None, 2, ), # 2 - (3, TType.LIST, 'hosts', (TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 3 + (3, TType.LIST, 'hosts', (TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 3 ) AddListenerReq.thrift_struct_annotations = { @@ -21482,7 +21482,7 @@ def ListListenerReq__setstate__(self, state): ListenerInfo.thrift_spec = ( None, # 0 (1, TType.I32, 'type', ListenerType, None, 2, ), # 1 - (2, TType.STRUCT, 'host', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (2, TType.STRUCT, 'host', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.I32, 'part_id', None, None, 2, ), # 3 (4, TType.I32, 'status', HostStatus, None, 2, ), # 4 ) @@ -21513,8 +21513,8 @@ def ListenerInfo__setstate__(self, state): all_structs.append(ListListenerResp) ListListenerResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'listeners', (TType.STRUCT,[ListenerInfo, ListenerInfo.thrift_spec, False]), None, 2, ), # 3 ) @@ -21565,8 +21565,8 @@ def GetStatsReq__setstate__(self, state): all_structs.append(GetStatsResp) GetStatsResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRUCT, 'stats', [StatsItem, StatsItem.thrift_spec, False], None, 2, ), # 3 ) @@ -21594,8 +21594,8 @@ def GetStatsResp__setstate__(self, state): all_structs.append(HostBackupInfo) HostBackupInfo.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'host', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 1 - (2, TType.LIST, 'checkpoints', (TType.STRUCT,[nebula2.common.ttypes.CheckpointInfo, nebula2.common.ttypes.CheckpointInfo.thrift_spec, False]), None, 2, ), # 2 + (1, TType.STRUCT, 'host', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 1 + (2, TType.LIST, 'checkpoints', (TType.STRUCT,[nebula3.common.ttypes.CheckpointInfo, nebula3.common.ttypes.CheckpointInfo.thrift_spec, False]), None, 2, ), # 2 ) HostBackupInfo.thrift_struct_annotations = { @@ -21707,8 +21707,8 @@ def CreateBackupReq__setstate__(self, state): all_structs.append(CreateBackupResp) CreateBackupResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRUCT, 'meta', [BackupMeta, BackupMeta.thrift_spec, False], None, 2, ), # 3 ) @@ -21736,8 +21736,8 @@ def CreateBackupResp__setstate__(self, state): all_structs.append(HostPair) HostPair.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'from_host', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 1 - (2, TType.STRUCT, 'to_host', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.STRUCT, 'from_host', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 1 + (2, TType.STRUCT, 'to_host', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 ) HostPair.thrift_struct_annotations = { @@ -21788,7 +21788,7 @@ def RestoreMetaReq__setstate__(self, state): all_structs.append(ServiceClient) ServiceClient.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'host', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 0, ), # 1 + (1, TType.STRUCT, 'host', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 0, ), # 1 (2, TType.STRING, 'user', False, None, 1, ), # 2 (3, TType.STRING, 'pwd', False, None, 1, ), # 3 (4, TType.STRING, 'conn_type', False, None, 1, ), # 4 @@ -21892,8 +21892,8 @@ def ListServiceClientsReq__setstate__(self, state): all_structs.append(ListServiceClientsResp) ListServiceClientsResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.MAP, 'clients', (TType.I32,ExternalServiceType,TType.LIST,(TType.STRUCT,[ServiceClient, ServiceClient.thrift_spec, False])), None, 2, ), # 3 ) @@ -21922,7 +21922,7 @@ def ListServiceClientsResp__setstate__(self, state): FTIndex.thrift_spec = ( None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 - (2, TType.STRUCT, 'depend_schema', [nebula2.common.ttypes.SchemaID, nebula2.common.ttypes.SchemaID.thrift_spec, True], None, 2, ), # 2 + (2, TType.STRUCT, 'depend_schema', [nebula3.common.ttypes.SchemaID, nebula3.common.ttypes.SchemaID.thrift_spec, True], None, 2, ), # 2 (3, TType.LIST, 'fields', (TType.STRING,False), None, 2, ), # 3 ) @@ -22011,8 +22011,8 @@ def DropFTIndexReq__setstate__(self, state): all_structs.append(ListFTIndexesResp) ListFTIndexesResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.MAP, 'indexes', (TType.STRING,False,TType.STRUCT,[FTIndex, FTIndex.thrift_spec, False]), None, 2, ), # 3 ) @@ -22044,7 +22044,7 @@ def ListFTIndexesResp__setstate__(self, state): (2, TType.I32, 'status', QueryStatus, None, 2, ), # 2 (3, TType.I64, 'duration', None, None, 2, ), # 3 (4, TType.STRING, 'query', False, None, 2, ), # 4 - (5, TType.STRUCT, 'graph_addr', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 5 + (5, TType.STRUCT, 'graph_addr', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 5 ) QueryDesc.thrift_struct_annotations = { @@ -22080,10 +22080,10 @@ def QueryDesc__setstate__(self, state): (3, TType.I64, 'update_time', None, None, 2, ), # 3 (4, TType.STRING, 'user_name', False, None, 2, ), # 4 (5, TType.STRING, 'space_name', False, None, 2, ), # 5 - (6, TType.STRUCT, 'graph_addr', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 6 + (6, TType.STRUCT, 'graph_addr', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 6 (7, TType.I32, 'timezone', None, None, 2, ), # 7 (8, TType.STRING, 'client_ip', False, None, 2, ), # 8 - (9, TType.MAP, 'configs', (TType.STRING,False,TType.STRUCT,[nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 9 + (9, TType.MAP, 'configs', (TType.STRING,False,TType.STRUCT,[nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 9 (10, TType.MAP, 'queries', (TType.I64,None,TType.STRUCT,[QueryDesc, QueryDesc.thrift_spec, False]), None, 2, ), # 10 ) @@ -22126,7 +22126,7 @@ def Session__setstate__(self, state): CreateSessionReq.thrift_spec = ( None, # 0 (1, TType.STRING, 'user', False, None, 2, ), # 1 - (2, TType.STRUCT, 'graph_addr', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (2, TType.STRUCT, 'graph_addr', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRING, 'client_ip', False, None, 2, ), # 3 ) @@ -22154,8 +22154,8 @@ def CreateSessionReq__setstate__(self, state): all_structs.append(CreateSessionResp) CreateSessionResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRUCT, 'session', [Session, Session.thrift_spec, False], None, 2, ), # 3 ) @@ -22206,8 +22206,8 @@ def UpdateSessionsReq__setstate__(self, state): all_structs.append(UpdateSessionsResp) UpdateSessionsResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.MAP, 'killed_queries', (TType.I64,None,TType.MAP,(TType.I64,None,TType.STRUCT,[QueryDesc, QueryDesc.thrift_spec, False])), None, 2, ), # 3 ) @@ -22244,8 +22244,8 @@ def UpdateSessionsResp__setstate__(self, state): all_structs.append(ListSessionsResp) ListSessionsResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.LIST, 'sessions', (TType.STRUCT,[Session, Session.thrift_spec, False]), None, 2, ), # 3 ) @@ -22296,8 +22296,8 @@ def GetSessionReq__setstate__(self, state): all_structs.append(GetSessionResp) GetSessionResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRUCT, 'session', [Session, Session.thrift_spec, False], None, 2, ), # 3 ) @@ -22371,7 +22371,7 @@ def KillQueryReq__setstate__(self, state): all_structs.append(ReportTaskReq) ReportTaskReq.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 (2, TType.I32, 'job_id', None, None, 2, ), # 2 (3, TType.I32, 'task_id', None, None, 2, ), # 3 (4, TType.STRUCT, 'stats', [StatsItem, StatsItem.thrift_spec, False], None, 1, ), # 4 @@ -22403,8 +22403,8 @@ def ReportTaskReq__setstate__(self, state): all_structs.append(ListClusterInfoResp) ListClusterInfoResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.MAP, 'host_services', (TType.STRING,True,TType.LIST,(TType.STRUCT,[ServiceInfo, ServiceInfo.thrift_spec, False])), None, 2, ), # 3 ) @@ -22441,8 +22441,8 @@ def ListClusterInfoResp__setstate__(self, state): all_structs.append(GetMetaDirInfoResp) GetMetaDirInfoResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'dir', [nebula2.common.ttypes.DirInfo, nebula2.common.ttypes.DirInfo.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'dir', [nebula3.common.ttypes.DirInfo, nebula3.common.ttypes.DirInfo.thrift_spec, False], None, 2, ), # 2 ) GetMetaDirInfoResp.thrift_struct_annotations = { @@ -22476,8 +22476,8 @@ def GetMetaDirInfoResp__setstate__(self, state): all_structs.append(VerifyClientVersionResp) VerifyClientVersionResp.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 2, ), # 1 - (2, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 2, ), # 1 + (2, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRING, 'error_msg', False, None, 1, ), # 3 ) @@ -22505,8 +22505,8 @@ def VerifyClientVersionResp__setstate__(self, state): all_structs.append(VerifyClientVersionReq) VerifyClientVersionReq.thrift_spec = ( None, # 0 - (1, TType.STRING, 'client_version', False, "2.6.0", 0, ), # 1 - (2, TType.STRUCT, 'host', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 + (1, TType.STRING, 'client_version', False, "3.0.0", 0, ), # 1 + (2, TType.STRUCT, 'host', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 2 (3, TType.STRING, 'build_version', False, None, 2, ), # 3 ) @@ -22523,7 +22523,7 @@ def VerifyClientVersionReq__init__(self, client_version=VerifyClientVersionReq.t VerifyClientVersionReq.__init__ = VerifyClientVersionReq__init__ def VerifyClientVersionReq__setstate__(self, state): - state.setdefault('client_version', "2.6.0") + state.setdefault('client_version', "3.0.0") state.setdefault('host', None) state.setdefault('build_version', None) self.__dict__ = state diff --git a/nebula2/sclient/BaseResult.py b/nebula3/sclient/BaseResult.py similarity index 98% rename from nebula2/sclient/BaseResult.py rename to nebula3/sclient/BaseResult.py index 0b636d19..d444e68c 100644 --- a/nebula2/sclient/BaseResult.py +++ b/nebula3/sclient/BaseResult.py @@ -6,9 +6,9 @@ # This source code is licensed under Apache 2.0 License. -from nebula2.common import ttypes -from nebula2.common.ttypes import Vertex, Tag, Edge -from nebula2.data.DataObject import DataSetWrapper, Node, ValueWrapper, Relationship +from nebula3.common import ttypes +from nebula3.common.ttypes import Vertex, Tag, Edge +from nebula3.data.DataObject import DataSetWrapper, Node, ValueWrapper, Relationship class VertexData(object): diff --git a/nebula2/sclient/GraphStorageClient.py b/nebula3/sclient/GraphStorageClient.py similarity index 98% rename from nebula2/sclient/GraphStorageClient.py rename to nebula3/sclient/GraphStorageClient.py index d0b8ec82..f6d64d40 100644 --- a/nebula2/sclient/GraphStorageClient.py +++ b/nebula3/sclient/GraphStorageClient.py @@ -12,16 +12,16 @@ """ import sys -from nebula2.sclient.ScanResult import ScanResult -from nebula2.sclient.net import GraphStorageConnection -from nebula2.storage.ttypes import ( +from nebula3.sclient.ScanResult import ScanResult +from nebula3.sclient.net import GraphStorageConnection +from nebula3.storage.ttypes import ( ScanCursor, ScanEdgeRequest, ScanVertexRequest, VertexProp, EdgeProp, ) -from nebula2.logger import logger +from nebula3.logger import logger kVid = b'_vid' kSrc = b'_src' diff --git a/nebula2/sclient/ScanResult.py b/nebula3/sclient/ScanResult.py similarity index 96% rename from nebula2/sclient/ScanResult.py rename to nebula3/sclient/ScanResult.py index 92523c6e..77ab9fe6 100644 --- a/nebula2/sclient/ScanResult.py +++ b/nebula3/sclient/ScanResult.py @@ -8,10 +8,10 @@ import concurrent -from nebula2.sclient import PartManager, do_scan_job, PartInfo +from nebula3.sclient import PartManager, do_scan_job, PartInfo -from nebula2.sclient.BaseResult import BaseResult, VertexData, EdgeData -from nebula2.logger import logger +from nebula3.sclient.BaseResult import BaseResult, VertexData, EdgeData +from nebula3.logger import logger class VertexResult(BaseResult): diff --git a/nebula2/sclient/__init__.py b/nebula3/sclient/__init__.py similarity index 98% rename from nebula2/sclient/__init__.py rename to nebula3/sclient/__init__.py index 719c12c4..ab4cf0c6 100644 --- a/nebula2/sclient/__init__.py +++ b/nebula3/sclient/__init__.py @@ -10,9 +10,9 @@ from threading import RLock, Condition -from nebula2.common.ttypes import HostAddr, ErrorCode -from nebula2.storage.ttypes import ScanCursor -from nebula2.logger import logger +from nebula3.common.ttypes import HostAddr, ErrorCode +from nebula3.storage.ttypes import ScanCursor +from nebula3.logger import logger class PartInfo(object): diff --git a/nebula2/sclient/net/__init__.py b/nebula3/sclient/net/__init__.py similarity index 86% rename from nebula2/sclient/net/__init__.py rename to nebula3/sclient/net/__init__.py index cd781935..2c9f3f8a 100644 --- a/nebula2/sclient/net/__init__.py +++ b/nebula3/sclient/net/__init__.py @@ -8,11 +8,11 @@ import socket -from nebula2.Exception import InValidHostname -from nebula2.storage import GraphStorageService -from nebula2.storage.ttypes import ScanVertexRequest, ScanEdgeRequest -from nebula2.fbthrift.transport import TSocket, TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol +from nebula3.Exception import InValidHostname +from nebula3.storage import GraphStorageService +from nebula3.storage.ttypes import ScanVertexRequest, ScanEdgeRequest +from nebula3.fbthrift.transport import TSocket, TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol class GraphStorageConnection(object): diff --git a/nebula2/storage/GraphStorageService-fuzzer b/nebula3/storage/GraphStorageService-fuzzer similarity index 92% rename from nebula2/storage/GraphStorageService-fuzzer rename to nebula3/storage/GraphStorageService-fuzzer index fd285d56..f8851cbb 100755 --- a/nebula2/storage/GraphStorageService-fuzzer +++ b/nebula3/storage/GraphStorageService-fuzzer @@ -41,5 +41,5 @@ from . import GraphStorageService from . import ttypes from . import constants -import nebula2.fbthrift.util.fuzzer -nebula2.fbthrift.util.fuzzer.fuzz_service(GraphStorageService, ttypes, constants) +import nebula3.fbthrift.util.fuzzer +nebula3.fbthrift.util.fuzzer.fuzz_service(GraphStorageService, ttypes, constants) diff --git a/nebula2/storage/GraphStorageService-remote b/nebula3/storage/GraphStorageService-remote similarity index 97% rename from nebula2/storage/GraphStorageService-remote rename to nebula3/storage/GraphStorageService-remote index c80d810d..60d0f6da 100755 --- a/nebula2/storage/GraphStorageService-remote +++ b/nebula3/storage/GraphStorageService-remote @@ -38,8 +38,8 @@ if (not sys.argv[0].endswith("par") and from . import GraphStorageService from . import ttypes -from nebula2.fbthrift.util.remote import Function -from nebula2.fbthrift.remote import Remote +from nebula3.fbthrift.util.remote import Function +from nebula3.fbthrift.remote import Remote FUNCTIONS = { 'getNeighbors': Function('getNeighbors', 'GraphStorageService', 'GetNeighborsResponse', [('GetNeighborsRequest', 'req', 'GetNeighborsRequest')]), diff --git a/nebula2/storage/GraphStorageService.py b/nebula3/storage/GraphStorageService.py similarity index 99% rename from nebula2/storage/GraphStorageService.py rename to nebula3/storage/GraphStorageService.py index 364a81d5..f90d0fdd 100644 --- a/nebula2/storage/GraphStorageService.py +++ b/nebula3/storage/GraphStorageService.py @@ -7,33 +7,33 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException from .ttypes import UTF8STRINGS, StatType, OrderDirection, EdgeDirection, ScanType, EngineSignType, RequestCommon, PartitionResult, ResponseCommon, StatProp, Expr, EdgeProp, VertexProp, OrderBy, TraverseSpec, GetNeighborsRequest, GetNeighborsResponse, ExecResponse, GetPropRequest, GetPropResponse, NewTag, NewVertex, EdgeKey, NewEdge, AddVerticesRequest, AddEdgesRequest, DeleteVerticesRequest, DeleteEdgesRequest, DelTags, DeleteTagsRequest, UpdateResponse, UpdatedProp, UpdateVertexRequest, UpdateEdgeRequest, GetUUIDReq, GetUUIDResp, LookupIndexResp, IndexColumnHint, IndexQueryContext, IndexSpec, LookupIndexRequest, LookupAndTraverseRequest, ScanCursor, ScanVertexRequest, ScanEdgeRequest, ScanResponse, TaskPara, KVGetRequest, KVGetResponse, KVPutRequest, KVRemoveRequest, AdminExecResp, TransLeaderReq, AddPartReq, AddLearnerReq, RemovePartReq, MemberChangeReq, CatchUpDataReq, GetLeaderReq, CreateCPRequest, DropCPRequest, BlockingSignRequest, GetLeaderPartsResp, CheckPeersReq, RebuildIndexRequest, CreateCPResp, ListClusterInfoResp, ListClusterInfoReq, AddAdminTaskRequest, StopAdminTaskRequest, ChainAddEdgesRequest, ChainUpdateEdgeRequest, ChainDeleteEdgesRequest -import nebula2.common.ttypes -import nebula2.meta.ttypes +import nebula3.common.ttypes +import nebula3.meta.ttypes -from nebula2.fbthrift.Thrift import TProcessor +from nebula3.fbthrift.Thrift import TProcessor import pprint import warnings -from nebula2.fbthrift import Thrift -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.fbthrift.protocol import TCompactProtocol -from nebula2.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift import Thrift +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.protocol import TCompactProtocol +from nebula3.fbthrift.protocol import THeaderProtocol fastproto = None try: - from nebula2.fbthrift.protocol import fastproto + from nebula3.fbthrift.protocol import fastproto except ImportError: pass all_structs = [] UTF8STRINGS = bool(0) or sys.version_info.major >= 3 -from nebula2.fbthrift.util.Decorators import ( +from nebula3.fbthrift.util.Decorators import ( future_process_main, future_process_method, process_main as thrift_process_main, diff --git a/nebula2/storage/StorageAdminService-fuzzer b/nebula3/storage/StorageAdminService-fuzzer similarity index 92% rename from nebula2/storage/StorageAdminService-fuzzer rename to nebula3/storage/StorageAdminService-fuzzer index 83c36585..8074e424 100755 --- a/nebula2/storage/StorageAdminService-fuzzer +++ b/nebula3/storage/StorageAdminService-fuzzer @@ -41,5 +41,5 @@ from . import StorageAdminService from . import ttypes from . import constants -import nebula2.fbthrift.util.fuzzer -nebula2.fbthrift.util.fuzzer.fuzz_service(StorageAdminService, ttypes, constants) +import nebula3.fbthrift.util.fuzzer +nebula3.fbthrift.util.fuzzer.fuzz_service(StorageAdminService, ttypes, constants) diff --git a/nebula2/storage/StorageAdminService-remote b/nebula3/storage/StorageAdminService-remote similarity index 97% rename from nebula2/storage/StorageAdminService-remote rename to nebula3/storage/StorageAdminService-remote index 0a766f13..b462ab0d 100755 --- a/nebula2/storage/StorageAdminService-remote +++ b/nebula3/storage/StorageAdminService-remote @@ -38,8 +38,8 @@ if (not sys.argv[0].endswith("par") and from . import StorageAdminService from . import ttypes -from nebula2.fbthrift.util.remote import Function -from nebula2.fbthrift.remote import Remote +from nebula3.fbthrift.util.remote import Function +from nebula3.fbthrift.remote import Remote FUNCTIONS = { 'transLeader': Function('transLeader', 'StorageAdminService', 'AdminExecResp', [('TransLeaderReq', 'req', 'TransLeaderReq')]), diff --git a/nebula2/storage/StorageAdminService.py b/nebula3/storage/StorageAdminService.py similarity index 99% rename from nebula2/storage/StorageAdminService.py rename to nebula3/storage/StorageAdminService.py index 759c63e5..235483fa 100644 --- a/nebula2/storage/StorageAdminService.py +++ b/nebula3/storage/StorageAdminService.py @@ -7,33 +7,33 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException from .ttypes import UTF8STRINGS, StatType, OrderDirection, EdgeDirection, ScanType, EngineSignType, RequestCommon, PartitionResult, ResponseCommon, StatProp, Expr, EdgeProp, VertexProp, OrderBy, TraverseSpec, GetNeighborsRequest, GetNeighborsResponse, ExecResponse, GetPropRequest, GetPropResponse, NewTag, NewVertex, EdgeKey, NewEdge, AddVerticesRequest, AddEdgesRequest, DeleteVerticesRequest, DeleteEdgesRequest, DelTags, DeleteTagsRequest, UpdateResponse, UpdatedProp, UpdateVertexRequest, UpdateEdgeRequest, GetUUIDReq, GetUUIDResp, LookupIndexResp, IndexColumnHint, IndexQueryContext, IndexSpec, LookupIndexRequest, LookupAndTraverseRequest, ScanCursor, ScanVertexRequest, ScanEdgeRequest, ScanResponse, TaskPara, KVGetRequest, KVGetResponse, KVPutRequest, KVRemoveRequest, AdminExecResp, TransLeaderReq, AddPartReq, AddLearnerReq, RemovePartReq, MemberChangeReq, CatchUpDataReq, GetLeaderReq, CreateCPRequest, DropCPRequest, BlockingSignRequest, GetLeaderPartsResp, CheckPeersReq, RebuildIndexRequest, CreateCPResp, ListClusterInfoResp, ListClusterInfoReq, AddAdminTaskRequest, StopAdminTaskRequest, ChainAddEdgesRequest, ChainUpdateEdgeRequest, ChainDeleteEdgesRequest -import nebula2.common.ttypes -import nebula2.meta.ttypes +import nebula3.common.ttypes +import nebula3.meta.ttypes -from nebula2.fbthrift.Thrift import TProcessor +from nebula3.fbthrift.Thrift import TProcessor import pprint import warnings -from nebula2.fbthrift import Thrift -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.fbthrift.protocol import TCompactProtocol -from nebula2.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift import Thrift +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.protocol import TCompactProtocol +from nebula3.fbthrift.protocol import THeaderProtocol fastproto = None try: - from nebula2.fbthrift.protocol import fastproto + from nebula3.fbthrift.protocol import fastproto except ImportError: pass all_structs = [] UTF8STRINGS = bool(0) or sys.version_info.major >= 3 -from nebula2.fbthrift.util.Decorators import ( +from nebula3.fbthrift.util.Decorators import ( future_process_main, future_process_method, process_main as thrift_process_main, diff --git a/nebula2/storage/__init__.py b/nebula3/storage/__init__.py similarity index 100% rename from nebula2/storage/__init__.py rename to nebula3/storage/__init__.py diff --git a/nebula2/storage/constants.py b/nebula3/storage/constants.py similarity index 86% rename from nebula2/storage/constants.py rename to nebula3/storage/constants.py index 9456ae58..2a73d771 100644 --- a/nebula2/storage/constants.py +++ b/nebula3/storage/constants.py @@ -7,13 +7,13 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException -import nebula2.common.ttypes -import nebula2.meta.ttypes +import nebula3.common.ttypes +import nebula3.meta.ttypes from .ttypes import UTF8STRINGS, StatType, OrderDirection, EdgeDirection, ScanType, EngineSignType, RequestCommon, PartitionResult, ResponseCommon, StatProp, Expr, EdgeProp, VertexProp, OrderBy, TraverseSpec, GetNeighborsRequest, GetNeighborsResponse, ExecResponse, GetPropRequest, GetPropResponse, NewTag, NewVertex, EdgeKey, NewEdge, AddVerticesRequest, AddEdgesRequest, DeleteVerticesRequest, DeleteEdgesRequest, DelTags, DeleteTagsRequest, UpdateResponse, UpdatedProp, UpdateVertexRequest, UpdateEdgeRequest, GetUUIDReq, GetUUIDResp, LookupIndexResp, IndexColumnHint, IndexQueryContext, IndexSpec, LookupIndexRequest, LookupAndTraverseRequest, ScanCursor, ScanVertexRequest, ScanEdgeRequest, ScanResponse, TaskPara, KVGetRequest, KVGetResponse, KVPutRequest, KVRemoveRequest, AdminExecResp, TransLeaderReq, AddPartReq, AddLearnerReq, RemovePartReq, MemberChangeReq, CatchUpDataReq, GetLeaderReq, CreateCPRequest, DropCPRequest, BlockingSignRequest, GetLeaderPartsResp, CheckPeersReq, RebuildIndexRequest, CreateCPResp, ListClusterInfoResp, ListClusterInfoReq, AddAdminTaskRequest, StopAdminTaskRequest, ChainAddEdgesRequest, ChainUpdateEdgeRequest, ChainDeleteEdgesRequest diff --git a/nebula2/storage/ttypes.py b/nebula3/storage/ttypes.py similarity index 98% rename from nebula2/storage/ttypes.py rename to nebula3/storage/ttypes.py index 8b5b55aa..1865f065 100644 --- a/nebula2/storage/ttypes.py +++ b/nebula3/storage/ttypes.py @@ -7,25 +7,25 @@ from __future__ import absolute_import import sys -from nebula2.fbthrift.util.Recursive import fix_spec -from nebula2.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef -from nebula2.fbthrift.protocol.TProtocol import TProtocolException +from nebula3.fbthrift.util.Recursive import fix_spec +from nebula3.fbthrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef +from nebula3.fbthrift.protocol.TProtocol import TProtocolException -import nebula2.common.ttypes -import nebula2.meta.ttypes +import nebula3.common.ttypes +import nebula3.meta.ttypes import pprint import warnings -from nebula2.fbthrift import Thrift -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.fbthrift.protocol import TCompactProtocol -from nebula2.fbthrift.protocol import THeaderProtocol +from nebula3.fbthrift import Thrift +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.protocol import TCompactProtocol +from nebula3.fbthrift.protocol import THeaderProtocol fastproto = None try: - from nebula2.fbthrift.protocol import fastproto + from nebula3.fbthrift.protocol import fastproto except ImportError: pass all_structs = [] @@ -255,7 +255,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.leader = nebula2.common.ttypes.HostAddr() + self.leader = nebula3.common.ttypes.HostAddr() self.leader.read(iprot) else: iprot.skip(ftype) @@ -1278,12 +1278,12 @@ def read(self, iprot): (_etype100, _size97) = iprot.readListBegin() if _size97 >= 0: for _i101 in range(_size97): - _elem102 = nebula2.common.ttypes.Row() + _elem102 = nebula3.common.ttypes.Row() _elem102.read(iprot) _val96.append(_elem102) else: while iprot.peekList(): - _elem103 = nebula2.common.ttypes.Row() + _elem103 = nebula3.common.ttypes.Row() _elem103.read(iprot) _val96.append(_elem103) iprot.readListEnd() @@ -1295,12 +1295,12 @@ def read(self, iprot): (_etype109, _size106) = iprot.readListBegin() if _size106 >= 0: for _i110 in range(_size106): - _elem111 = nebula2.common.ttypes.Row() + _elem111 = nebula3.common.ttypes.Row() _elem111.read(iprot) _val105.append(_elem111) else: while iprot.peekList(): - _elem112 = nebula2.common.ttypes.Row() + _elem112 = nebula3.common.ttypes.Row() _elem112.read(iprot) _val105.append(_elem112) iprot.readListEnd() @@ -1438,7 +1438,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.vertices = nebula2.common.ttypes.DataSet() + self.vertices = nebula3.common.ttypes.DataSet() self.vertices.read(iprot) else: iprot.skip(ftype) @@ -1615,12 +1615,12 @@ def read(self, iprot): (_etype127, _size124) = iprot.readListBegin() if _size124 >= 0: for _i128 in range(_size124): - _elem129 = nebula2.common.ttypes.Row() + _elem129 = nebula3.common.ttypes.Row() _elem129.read(iprot) _val123.append(_elem129) else: while iprot.peekList(): - _elem130 = nebula2.common.ttypes.Row() + _elem130 = nebula3.common.ttypes.Row() _elem130.read(iprot) _val123.append(_elem130) iprot.readListEnd() @@ -1632,12 +1632,12 @@ def read(self, iprot): (_etype136, _size133) = iprot.readListBegin() if _size133 >= 0: for _i137 in range(_size133): - _elem138 = nebula2.common.ttypes.Row() + _elem138 = nebula3.common.ttypes.Row() _elem138.read(iprot) _val132.append(_elem138) else: while iprot.peekList(): - _elem139 = nebula2.common.ttypes.Row() + _elem139 = nebula3.common.ttypes.Row() _elem139.read(iprot) _val132.append(_elem139) iprot.readListEnd() @@ -1901,7 +1901,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.props = nebula2.common.ttypes.DataSet() + self.props = nebula3.common.ttypes.DataSet() self.props.read(iprot) else: iprot.skip(ftype) @@ -1992,12 +1992,12 @@ def read(self, iprot): (_etype178, _size175) = iprot.readListBegin() if _size175 >= 0: for _i179 in range(_size175): - _elem180 = nebula2.common.ttypes.Value() + _elem180 = nebula3.common.ttypes.Value() _elem180.read(iprot) self.props.append(_elem180) else: while iprot.peekList(): - _elem181 = nebula2.common.ttypes.Value() + _elem181 = nebula3.common.ttypes.Value() _elem181.read(iprot) self.props.append(_elem181) iprot.readListEnd() @@ -2084,7 +2084,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.id = nebula2.common.ttypes.Value() + self.id = nebula3.common.ttypes.Value() self.id.read(iprot) else: iprot.skip(ftype) @@ -2188,7 +2188,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.src = nebula2.common.ttypes.Value() + self.src = nebula3.common.ttypes.Value() self.src.read(iprot) else: iprot.skip(ftype) @@ -2204,7 +2204,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 4: if ftype == TType.STRUCT: - self.dst = nebula2.common.ttypes.Value() + self.dst = nebula3.common.ttypes.Value() self.dst.read(iprot) else: iprot.skip(ftype) @@ -2312,12 +2312,12 @@ def read(self, iprot): (_etype194, _size191) = iprot.readListBegin() if _size191 >= 0: for _i195 in range(_size191): - _elem196 = nebula2.common.ttypes.Value() + _elem196 = nebula3.common.ttypes.Value() _elem196.read(iprot) self.props.append(_elem196) else: while iprot.peekList(): - _elem197 = nebula2.common.ttypes.Value() + _elem197 = nebula3.common.ttypes.Value() _elem197.read(iprot) self.props.append(_elem197) iprot.readListEnd() @@ -2843,12 +2843,12 @@ def read(self, iprot): (_etype295, _size292) = iprot.readListBegin() if _size292 >= 0: for _i296 in range(_size292): - _elem297 = nebula2.common.ttypes.Value() + _elem297 = nebula3.common.ttypes.Value() _elem297.read(iprot) _val291.append(_elem297) else: while iprot.peekList(): - _elem298 = nebula2.common.ttypes.Value() + _elem298 = nebula3.common.ttypes.Value() _elem298.read(iprot) _val291.append(_elem298) iprot.readListEnd() @@ -2860,12 +2860,12 @@ def read(self, iprot): (_etype304, _size301) = iprot.readListBegin() if _size301 >= 0: for _i305 in range(_size301): - _elem306 = nebula2.common.ttypes.Value() + _elem306 = nebula3.common.ttypes.Value() _elem306.read(iprot) _val300.append(_elem306) else: while iprot.peekList(): - _elem307 = nebula2.common.ttypes.Value() + _elem307 = nebula3.common.ttypes.Value() _elem307.read(iprot) _val300.append(_elem307) iprot.readListEnd() @@ -3116,7 +3116,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRUCT: - self.id = nebula2.common.ttypes.Value() + self.id = nebula3.common.ttypes.Value() self.id.read(iprot) else: iprot.skip(ftype) @@ -3366,7 +3366,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.props = nebula2.common.ttypes.DataSet() + self.props = nebula3.common.ttypes.DataSet() self.props.read(iprot) else: iprot.skip(ftype) @@ -3551,7 +3551,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.vertex_id = nebula2.common.ttypes.Value() + self.vertex_id = nebula3.common.ttypes.Value() self.vertex_id.read(iprot) else: iprot.skip(ftype) @@ -4069,7 +4069,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.id = nebula2.common.ttypes.Value() + self.id = nebula3.common.ttypes.Value() self.id.read(iprot) else: iprot.skip(ftype) @@ -4158,13 +4158,13 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.data = nebula2.common.ttypes.DataSet() + self.data = nebula3.common.ttypes.DataSet() self.data.read(iprot) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.stat_data = nebula2.common.ttypes.DataSet() + self.stat_data = nebula3.common.ttypes.DataSet() self.stat_data.read(iprot) else: iprot.skip(ftype) @@ -4268,13 +4268,13 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.begin_value = nebula2.common.ttypes.Value() + self.begin_value = nebula3.common.ttypes.Value() self.begin_value.read(iprot) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRUCT: - self.end_value = nebula2.common.ttypes.Value() + self.end_value = nebula3.common.ttypes.Value() self.end_value.read(iprot) else: iprot.skip(ftype) @@ -4530,7 +4530,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.schema_id = nebula2.common.ttypes.SchemaID() + self.schema_id = nebula3.common.ttypes.SchemaID() self.schema_id.read(iprot) else: iprot.skip(ftype) @@ -5530,7 +5530,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.props = nebula2.common.ttypes.DataSet() + self.props = nebula3.common.ttypes.DataSet() self.props.read(iprot) else: iprot.skip(ftype) @@ -6025,12 +6025,12 @@ def read(self, iprot): (_etype571, _size568) = iprot.readListBegin() if _size568 >= 0: for _i572 in range(_size568): - _elem573 = nebula2.common.ttypes.KeyValue() + _elem573 = nebula3.common.ttypes.KeyValue() _elem573.read(iprot) _val567.append(_elem573) else: while iprot.peekList(): - _elem574 = nebula2.common.ttypes.KeyValue() + _elem574 = nebula3.common.ttypes.KeyValue() _elem574.read(iprot) _val567.append(_elem574) iprot.readListEnd() @@ -6042,12 +6042,12 @@ def read(self, iprot): (_etype580, _size577) = iprot.readListBegin() if _size577 >= 0: for _i581 in range(_size577): - _elem582 = nebula2.common.ttypes.KeyValue() + _elem582 = nebula3.common.ttypes.KeyValue() _elem582.read(iprot) _val576.append(_elem582) else: while iprot.peekList(): - _elem583 = nebula2.common.ttypes.KeyValue() + _elem583 = nebula3.common.ttypes.KeyValue() _elem583.read(iprot) _val576.append(_elem583) iprot.readListEnd() @@ -6271,7 +6271,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.stats = nebula2.meta.ttypes.StatsItem() + self.stats = nebula3.meta.ttypes.StatsItem() self.stats.read(iprot) else: iprot.skip(ftype) @@ -6364,7 +6364,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.new_leader = nebula2.common.ttypes.HostAddr() + self.new_leader = nebula3.common.ttypes.HostAddr() self.new_leader.read(iprot) else: iprot.skip(ftype) @@ -6475,12 +6475,12 @@ def read(self, iprot): (_etype616, _size613) = iprot.readListBegin() if _size613 >= 0: for _i617 in range(_size613): - _elem618 = nebula2.common.ttypes.HostAddr() + _elem618 = nebula3.common.ttypes.HostAddr() _elem618.read(iprot) self.peers.append(_elem618) else: while iprot.peekList(): - _elem619 = nebula2.common.ttypes.HostAddr() + _elem619 = nebula3.common.ttypes.HostAddr() _elem619.read(iprot) self.peers.append(_elem619) iprot.readListEnd() @@ -6594,7 +6594,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.learner = nebula2.common.ttypes.HostAddr() + self.learner = nebula3.common.ttypes.HostAddr() self.learner.read(iprot) else: iprot.skip(ftype) @@ -6782,7 +6782,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.peer = nebula2.common.ttypes.HostAddr() + self.peer = nebula3.common.ttypes.HostAddr() self.peer.read(iprot) else: iprot.skip(ftype) @@ -6896,7 +6896,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: - self.target = nebula2.common.ttypes.HostAddr() + self.target = nebula3.common.ttypes.HostAddr() self.target.read(iprot) else: iprot.skip(ftype) @@ -7478,12 +7478,12 @@ def read(self, iprot): (_etype674, _size671) = iprot.readListBegin() if _size671 >= 0: for _i675 in range(_size671): - _elem676 = nebula2.common.ttypes.HostAddr() + _elem676 = nebula3.common.ttypes.HostAddr() _elem676.read(iprot) self.peers.append(_elem676) else: while iprot.peekList(): - _elem677 = nebula2.common.ttypes.HostAddr() + _elem677 = nebula3.common.ttypes.HostAddr() _elem677.read(iprot) self.peers.append(_elem677) iprot.readListEnd() @@ -7701,12 +7701,12 @@ def read(self, iprot): (_etype690, _size687) = iprot.readListBegin() if _size687 >= 0: for _i691 in range(_size687): - _elem692 = nebula2.common.ttypes.CheckpointInfo() + _elem692 = nebula3.common.ttypes.CheckpointInfo() _elem692.read(iprot) self.info.append(_elem692) else: while iprot.peekList(): - _elem693 = nebula2.common.ttypes.CheckpointInfo() + _elem693 = nebula3.common.ttypes.CheckpointInfo() _elem693.read(iprot) self.info.append(_elem693) iprot.readListEnd() @@ -7799,7 +7799,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.dir = nebula2.common.ttypes.DirInfo() + self.dir = nebula3.common.ttypes.DirInfo() self.dir.read(iprot) else: iprot.skip(ftype) @@ -8650,9 +8650,9 @@ def RequestCommon__setstate__(self, state): all_structs.append(PartitionResult) PartitionResult.thrift_spec = ( None, # 0 - (1, TType.I32, 'code', nebula2.common.ttypes.ErrorCode, None, 0, ), # 1 + (1, TType.I32, 'code', nebula3.common.ttypes.ErrorCode, None, 0, ), # 1 (2, TType.I32, 'part_id', None, None, 0, ), # 2 - (3, TType.STRUCT, 'leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 1, ), # 3 + (3, TType.STRUCT, 'leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 1, ), # 3 ) PartitionResult.thrift_struct_annotations = { @@ -8896,7 +8896,7 @@ def TraverseSpec__setstate__(self, state): None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 (2, TType.LIST, 'column_names', (TType.STRING,False), None, 2, ), # 2 - (3, TType.MAP, 'parts', (TType.I32,None,TType.LIST,(TType.STRUCT,[nebula2.common.ttypes.Row, nebula2.common.ttypes.Row.thrift_spec, False])), None, 2, ), # 3 + (3, TType.MAP, 'parts', (TType.I32,None,TType.LIST,(TType.STRUCT,[nebula3.common.ttypes.Row, nebula3.common.ttypes.Row.thrift_spec, False])), None, 2, ), # 3 (4, TType.STRUCT, 'traverse_spec', [TraverseSpec, TraverseSpec.thrift_spec, False], None, 2, ), # 4 (5, TType.STRUCT, 'common', [RequestCommon, RequestCommon.thrift_spec, False], None, 1, ), # 5 ) @@ -8930,7 +8930,7 @@ def GetNeighborsRequest__setstate__(self, state): GetNeighborsResponse.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'result', [ResponseCommon, ResponseCommon.thrift_spec, False], None, 0, ), # 1 - (2, TType.STRUCT, 'vertices', [nebula2.common.ttypes.DataSet, nebula2.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 2 + (2, TType.STRUCT, 'vertices', [nebula3.common.ttypes.DataSet, nebula3.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 2 ) GetNeighborsResponse.thrift_struct_annotations = { @@ -8979,7 +8979,7 @@ def ExecResponse__setstate__(self, state): GetPropRequest.thrift_spec = ( None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 - (2, TType.MAP, 'parts', (TType.I32,None,TType.LIST,(TType.STRUCT,[nebula2.common.ttypes.Row, nebula2.common.ttypes.Row.thrift_spec, False])), None, 2, ), # 2 + (2, TType.MAP, 'parts', (TType.I32,None,TType.LIST,(TType.STRUCT,[nebula3.common.ttypes.Row, nebula3.common.ttypes.Row.thrift_spec, False])), None, 2, ), # 2 (3, TType.LIST, 'vertex_props', (TType.STRUCT,[VertexProp, VertexProp.thrift_spec, False]), None, 1, ), # 3 (4, TType.LIST, 'edge_props', (TType.STRUCT,[EdgeProp, EdgeProp.thrift_spec, False]), None, 1, ), # 4 (5, TType.LIST, 'expressions', (TType.STRUCT,[Expr, Expr.thrift_spec, False]), None, 1, ), # 5 @@ -9029,7 +9029,7 @@ def GetPropRequest__setstate__(self, state): GetPropResponse.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'result', [ResponseCommon, ResponseCommon.thrift_spec, False], None, 2, ), # 1 - (2, TType.STRUCT, 'props', [nebula2.common.ttypes.DataSet, nebula2.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 2 + (2, TType.STRUCT, 'props', [nebula3.common.ttypes.DataSet, nebula3.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 2 ) GetPropResponse.thrift_struct_annotations = { @@ -9055,7 +9055,7 @@ def GetPropResponse__setstate__(self, state): NewTag.thrift_spec = ( None, # 0 (1, TType.I32, 'tag_id', None, None, 2, ), # 1 - (2, TType.LIST, 'props', (TType.STRUCT,[nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 2 + (2, TType.LIST, 'props', (TType.STRUCT,[nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 2 ) NewTag.thrift_struct_annotations = { @@ -9080,7 +9080,7 @@ def NewTag__setstate__(self, state): all_structs.append(NewVertex) NewVertex.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'id', [nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True], None, 2, ), # 1 + (1, TType.STRUCT, 'id', [nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True], None, 2, ), # 1 (2, TType.LIST, 'tags', (TType.STRUCT,[NewTag, NewTag.thrift_spec, False]), None, 2, ), # 2 ) @@ -9106,10 +9106,10 @@ def NewVertex__setstate__(self, state): all_structs.append(EdgeKey) EdgeKey.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'src', [nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True], None, 2, ), # 1 + (1, TType.STRUCT, 'src', [nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True], None, 2, ), # 1 (2, TType.I32, 'edge_type', None, None, 2, ), # 2 (3, TType.I64, 'ranking', None, None, 2, ), # 3 - (4, TType.STRUCT, 'dst', [nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True], None, 2, ), # 4 + (4, TType.STRUCT, 'dst', [nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True], None, 2, ), # 4 ) EdgeKey.thrift_struct_annotations = { @@ -9139,7 +9139,7 @@ def EdgeKey__setstate__(self, state): NewEdge.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'key', [EdgeKey, EdgeKey.thrift_spec, False], None, 2, ), # 1 - (2, TType.LIST, 'props', (TType.STRUCT,[nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 2 + (2, TType.LIST, 'props', (TType.STRUCT,[nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True]), None, 2, ), # 2 ) NewEdge.thrift_struct_annotations = { @@ -9241,7 +9241,7 @@ def AddEdgesRequest__setstate__(self, state): DeleteVerticesRequest.thrift_spec = ( None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 - (2, TType.MAP, 'parts', (TType.I32,None,TType.LIST,(TType.STRUCT,[nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True])), None, 2, ), # 2 + (2, TType.MAP, 'parts', (TType.I32,None,TType.LIST,(TType.STRUCT,[nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True])), None, 2, ), # 2 (3, TType.STRUCT, 'common', [RequestCommon, RequestCommon.thrift_spec, False], None, 1, ), # 3 ) @@ -9298,7 +9298,7 @@ def DeleteEdgesRequest__setstate__(self, state): all_structs.append(DelTags) DelTags.thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'id', [nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True], None, 2, ), # 1 + (1, TType.STRUCT, 'id', [nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True], None, 2, ), # 1 (2, TType.LIST, 'tags', (TType.I32,None), None, 2, ), # 2 ) @@ -9354,7 +9354,7 @@ def DeleteTagsRequest__setstate__(self, state): UpdateResponse.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'result', [ResponseCommon, ResponseCommon.thrift_spec, False], None, 0, ), # 1 - (2, TType.STRUCT, 'props', [nebula2.common.ttypes.DataSet, nebula2.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 2 + (2, TType.STRUCT, 'props', [nebula3.common.ttypes.DataSet, nebula3.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 2 ) UpdateResponse.thrift_struct_annotations = { @@ -9407,7 +9407,7 @@ def UpdatedProp__setstate__(self, state): None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 (2, TType.I32, 'part_id', None, None, 2, ), # 2 - (3, TType.STRUCT, 'vertex_id', [nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True], None, 2, ), # 3 + (3, TType.STRUCT, 'vertex_id', [nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True], None, 2, ), # 3 (4, TType.I32, 'tag_id', None, None, 0, ), # 4 (5, TType.LIST, 'updated_props', (TType.STRUCT,[UpdatedProp, UpdatedProp.thrift_spec, False]), None, 2, ), # 5 (6, TType.BOOL, 'insertable', None, False, 1, ), # 6 @@ -9529,7 +9529,7 @@ def GetUUIDReq__setstate__(self, state): GetUUIDResp.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'result', [ResponseCommon, ResponseCommon.thrift_spec, False], None, 0, ), # 1 - (2, TType.STRUCT, 'id', [nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True], None, 2, ), # 2 + (2, TType.STRUCT, 'id', [nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True], None, 2, ), # 2 ) GetUUIDResp.thrift_struct_annotations = { @@ -9555,8 +9555,8 @@ def GetUUIDResp__setstate__(self, state): LookupIndexResp.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'result', [ResponseCommon, ResponseCommon.thrift_spec, False], None, 0, ), # 1 - (2, TType.STRUCT, 'data', [nebula2.common.ttypes.DataSet, nebula2.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 2 - (3, TType.STRUCT, 'stat_data', [nebula2.common.ttypes.DataSet, nebula2.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 3 + (2, TType.STRUCT, 'data', [nebula3.common.ttypes.DataSet, nebula3.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 2 + (3, TType.STRUCT, 'stat_data', [nebula3.common.ttypes.DataSet, nebula3.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 3 ) LookupIndexResp.thrift_struct_annotations = { @@ -9585,8 +9585,8 @@ def LookupIndexResp__setstate__(self, state): None, # 0 (1, TType.STRING, 'column_name', False, None, 2, ), # 1 (2, TType.I32, 'scan_type', ScanType, None, 2, ), # 2 - (3, TType.STRUCT, 'begin_value', [nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True], None, 2, ), # 3 - (4, TType.STRUCT, 'end_value', [nebula2.common.ttypes.Value, nebula2.common.ttypes.Value.thrift_spec, True], None, 2, ), # 4 + (3, TType.STRUCT, 'begin_value', [nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True], None, 2, ), # 3 + (4, TType.STRUCT, 'end_value', [nebula3.common.ttypes.Value, nebula3.common.ttypes.Value.thrift_spec, True], None, 2, ), # 4 (5, TType.BOOL, 'include_begin', None, True, 2, ), # 5 (6, TType.BOOL, 'include_end', None, False, 2, ), # 6 ) @@ -9651,7 +9651,7 @@ def IndexQueryContext__setstate__(self, state): IndexSpec.thrift_spec = ( None, # 0 (1, TType.LIST, 'contexts', (TType.STRUCT,[IndexQueryContext, IndexQueryContext.thrift_spec, False]), None, 0, ), # 1 - (2, TType.STRUCT, 'schema_id', [nebula2.common.ttypes.SchemaID, nebula2.common.ttypes.SchemaID.thrift_spec, True], None, 2, ), # 2 + (2, TType.STRUCT, 'schema_id', [nebula3.common.ttypes.SchemaID, nebula3.common.ttypes.SchemaID.thrift_spec, True], None, 2, ), # 2 ) IndexSpec.thrift_struct_annotations = { @@ -9879,7 +9879,7 @@ def ScanEdgeRequest__setstate__(self, state): ScanResponse.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'result', [ResponseCommon, ResponseCommon.thrift_spec, False], None, 0, ), # 1 - (2, TType.STRUCT, 'props', [nebula2.common.ttypes.DataSet, nebula2.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 2 + (2, TType.STRUCT, 'props', [nebula3.common.ttypes.DataSet, nebula3.common.ttypes.DataSet.thrift_spec, False], None, 1, ), # 2 (3, TType.MAP, 'cursors', (TType.I32,None,TType.STRUCT,[ScanCursor, ScanCursor.thrift_spec, False]), None, 2, ), # 3 ) @@ -9992,7 +9992,7 @@ def KVGetResponse__setstate__(self, state): KVPutRequest.thrift_spec = ( None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 - (2, TType.MAP, 'parts', (TType.I32,None,TType.LIST,(TType.STRUCT,[nebula2.common.ttypes.KeyValue, nebula2.common.ttypes.KeyValue.thrift_spec, False])), None, 2, ), # 2 + (2, TType.MAP, 'parts', (TType.I32,None,TType.LIST,(TType.STRUCT,[nebula3.common.ttypes.KeyValue, nebula3.common.ttypes.KeyValue.thrift_spec, False])), None, 2, ), # 2 ) KVPutRequest.thrift_struct_annotations = { @@ -10044,7 +10044,7 @@ def KVRemoveRequest__setstate__(self, state): AdminExecResp.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'result', [ResponseCommon, ResponseCommon.thrift_spec, False], None, 0, ), # 1 - (2, TType.STRUCT, 'stats', [nebula2.meta.ttypes.StatsItem, nebula2.meta.ttypes.StatsItem.thrift_spec, False], None, 1, ), # 2 + (2, TType.STRUCT, 'stats', [nebula3.meta.ttypes.StatsItem, nebula3.meta.ttypes.StatsItem.thrift_spec, False], None, 1, ), # 2 ) AdminExecResp.thrift_struct_annotations = { @@ -10071,7 +10071,7 @@ def AdminExecResp__setstate__(self, state): None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 (2, TType.I32, 'part_id', None, None, 2, ), # 2 - (3, TType.STRUCT, 'new_leader', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 3 + (3, TType.STRUCT, 'new_leader', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 3 ) TransLeaderReq.thrift_struct_annotations = { @@ -10101,7 +10101,7 @@ def TransLeaderReq__setstate__(self, state): (1, TType.I32, 'space_id', None, None, 2, ), # 1 (2, TType.I32, 'part_id', None, None, 2, ), # 2 (3, TType.BOOL, 'as_learner', None, None, 2, ), # 3 - (4, TType.LIST, 'peers', (TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 4 + (4, TType.LIST, 'peers', (TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 4 ) AddPartReq.thrift_struct_annotations = { @@ -10132,7 +10132,7 @@ def AddPartReq__setstate__(self, state): None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 (2, TType.I32, 'part_id', None, None, 2, ), # 2 - (3, TType.STRUCT, 'learner', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 3 + (3, TType.STRUCT, 'learner', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 3 ) AddLearnerReq.thrift_struct_annotations = { @@ -10187,7 +10187,7 @@ def RemovePartReq__setstate__(self, state): None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 (2, TType.I32, 'part_id', None, None, 2, ), # 2 - (3, TType.STRUCT, 'peer', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 3 + (3, TType.STRUCT, 'peer', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 3 (4, TType.BOOL, 'add', None, None, 2, ), # 4 ) @@ -10219,7 +10219,7 @@ def MemberChangeReq__setstate__(self, state): None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 (2, TType.I32, 'part_id', None, None, 2, ), # 2 - (3, TType.STRUCT, 'target', [nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 3 + (3, TType.STRUCT, 'target', [nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False], None, 2, ), # 3 ) CatchUpDataReq.thrift_struct_annotations = { @@ -10361,7 +10361,7 @@ def GetLeaderPartsResp__setstate__(self, state): None, # 0 (1, TType.I32, 'space_id', None, None, 2, ), # 1 (2, TType.I32, 'part_id', None, None, 2, ), # 2 - (3, TType.LIST, 'peers', (TType.STRUCT,[nebula2.common.ttypes.HostAddr, nebula2.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 3 + (3, TType.LIST, 'peers', (TType.STRUCT,[nebula3.common.ttypes.HostAddr, nebula3.common.ttypes.HostAddr.thrift_spec, False]), None, 2, ), # 3 ) CheckPeersReq.thrift_struct_annotations = { @@ -10418,7 +10418,7 @@ def RebuildIndexRequest__setstate__(self, state): CreateCPResp.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'result', [ResponseCommon, ResponseCommon.thrift_spec, False], None, 0, ), # 1 - (2, TType.LIST, 'info', (TType.STRUCT,[nebula2.common.ttypes.CheckpointInfo, nebula2.common.ttypes.CheckpointInfo.thrift_spec, False]), None, 2, ), # 2 + (2, TType.LIST, 'info', (TType.STRUCT,[nebula3.common.ttypes.CheckpointInfo, nebula3.common.ttypes.CheckpointInfo.thrift_spec, False]), None, 2, ), # 2 ) CreateCPResp.thrift_struct_annotations = { @@ -10444,7 +10444,7 @@ def CreateCPResp__setstate__(self, state): ListClusterInfoResp.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'result', [ResponseCommon, ResponseCommon.thrift_spec, False], None, 0, ), # 1 - (2, TType.STRUCT, 'dir', [nebula2.common.ttypes.DirInfo, nebula2.common.ttypes.DirInfo.thrift_spec, False], None, 2, ), # 2 + (2, TType.STRUCT, 'dir', [nebula3.common.ttypes.DirInfo, nebula3.common.ttypes.DirInfo.thrift_spec, False], None, 2, ), # 2 ) ListClusterInfoResp.thrift_struct_annotations = { @@ -10478,7 +10478,7 @@ def ListClusterInfoResp__setstate__(self, state): all_structs.append(AddAdminTaskRequest) AddAdminTaskRequest.thrift_spec = ( None, # 0 - (1, TType.I32, 'cmd', nebula2.meta.ttypes.AdminCmd, None, 2, ), # 1 + (1, TType.I32, 'cmd', nebula3.meta.ttypes.AdminCmd, None, 2, ), # 1 (2, TType.I32, 'job_id', None, None, 2, ), # 2 (3, TType.I32, 'task_id', None, None, 2, ), # 3 (4, TType.STRUCT, 'para', [TaskPara, TaskPara.thrift_spec, False], None, 2, ), # 4 diff --git a/setup.py b/setup.py index bfb17f59..363cd55f 100644 --- a/setup.py +++ b/setup.py @@ -13,17 +13,17 @@ setup( - name='nebula2-python', - version='2.6.0', + name='nebula3-python', + version='3.0.0', license='Apache 2.0', author='vesoft-inc', author_email='info@vesoft.com', - description='Python client for Nebula Graph V2.0', + description='Python client for Nebula Graph V3.0', long_description=long_description, long_description_content_type='text/markdown', url='https://github.com/vesoft-inc/nebula-python', install_requires=['httplib2', 'future', 'six', 'pytz'], packages=find_packages(), platforms=['3.6, 3.7'], - package_dir={'nebula2': 'nebula2'}, + package_dir={'nebula3': 'nebula3'}, ) diff --git a/tests/conftest.py b/tests/conftest.py index 6a13de3d..b608e30e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,4 +5,4 @@ format='[%(asctime)s] %(levelname)-8s [%(filename)s:%(lineno)d]:%(message)s', ) -logging.getLogger('nebula2').setLevel(logging.DEBUG) +logging.getLogger('nebula3').setLevel(logging.DEBUG) diff --git a/tests/test_connection.py b/tests/test_connection.py index beb858bb..8d539f84 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -15,9 +15,9 @@ sys.path.insert(0, root_dir) from unittest import TestCase -from nebula2.gclient.net import Connection -from nebula2.common import ttypes -from nebula2.Exception import IOErrorException +from nebula3.gclient.net import Connection +from nebula3.common import ttypes +from nebula3.Exception import IOErrorException class TestConnection(TestCase): diff --git a/tests/test_data_from_server.py b/tests/test_data_from_server.py index 908f9ffc..1ba8a2ed 100644 --- a/tests/test_data_from_server.py +++ b/tests/test_data_from_server.py @@ -7,10 +7,10 @@ from unittest import TestCase -from nebula2.gclient.net import ConnectionPool -from nebula2.data.DataObject import DateTimeWrapper, DateWrapper, TimeWrapper, Null -from nebula2.common.ttypes import DateTime, Date, Time, ErrorCode -from nebula2.Config import Config +from nebula3.gclient.net import ConnectionPool +from nebula3.data.DataObject import DateTimeWrapper, DateWrapper, TimeWrapper, Null +from nebula3.common.ttypes import DateTime, Date, Time, ErrorCode +from nebula3.Config import Config import sys import os import time diff --git a/tests/test_data_type.py b/tests/test_data_type.py index ed6a2007..426cfb39 100644 --- a/tests/test_data_type.py +++ b/tests/test_data_type.py @@ -15,8 +15,8 @@ root_dir = os.path.join(current_dir, '..') sys.path.insert(0, root_dir) -from nebula2.Exception import InvalidKeyException -from nebula2.common.ttypes import ( +from nebula3.Exception import InvalidKeyException +from nebula3.common.ttypes import ( Value, NullType, Time, @@ -29,11 +29,11 @@ Duration, ErrorCode, ) -from nebula2.common import ttypes -from nebula2.graph import ttypes as graphTtype +from nebula3.common import ttypes +from nebula3.graph import ttypes as graphTtype from unittest import TestCase -from nebula2.data.ResultSet import ResultSet -from nebula2.data.DataObject import ( +from nebula3.data.ResultSet import ResultSet +from nebula3.data.DataObject import ( ValueWrapper, Node, Relationship, diff --git a/tests/test_graph_storage_client.py b/tests/test_graph_storage_client.py index 2f2e2727..ab306dad 100644 --- a/tests/test_graph_storage_client.py +++ b/tests/test_graph_storage_client.py @@ -18,18 +18,18 @@ root_dir = os.path.join(current_dir, '..') sys.path.insert(0, root_dir) -from nebula2.Exception import ( +from nebula3.Exception import ( EdgeNotFoundException, TagNotFoundException, SpaceNotFoundException, PartNotFoundException, ) -from nebula2.sclient.BaseResult import EdgeData -from nebula2.sclient.ScanResult import VertexData -from nebula2.mclient import MetaCache -from nebula2.sclient.GraphStorageClient import GraphStorageClient -from nebula2.gclient.net import Connection +from nebula3.sclient.BaseResult import EdgeData +from nebula3.sclient.ScanResult import VertexData +from nebula3.mclient import MetaCache +from nebula3.sclient.GraphStorageClient import GraphStorageClient +from nebula3.gclient.net import Connection logging.basicConfig(level=logging.INFO, format='[%(asctime)s]:%(message)s') diff --git a/tests/test_meta_cache.py b/tests/test_meta_cache.py index c5c9ee4a..dc492233 100644 --- a/tests/test_meta_cache.py +++ b/tests/test_meta_cache.py @@ -14,9 +14,9 @@ root_dir = os.path.join(current_dir, '..') sys.path.insert(0, root_dir) -from nebula2.gclient.net import Connection -from nebula2.mclient import MetaCache -from nebula2.common import ttypes +from nebula3.gclient.net import Connection +from nebula3.mclient import MetaCache +from nebula3.common import ttypes class TestMetaCache(object): diff --git a/tests/test_parameter.py b/tests/test_parameter.py index a516fa09..67ee5c60 100644 --- a/tests/test_parameter.py +++ b/tests/test_parameter.py @@ -8,9 +8,9 @@ import time import json -from nebula2.gclient.net import ConnectionPool -from nebula2.Config import Config -from nebula2.common import * +from nebula3.gclient.net import ConnectionPool +from nebula3.Config import Config +from nebula3.common import * from unittest import TestCase diff --git a/tests/test_pool.py b/tests/test_pool.py index 38ef38ff..16fb72d7 100644 --- a/tests/test_pool.py +++ b/tests/test_pool.py @@ -18,11 +18,11 @@ from unittest import TestCase -from nebula2.gclient.net import ConnectionPool +from nebula3.gclient.net import ConnectionPool -from nebula2.Config import Config +from nebula3.Config import Config -from nebula2.Exception import ( +from nebula3.Exception import ( NotValidConnectionException, InValidHostname, IOErrorException, diff --git a/tests/test_session.py b/tests/test_session.py index 2893d033..383623ba 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -15,8 +15,8 @@ sys.path.insert(0, root_dir) from unittest import TestCase -from nebula2.gclient.net import ConnectionPool -from nebula2.Config import Config +from nebula3.gclient.net import ConnectionPool +from nebula3.Config import Config class TestSession(TestCase): diff --git a/tests/test_ssl_connection.py b/tests/test_ssl_connection.py index 861f6b3e..e52f284d 100644 --- a/tests/test_ssl_connection.py +++ b/tests/test_ssl_connection.py @@ -16,10 +16,10 @@ sys.path.insert(0, root_dir) from unittest import TestCase -from nebula2.Exception import IOErrorException -from nebula2.common import ttypes -from nebula2.gclient.net import Connection -from nebula2.Config import SSL_config +from nebula3.Exception import IOErrorException +from nebula3.common import ttypes +from nebula3.gclient.net import Connection +from nebula3.Config import SSL_config # set SSL config ssl_config = SSL_config() diff --git a/tests/test_ssl_pool.py b/tests/test_ssl_pool.py index 0c3b7337..1f0b2d00 100644 --- a/tests/test_ssl_pool.py +++ b/tests/test_ssl_pool.py @@ -16,8 +16,8 @@ from unittest import TestCase -from nebula2.gclient.net import ConnectionPool -from nebula2.Config import Config, SSL_config +from nebula3.gclient.net import ConnectionPool +from nebula3.Config import Config, SSL_config @pytest.mark.SSL