From 446e98341a3981b2c5b10cafc30a55135d59d6e2 Mon Sep 17 00:00:00 2001 From: chyezh Date: Fri, 26 Apr 2024 11:45:24 +0800 Subject: [PATCH] [Cherry-Pick] enhance: add resource group declarative api (#2002) (#2054) issue: https://github.com/milvus-io/milvus/issues/32282 picked from pr: #2002 - Add param `config` for `create_resource_group` api. - Add `update_resource_groups` api to implement declarative resource group api. - Add new example for declarative resource group api. Signed-off-by: chyezh --- examples/resource_group.py | 5 +- examples/resource_group_declarative_api.py | 157 +++++++++++++++++++++ pymilvus/__init__.py | 2 + pymilvus/client/grpc_handler.py | 13 +- pymilvus/client/prepare.py | 22 ++- pymilvus/client/stub.py | 13 ++ pymilvus/client/types.py | 90 +++++++++++- pymilvus/grpc_gen/common_pb2.py | 56 ++++---- pymilvus/grpc_gen/common_pb2.pyi | 8 +- pymilvus/grpc_gen/milvus-proto | 2 +- pymilvus/grpc_gen/rg_pb2.py | 12 +- pymilvus/grpc_gen/rg_pb2.pyi | 19 +-- pymilvus/grpc_gen/schema_pb2.py | 92 ++++++------ pymilvus/grpc_gen/schema_pb2.pyi | 12 +- pymilvus/orm/utility.py | 50 ++++++- 15 files changed, 441 insertions(+), 112 deletions(-) create mode 100644 examples/resource_group_declarative_api.py diff --git a/examples/resource_group.py b/examples/resource_group.py index cdfc46914..5c9c98a6e 100644 --- a/examples/resource_group.py +++ b/examples/resource_group.py @@ -1,4 +1,5 @@ -from pymilvus import utility, connections, DEFAULT_RESOURCE_GROUP +from pymilvus import utility, connections +from pymilvus.client.constants import DEFAULT_RESOURCE_GROUP from example import * _HOST = '127.0.0.1' @@ -52,7 +53,7 @@ def transfer_replica(source, target, collection_name, num_replica): f"transfer {num_replica} replicas in {collection_name} from {source} to {target}") utility.transfer_replica( source, target, collection_name, num_replica, using=_CONNECTION_NAME) - + def run(): create_connection("root", "123456") coll = create_collection(_COLLECTION_NAME, _ID_FIELD_NAME, _VECTOR_FIELD_NAME) diff --git a/examples/resource_group_declarative_api.py b/examples/resource_group_declarative_api.py new file mode 100644 index 000000000..a5df77496 --- /dev/null +++ b/examples/resource_group_declarative_api.py @@ -0,0 +1,157 @@ +from pymilvus import utility, connections, Collection +from pymilvus.client.constants import DEFAULT_RESOURCE_GROUP +from pymilvus.client.types import ResourceGroupConfig +from typing import List +from example import create_connection, create_collection, insert, create_index + +_PENDING_NODES_RESOURCE_GROUP="pending_nodes" +# Vector parameters +_DIM = 128 +_COLLECTION_NAME = 'rg_declarative_demo' +_ID_FIELD_NAME = 'id_field' +_VECTOR_FIELD_NAME = 'float_vector_field' + +def create_example_collection_and_load(replica_number: int, resource_groups: List[str]): + print(f"\nCreate collection and load...") + coll = create_collection(_COLLECTION_NAME, _ID_FIELD_NAME, _VECTOR_FIELD_NAME) + insert(coll, 10000, _DIM) + coll.flush() + create_index(coll, _VECTOR_FIELD_NAME) + coll.load(replica_number=replica_number, _resource_groups=resource_groups) + +def transfer_replica(src: str, dest: str, num_replica: int): + utility.transfer_replica(source_group=src, target_group=dest, collection_name=_COLLECTION_NAME, num_replicas=num_replica) + +def list_replica(): + coll = Collection(name=_COLLECTION_NAME) + replicas = coll.get_replicas() + print(replicas) + +def init_cluster(node_num: int): + print(f"Init cluster with {node_num} nodes, all nodes will be put in default resource group") + # create a pending resource group, which can used to hold the pending nodes that do not hold any data. + utility.create_resource_group(name=_PENDING_NODES_RESOURCE_GROUP, config=ResourceGroupConfig( + requests={"node_num": 0}, # this resource group can hold 0 nodes, no data will be load on it. + limits={"node_num": 10000}, # this resource group can hold at most 10000 nodes + )) + + # create a default resource group, which can used to hold the nodes that all initial node in it. + utility.update_resource_groups({ + DEFAULT_RESOURCE_GROUP: ResourceGroupConfig( + requests={"node_num": node_num}, + limits={"node_num": node_num}, + transfer_from=[{"resource_group": _PENDING_NODES_RESOURCE_GROUP}], # recover missing node from pending resource group at high priority. + transfer_to=[{"resource_group": _PENDING_NODES_RESOURCE_GROUP}], # recover redundant node to pending resource group at low priority. + )}) + +def list_all_resource_groups(): + rg_names = utility.list_resource_groups() + + for rg_name in rg_names: + resource_group = utility.describe_resource_group(rg_name) + print(resource_group) + # print(f"Resource group {rg_name} has {resource_group.nodes} with config: {resource_group.config}") + +def scale_resource_group_to(name :str, node_num: int): + """scale resource group to node_num nodes, new query node need to be added from outside orchestration system""" + utility.update_resource_groups({ + name: ResourceGroupConfig( + requests={"node_num": node_num}, + limits={"node_num": node_num}, + transfer_from=[{"resource_group": _PENDING_NODES_RESOURCE_GROUP}], # recover missing node from pending resource group at high priority. + transfer_to=[{"resource_group": _PENDING_NODES_RESOURCE_GROUP}], # recover redundant node to pending resource group at low priority. + ) + }) + +def create_resource_group(name: str, node_num: int): + print(f"Create resource group {name} with {node_num} nodes") + utility.create_resource_group(name, config=ResourceGroupConfig( + requests={"node_num": node_num}, + limits={"node_num": node_num}, + transfer_from=[{"resource_group": _PENDING_NODES_RESOURCE_GROUP}], # recover missing node from pending resource group at high priority. + transfer_to=[{"resource_group": _PENDING_NODES_RESOURCE_GROUP}], # recover redundant node to pending resource group at low priority. + )) + +def resource_group_management(): + # cluster is initialized with 1 node in default resource group, and 0 node in pending resource group. + init_cluster(1) + list_all_resource_groups() + # DEFAULT_RESOURCE_GROUP: 1 + # _PENDING_NODES_RESOURCE_GROUP: 0 + + # rg1 missing two query node. + create_resource_group("rg1", 2) + list_all_resource_groups() + # DEFAULT_RESOURCE_GROUP: 1 + # _PENDING_NODES_RESOURCE_GROUP: 0 + # rg1: 0(missing 2) + + # scale_out(2) + # scale out two new query node into cluster by orchestration system, these node will be added to rg1 automatically. + list_all_resource_groups() + # DEFAULT_RESOURCE_GROUP: 1 + # _PENDING_NODES_RESOURCE_GROUP: 0 + # rg1: 2 + + + # rg1 missing one query node. + scale_resource_group_to("rg1", 3) + list_all_resource_groups() + # DEFAULT_RESOURCE_GROUP: 1 + # _PENDING_NODES_RESOURCE_GROUP: 0 + # rg1: 2(missing 1) + + # scale_out(2) + # scale out two new query node into cluster by orchestration system, one node will be added to rg1 automatically + # and one redundant node will be added to pending resource group. + list_all_resource_groups() + # DEFAULT_RESOURCE_GROUP: 1 + # _PENDING_NODES_RESOURCE_GROUP: 1 + # rg1: 3 + + scale_resource_group_to("rg1", 1) + list_all_resource_groups() + # DEFAULT_RESOURCE_GROUP: 1 + # _PENDING_NODES_RESOURCE_GROUP: 3 + # rg1: 1 + + # rg2 missing three query node, will be added from pending resource group. + create_resource_group("rg2", 3) + list_all_resource_groups() + # DEFAULT_RESOURCE_GROUP: 1 + # _PENDING_NODES_RESOURCE_GROUP: 0 + # rg1: 1 + # rg2: 3 + + scale_resource_group_to(DEFAULT_RESOURCE_GROUP, 5) + list_all_resource_groups() + # DEFAULT_RESOURCE_GROUP: 1(missing 4) + # _PENDING_NODES_RESOURCE_GROUP: 0 + # rg1: 1 + # rg2: 3 + + # scale_out(4) + list_all_resource_groups() + # DEFAULT_RESOURCE_GROUP: 5 + # _PENDING_NODES_RESOURCE_GROUP: 1 + # rg1: 1 + # rg2: 3 + +def replica_management(): + # load collection into default. + # create_example_collection_and_load(4, ["rg1", "rg2", "rg2", "rg2"]) + # one replica per node in default resource group. + list_replica() + transfer_replica("rg1", DEFAULT_RESOURCE_GROUP, 1) + list_replica() + transfer_replica("rg2", DEFAULT_RESOURCE_GROUP, 1) + list_replica() + # DEFAULT_RESOURCE_GROUP: 2 replica on 5 nodes. + # rg1: 0 replica. + # rg2: 2 replica on 3 nodes. + +if __name__ == "__main__": + create_connection() + resource_group_management() + create_example_collection_and_load(4, ["rg1", "rg2", "rg2", "rg2"]) + replica_management() diff --git a/pymilvus/__init__.py b/pymilvus/__init__.py index 63abb5f8d..a8201da42 100644 --- a/pymilvus/__init__.py +++ b/pymilvus/__init__.py @@ -78,6 +78,7 @@ transfer_node, transfer_replica, update_password, + update_resource_groups, wait_for_index_building_complete, wait_for_loading_complete, ) @@ -106,6 +107,7 @@ "reset_password", "create_user", "update_password", + "update_resource_groups", "delete_user", "list_usernames", "SearchResult", diff --git a/pymilvus/client/grpc_handler.py b/pymilvus/client/grpc_handler.py index 460529e1c..7d37aedde 100644 --- a/pymilvus/client/grpc_handler.py +++ b/pymilvus/client/grpc_handler.py @@ -4,7 +4,7 @@ import socket import time from pathlib import Path -from typing import Any, Callable, Dict, List, Optional, Union +from typing import Any, Callable, Dict, List, Mapping, Optional, Union from urllib import parse import grpc @@ -49,6 +49,7 @@ LoadState, Plan, Replica, + ResourceGroupConfig, ResourceGroupInfo, RoleInfo, Shard, @@ -1838,10 +1839,18 @@ def get_server_version(self, timeout: Optional[float] = None, **kwargs) -> str: @retry_on_rpc_failure() def create_resource_group(self, name: str, timeout: Optional[float] = None, **kwargs): - req = Prepare.create_resource_group(name) + req = Prepare.create_resource_group(name, **kwargs) resp = self._stub.CreateResourceGroup(req, wait_for_ready=True, timeout=timeout) check_status(resp) + @retry_on_rpc_failure() + def update_resource_groups( + self, configs: Mapping[str, ResourceGroupConfig], timeout: Optional[float] = None, **kwargs + ): + req = Prepare.update_resource_groups(configs) + resp = self._stub.UpdateResourceGroups(req, wait_for_ready=True, timeout=timeout) + check_status(resp) + @retry_on_rpc_failure() def drop_resource_group(self, name: str, timeout: Optional[float] = None, **kwargs): req = Prepare.drop_resource_group(name) diff --git a/pymilvus/client/prepare.py b/pymilvus/client/prepare.py index b0f3ea19f..a756a1dc7 100644 --- a/pymilvus/client/prepare.py +++ b/pymilvus/client/prepare.py @@ -1,6 +1,6 @@ import base64 import datetime -from typing import Any, Dict, Iterable, List, Optional, Union +from typing import Any, Dict, Iterable, List, Mapping, Optional, Union import numpy as np @@ -19,7 +19,12 @@ ITERATOR_FIELD, REDUCE_STOP_FOR_BEST, ) -from .types import DataType, PlaceholderType, get_consistency_level +from .types import ( + DataType, + PlaceholderType, + ResourceGroupConfig, + get_consistency_level, +) from .utils import traverse_info, traverse_rows_info @@ -1146,9 +1151,18 @@ def get_server_version(cls): return milvus_types.GetVersionRequest() @classmethod - def create_resource_group(cls, name: str): + def create_resource_group(cls, name: str, **kwargs): check_pass_param(resource_group_name=name) - return milvus_types.CreateResourceGroupRequest(resource_group=name) + return milvus_types.CreateResourceGroupRequest( + resource_group=name, + config=kwargs.get("config"), + ) + + @classmethod + def update_resource_groups(cls, configs: Mapping[str, ResourceGroupConfig]): + return milvus_types.UpdateResourceGroupsRequest( + resource_groups=configs, + ) @classmethod def drop_resource_group(cls, name: str): diff --git a/pymilvus/client/stub.py b/pymilvus/client/stub.py index fb6a4de86..e5b200d0e 100644 --- a/pymilvus/client/stub.py +++ b/pymilvus/client/stub.py @@ -3,6 +3,7 @@ from pymilvus.decorators import deprecated from pymilvus.exceptions import MilvusException, ParamError from pymilvus.settings import Config +from typing import Mapping from .check import is_legal_host, is_legal_port from .grpc_handler import GrpcHandler @@ -12,6 +13,7 @@ CompactionState, Replica, ResourceGroupInfo, + ResourceGroupConfig, ) @@ -1381,6 +1383,17 @@ def create_resource_group(self, name, timeout=None, **kwargs): with self._connection() as handler: handler.create_resource_group(name, timeout=timeout, **kwargs) + def update_resource_groups( + self, configs: Mapping[str, ResourceGroupConfig], timeout=None, **kwargs + ): + """update resource groups with specific configs + + :param configs: resource group configs + :type name: Mapping + """ + with self._connection() as handler: + handler.update_resource_groups(configs=configs, timeout=timeout, **kwargs) + def drop_resource_group(self, name, timeout=None, **kwargs): """drop resource group with specific name diff --git a/pymilvus/client/types.py b/pymilvus/client/types.py index 3434e3ddd..b8d433faa 100644 --- a/pymilvus/client/types.py +++ b/pymilvus/client/types.py @@ -7,7 +7,7 @@ ExceptionsMessage, InvalidConsistencyLevel, ) -from pymilvus.grpc_gen import common_pb2 +from pymilvus.grpc_gen import common_pb2, rg_pb2 from pymilvus.grpc_gen import milvus_pb2 as milvus_types Status = TypeVar("Status") @@ -763,12 +763,15 @@ def groups(self): class ResourceGroupInfo: def __init__(self, resource_group: Any) -> None: + self._name = resource_group.name self._capacity = resource_group.capacity self._num_available_node = resource_group.num_available_node self._num_loaded_replica = resource_group.num_loaded_replica self._num_outgoing_node = resource_group.num_outgoing_node self._num_incoming_node = resource_group.num_incoming_node + self._config = resource_group.config + self._nodes = [NodeInfo(node) for node in resource_group.nodes] def __repr__(self) -> str: return f"""ResourceGroupInfo: @@ -777,7 +780,9 @@ def __repr__(self) -> str: , , , -""" +, +, +""" @property def name(self): @@ -802,3 +807,84 @@ def num_outgoing_node(self): @property def num_incoming_node(self): return self._num_incoming_node + + @property + def config(self): + return self._config + + @property + def nodes(self): + return self._nodes + + +class NodeInfo: + """ + Represents information about a node in the system. + Attributes: + node_id (int): The ID of the node. + address (str): The ip address of the node. + hostname (str): The hostname of the node. + Example: + NodeInfo( + node_id=1, + address="127.0.0.1", + hostname="localhost", + ) + """ + + def __init__(self, info: Any) -> None: + self._node_id = info.node_id + self._address = info.address + self._hostname = info.hostname + + def __repr__(self) -> str: + return f"""NodeInfo: +, +, +""" + + @property + def node_id(self) -> int: + return self._node_id + + @property + def address(self) -> str: + return self._address + + @property + def hostname(self) -> str: + return self._hostname + + +ResourceGroupConfig = rg_pb2.ResourceGroupConfig +""" +Represents the configuration of a resource group. +Attributes: + requests (ResourceGroupLimit): The requests of the resource group. + limits (ResourceGroupLimit): The limits of the resource group. + transfer_from (List[ResourceGroupTransfer]): The transfer config that resource group + can transfer node from the resource group of this field at high priority. + transfer_to (List[ResourceGroupTransfer]): The transfer config that resource group + can transfer node to the resource group of this field at high priority. +Example: + ResourceGroupConfig( + requests={"node_num": 1}, + limits={"node_num": 5}, + transfer_from=[{"resource_group": "__default_resource_group"}], + transfer_to=[{"resource_group": "resource_group_2"}], + ) +""" + +ResourceGroupLimit = rg_pb2.ResourceGroupLimit +""" +Represents the limit of a resource group. +Attributes: + node_num (int): The number of nodes that the resource group can hold. +""" + +ResourceGroupTransfer = rg_pb2.ResourceGroupTransfer +""" +Represents the transfer config of a resource group. +Attributes: + resource_group (str): The name of the resource group that can be transferred to or from. +""" diff --git a/pymilvus/grpc_gen/common_pb2.py b/pymilvus/grpc_gen/common_pb2.py index 3256a9781..aaaaecbb5 100644 --- a/pymilvus/grpc_gen/common_pb2.py +++ b/pymilvus/grpc_gen/common_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63ommon.proto\x12\x13milvus.proto.common\x1a google/protobuf/descriptor.proto\"\xf3\x01\n\x06Status\x12\x36\n\nerror_code\x18\x01 \x01(\x0e\x32\x1e.milvus.proto.common.ErrorCodeB\x02\x18\x01\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\x05\x12\x11\n\tretriable\x18\x04 \x01(\x08\x12\x0e\n\x06\x64\x65tail\x18\x05 \x01(\t\x12>\n\nextra_info\x18\x06 \x03(\x0b\x32*.milvus.proto.common.Status.ExtraInfoEntry\x1a\x30\n\x0e\x45xtraInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x0cKeyValuePair\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"(\n\x0bKeyDataPair\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x15\n\x04\x42lob\x12\r\n\x05value\x18\x01 \x01(\x0c\"c\n\x10PlaceholderValue\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.milvus.proto.common.PlaceholderType\x12\x0e\n\x06values\x18\x03 \x03(\x0c\"O\n\x10PlaceholderGroup\x12;\n\x0cplaceholders\x18\x01 \x03(\x0b\x32%.milvus.proto.common.PlaceholderValue\"#\n\x07\x41\x64\x64ress\x12\n\n\x02ip\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x03\"\xaf\x02\n\x07MsgBase\x12.\n\x08msg_type\x18\x01 \x01(\x0e\x32\x1c.milvus.proto.common.MsgType\x12\r\n\x05msgID\x18\x02 \x01(\x03\x12\x11\n\ttimestamp\x18\x03 \x01(\x04\x12\x10\n\x08sourceID\x18\x04 \x01(\x03\x12\x10\n\x08targetID\x18\x05 \x01(\x03\x12@\n\nproperties\x18\x06 \x03(\x0b\x32,.milvus.proto.common.MsgBase.PropertiesEntry\x12\x39\n\rreplicateInfo\x18\x07 \x01(\x0b\x32\".milvus.proto.common.ReplicateInfo\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\rReplicateInfo\x12\x13\n\x0bisReplicate\x18\x01 \x01(\x08\x12\x14\n\x0cmsgTimestamp\x18\x02 \x01(\x04\"7\n\tMsgHeader\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\"M\n\x0c\x44MLMsgHeader\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x11\n\tshardName\x18\x02 \x01(\t\"\xbb\x01\n\x0cPrivilegeExt\x12\x34\n\x0bobject_type\x18\x01 \x01(\x0e\x32\x1f.milvus.proto.common.ObjectType\x12>\n\x10object_privilege\x18\x02 \x01(\x0e\x32$.milvus.proto.common.ObjectPrivilege\x12\x19\n\x11object_name_index\x18\x03 \x01(\x05\x12\x1a\n\x12object_name_indexs\x18\x04 \x01(\x05\"2\n\x0cSegmentStats\x12\x11\n\tSegmentID\x18\x01 \x01(\x03\x12\x0f\n\x07NumRows\x18\x02 \x01(\x03\"\xd5\x01\n\nClientInfo\x12\x10\n\x08sdk_type\x18\x01 \x01(\t\x12\x13\n\x0bsdk_version\x18\x02 \x01(\t\x12\x12\n\nlocal_time\x18\x03 \x01(\t\x12\x0c\n\x04user\x18\x04 \x01(\t\x12\x0c\n\x04host\x18\x05 \x01(\t\x12?\n\x08reserved\x18\x06 \x03(\x0b\x32-.milvus.proto.common.ClientInfo.ReservedEntry\x1a/\n\rReservedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe3\x01\n\nServerInfo\x12\x12\n\nbuild_tags\x18\x01 \x01(\t\x12\x12\n\nbuild_time\x18\x02 \x01(\t\x12\x12\n\ngit_commit\x18\x03 \x01(\t\x12\x12\n\ngo_version\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65ploy_mode\x18\x05 \x01(\t\x12?\n\x08reserved\x18\x06 \x03(\x0b\x32-.milvus.proto.common.ServerInfo.ReservedEntry\x1a/\n\rReservedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x08NodeInfo\x12\x0e\n\x06nodeID\x18\x01 \x01(\x03\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x10\n\x08hostname\x18\x03 \x01(\t*\xc7\n\n\tErrorCode\x12\x0b\n\x07Success\x10\x00\x12\x13\n\x0fUnexpectedError\x10\x01\x12\x11\n\rConnectFailed\x10\x02\x12\x14\n\x10PermissionDenied\x10\x03\x12\x17\n\x13\x43ollectionNotExists\x10\x04\x12\x13\n\x0fIllegalArgument\x10\x05\x12\x14\n\x10IllegalDimension\x10\x07\x12\x14\n\x10IllegalIndexType\x10\x08\x12\x19\n\x15IllegalCollectionName\x10\t\x12\x0f\n\x0bIllegalTOPK\x10\n\x12\x14\n\x10IllegalRowRecord\x10\x0b\x12\x13\n\x0fIllegalVectorID\x10\x0c\x12\x17\n\x13IllegalSearchResult\x10\r\x12\x10\n\x0c\x46ileNotFound\x10\x0e\x12\x0e\n\nMetaFailed\x10\x0f\x12\x0f\n\x0b\x43\x61\x63heFailed\x10\x10\x12\x16\n\x12\x43\x61nnotCreateFolder\x10\x11\x12\x14\n\x10\x43\x61nnotCreateFile\x10\x12\x12\x16\n\x12\x43\x61nnotDeleteFolder\x10\x13\x12\x14\n\x10\x43\x61nnotDeleteFile\x10\x14\x12\x13\n\x0f\x42uildIndexError\x10\x15\x12\x10\n\x0cIllegalNLIST\x10\x16\x12\x15\n\x11IllegalMetricType\x10\x17\x12\x0f\n\x0bOutOfMemory\x10\x18\x12\x11\n\rIndexNotExist\x10\x19\x12\x13\n\x0f\x45mptyCollection\x10\x1a\x12\x1b\n\x17UpdateImportTaskFailure\x10\x1b\x12\x1a\n\x16\x43ollectionNameNotFound\x10\x1c\x12\x1b\n\x17\x43reateCredentialFailure\x10\x1d\x12\x1b\n\x17UpdateCredentialFailure\x10\x1e\x12\x1b\n\x17\x44\x65leteCredentialFailure\x10\x1f\x12\x18\n\x14GetCredentialFailure\x10 \x12\x18\n\x14ListCredUsersFailure\x10!\x12\x12\n\x0eGetUserFailure\x10\"\x12\x15\n\x11\x43reateRoleFailure\x10#\x12\x13\n\x0f\x44ropRoleFailure\x10$\x12\x1a\n\x16OperateUserRoleFailure\x10%\x12\x15\n\x11SelectRoleFailure\x10&\x12\x15\n\x11SelectUserFailure\x10\'\x12\x19\n\x15SelectResourceFailure\x10(\x12\x1b\n\x17OperatePrivilegeFailure\x10)\x12\x16\n\x12SelectGrantFailure\x10*\x12!\n\x1dRefreshPolicyInfoCacheFailure\x10+\x12\x15\n\x11ListPolicyFailure\x10,\x12\x12\n\x0eNotShardLeader\x10-\x12\x16\n\x12NoReplicaAvailable\x10.\x12\x13\n\x0fSegmentNotFound\x10/\x12\r\n\tForceDeny\x10\x30\x12\r\n\tRateLimit\x10\x31\x12\x12\n\x0eNodeIDNotMatch\x10\x32\x12\x14\n\x10UpsertAutoIDTrue\x10\x33\x12\x1c\n\x18InsufficientMemoryToLoad\x10\x34\x12\x18\n\x14MemoryQuotaExhausted\x10\x35\x12\x16\n\x12\x44iskQuotaExhausted\x10\x36\x12\x15\n\x11TimeTickLongDelay\x10\x37\x12\x11\n\rNotReadyServe\x10\x38\x12\x1b\n\x17NotReadyCoordActivating\x10\x39\x12\x0f\n\x0b\x44\x61taCoordNA\x10\x64\x12\x12\n\rDDRequestRace\x10\xe8\x07\x1a\x02\x18\x01*c\n\nIndexState\x12\x12\n\x0eIndexStateNone\x10\x00\x12\x0c\n\x08Unissued\x10\x01\x12\x0e\n\nInProgress\x10\x02\x12\x0c\n\x08\x46inished\x10\x03\x12\n\n\x06\x46\x61iled\x10\x04\x12\t\n\x05Retry\x10\x05*\x82\x01\n\x0cSegmentState\x12\x14\n\x10SegmentStateNone\x10\x00\x12\x0c\n\x08NotExist\x10\x01\x12\x0b\n\x07Growing\x10\x02\x12\n\n\x06Sealed\x10\x03\x12\x0b\n\x07\x46lushed\x10\x04\x12\x0c\n\x08\x46lushing\x10\x05\x12\x0b\n\x07\x44ropped\x10\x06\x12\r\n\tImporting\x10\x07*\x94\x01\n\x0fPlaceholderType\x12\x08\n\x04None\x10\x00\x12\x10\n\x0c\x42inaryVector\x10\x64\x12\x0f\n\x0b\x46loatVector\x10\x65\x12\x11\n\rFloat16Vector\x10\x66\x12\x12\n\x0e\x42\x46loat16Vector\x10g\x12\x15\n\x11SparseFloatVector\x10h\x12\t\n\x05Int64\x10\x05\x12\x0b\n\x07VarChar\x10\x15*\xe0\x10\n\x07MsgType\x12\r\n\tUndefined\x10\x00\x12\x14\n\x10\x43reateCollection\x10\x64\x12\x12\n\x0e\x44ropCollection\x10\x65\x12\x11\n\rHasCollection\x10\x66\x12\x16\n\x12\x44\x65scribeCollection\x10g\x12\x13\n\x0fShowCollections\x10h\x12\x14\n\x10GetSystemConfigs\x10i\x12\x12\n\x0eLoadCollection\x10j\x12\x15\n\x11ReleaseCollection\x10k\x12\x0f\n\x0b\x43reateAlias\x10l\x12\r\n\tDropAlias\x10m\x12\x0e\n\nAlterAlias\x10n\x12\x13\n\x0f\x41lterCollection\x10o\x12\x14\n\x10RenameCollection\x10p\x12\x11\n\rDescribeAlias\x10q\x12\x0f\n\x0bListAliases\x10r\x12\x14\n\x0f\x43reatePartition\x10\xc8\x01\x12\x12\n\rDropPartition\x10\xc9\x01\x12\x11\n\x0cHasPartition\x10\xca\x01\x12\x16\n\x11\x44\x65scribePartition\x10\xcb\x01\x12\x13\n\x0eShowPartitions\x10\xcc\x01\x12\x13\n\x0eLoadPartitions\x10\xcd\x01\x12\x16\n\x11ReleasePartitions\x10\xce\x01\x12\x11\n\x0cShowSegments\x10\xfa\x01\x12\x14\n\x0f\x44\x65scribeSegment\x10\xfb\x01\x12\x11\n\x0cLoadSegments\x10\xfc\x01\x12\x14\n\x0fReleaseSegments\x10\xfd\x01\x12\x14\n\x0fHandoffSegments\x10\xfe\x01\x12\x18\n\x13LoadBalanceSegments\x10\xff\x01\x12\x15\n\x10\x44\x65scribeSegments\x10\x80\x02\x12\x1c\n\x17\x46\x65\x64\x65rListIndexedSegment\x10\x81\x02\x12\"\n\x1d\x46\x65\x64\x65rDescribeSegmentIndexData\x10\x82\x02\x12\x10\n\x0b\x43reateIndex\x10\xac\x02\x12\x12\n\rDescribeIndex\x10\xad\x02\x12\x0e\n\tDropIndex\x10\xae\x02\x12\x17\n\x12GetIndexStatistics\x10\xaf\x02\x12\x0f\n\nAlterIndex\x10\xb0\x02\x12\x0b\n\x06Insert\x10\x90\x03\x12\x0b\n\x06\x44\x65lete\x10\x91\x03\x12\n\n\x05\x46lush\x10\x92\x03\x12\x17\n\x12ResendSegmentStats\x10\x93\x03\x12\x0b\n\x06Upsert\x10\x94\x03\x12\x0b\n\x06Search\x10\xf4\x03\x12\x11\n\x0cSearchResult\x10\xf5\x03\x12\x12\n\rGetIndexState\x10\xf6\x03\x12\x1a\n\x15GetIndexBuildProgress\x10\xf7\x03\x12\x1c\n\x17GetCollectionStatistics\x10\xf8\x03\x12\x1b\n\x16GetPartitionStatistics\x10\xf9\x03\x12\r\n\x08Retrieve\x10\xfa\x03\x12\x13\n\x0eRetrieveResult\x10\xfb\x03\x12\x14\n\x0fWatchDmChannels\x10\xfc\x03\x12\x15\n\x10RemoveDmChannels\x10\xfd\x03\x12\x17\n\x12WatchQueryChannels\x10\xfe\x03\x12\x18\n\x13RemoveQueryChannels\x10\xff\x03\x12\x1d\n\x18SealedSegmentsChangeInfo\x10\x80\x04\x12\x17\n\x12WatchDeltaChannels\x10\x81\x04\x12\x14\n\x0fGetShardLeaders\x10\x82\x04\x12\x10\n\x0bGetReplicas\x10\x83\x04\x12\x13\n\x0eUnsubDmChannel\x10\x84\x04\x12\x14\n\x0fGetDistribution\x10\x85\x04\x12\x15\n\x10SyncDistribution\x10\x86\x04\x12\x10\n\x0bSegmentInfo\x10\xd8\x04\x12\x0f\n\nSystemInfo\x10\xd9\x04\x12\x14\n\x0fGetRecoveryInfo\x10\xda\x04\x12\x14\n\x0fGetSegmentState\x10\xdb\x04\x12\r\n\x08TimeTick\x10\xb0\t\x12\x13\n\x0eQueryNodeStats\x10\xb1\t\x12\x0e\n\tLoadIndex\x10\xb2\t\x12\x0e\n\tRequestID\x10\xb3\t\x12\x0f\n\nRequestTSO\x10\xb4\t\x12\x14\n\x0f\x41llocateSegment\x10\xb5\t\x12\x16\n\x11SegmentStatistics\x10\xb6\t\x12\x15\n\x10SegmentFlushDone\x10\xb7\t\x12\x0f\n\nDataNodeTt\x10\xb8\t\x12\x0c\n\x07\x43onnect\x10\xb9\t\x12\x14\n\x0fListClientInfos\x10\xba\t\x12\x13\n\x0e\x41llocTimestamp\x10\xbb\t\x12\x15\n\x10\x43reateCredential\x10\xdc\x0b\x12\x12\n\rGetCredential\x10\xdd\x0b\x12\x15\n\x10\x44\x65leteCredential\x10\xde\x0b\x12\x15\n\x10UpdateCredential\x10\xdf\x0b\x12\x16\n\x11ListCredUsernames\x10\xe0\x0b\x12\x0f\n\nCreateRole\x10\xc0\x0c\x12\r\n\x08\x44ropRole\x10\xc1\x0c\x12\x14\n\x0fOperateUserRole\x10\xc2\x0c\x12\x0f\n\nSelectRole\x10\xc3\x0c\x12\x0f\n\nSelectUser\x10\xc4\x0c\x12\x13\n\x0eSelectResource\x10\xc5\x0c\x12\x15\n\x10OperatePrivilege\x10\xc6\x0c\x12\x10\n\x0bSelectGrant\x10\xc7\x0c\x12\x1b\n\x16RefreshPolicyInfoCache\x10\xc8\x0c\x12\x0f\n\nListPolicy\x10\xc9\x0c\x12\x18\n\x13\x43reateResourceGroup\x10\xa4\r\x12\x16\n\x11\x44ropResourceGroup\x10\xa5\r\x12\x17\n\x12ListResourceGroups\x10\xa6\r\x12\x1a\n\x15\x44\x65scribeResourceGroup\x10\xa7\r\x12\x11\n\x0cTransferNode\x10\xa8\r\x12\x14\n\x0fTransferReplica\x10\xa9\r\x12\x19\n\x14UpdateResourceGroups\x10\xaa\r\x12\x13\n\x0e\x43reateDatabase\x10\x89\x0e\x12\x11\n\x0c\x44ropDatabase\x10\x8a\x0e\x12\x12\n\rListDatabases\x10\x8b\x0e*\"\n\x07\x44slType\x12\x07\n\x03\x44sl\x10\x00\x12\x0e\n\nBoolExprV1\x10\x01*B\n\x0f\x43ompactionState\x12\x11\n\rUndefiedState\x10\x00\x12\r\n\tExecuting\x10\x01\x12\r\n\tCompleted\x10\x02*X\n\x10\x43onsistencyLevel\x12\n\n\x06Strong\x10\x00\x12\x0b\n\x07Session\x10\x01\x12\x0b\n\x07\x42ounded\x10\x02\x12\x0e\n\nEventually\x10\x03\x12\x0e\n\nCustomized\x10\x04*\x9e\x01\n\x0bImportState\x12\x11\n\rImportPending\x10\x00\x12\x10\n\x0cImportFailed\x10\x01\x12\x11\n\rImportStarted\x10\x02\x12\x13\n\x0fImportPersisted\x10\x05\x12\x11\n\rImportFlushed\x10\x08\x12\x13\n\x0fImportCompleted\x10\x06\x12\x1a\n\x16ImportFailedAndCleaned\x10\x07*2\n\nObjectType\x12\x0e\n\nCollection\x10\x00\x12\n\n\x06Global\x10\x01\x12\x08\n\x04User\x10\x02*\xba\n\n\x0fObjectPrivilege\x12\x10\n\x0cPrivilegeAll\x10\x00\x12\x1d\n\x19PrivilegeCreateCollection\x10\x01\x12\x1b\n\x17PrivilegeDropCollection\x10\x02\x12\x1f\n\x1bPrivilegeDescribeCollection\x10\x03\x12\x1c\n\x18PrivilegeShowCollections\x10\x04\x12\x11\n\rPrivilegeLoad\x10\x05\x12\x14\n\x10PrivilegeRelease\x10\x06\x12\x17\n\x13PrivilegeCompaction\x10\x07\x12\x13\n\x0fPrivilegeInsert\x10\x08\x12\x13\n\x0fPrivilegeDelete\x10\t\x12\x1a\n\x16PrivilegeGetStatistics\x10\n\x12\x18\n\x14PrivilegeCreateIndex\x10\x0b\x12\x18\n\x14PrivilegeIndexDetail\x10\x0c\x12\x16\n\x12PrivilegeDropIndex\x10\r\x12\x13\n\x0fPrivilegeSearch\x10\x0e\x12\x12\n\x0ePrivilegeFlush\x10\x0f\x12\x12\n\x0ePrivilegeQuery\x10\x10\x12\x18\n\x14PrivilegeLoadBalance\x10\x11\x12\x13\n\x0fPrivilegeImport\x10\x12\x12\x1c\n\x18PrivilegeCreateOwnership\x10\x13\x12\x17\n\x13PrivilegeUpdateUser\x10\x14\x12\x1a\n\x16PrivilegeDropOwnership\x10\x15\x12\x1c\n\x18PrivilegeSelectOwnership\x10\x16\x12\x1c\n\x18PrivilegeManageOwnership\x10\x17\x12\x17\n\x13PrivilegeSelectUser\x10\x18\x12\x13\n\x0fPrivilegeUpsert\x10\x19\x12 \n\x1cPrivilegeCreateResourceGroup\x10\x1a\x12\x1e\n\x1aPrivilegeDropResourceGroup\x10\x1b\x12\"\n\x1ePrivilegeDescribeResourceGroup\x10\x1c\x12\x1f\n\x1bPrivilegeListResourceGroups\x10\x1d\x12\x19\n\x15PrivilegeTransferNode\x10\x1e\x12\x1c\n\x18PrivilegeTransferReplica\x10\x1f\x12\x1f\n\x1bPrivilegeGetLoadingProgress\x10 \x12\x19\n\x15PrivilegeGetLoadState\x10!\x12\x1d\n\x19PrivilegeRenameCollection\x10\"\x12\x1b\n\x17PrivilegeCreateDatabase\x10#\x12\x19\n\x15PrivilegeDropDatabase\x10$\x12\x1a\n\x16PrivilegeListDatabases\x10%\x12\x15\n\x11PrivilegeFlushAll\x10&\x12\x1c\n\x18PrivilegeCreatePartition\x10\'\x12\x1a\n\x16PrivilegeDropPartition\x10(\x12\x1b\n\x17PrivilegeShowPartitions\x10)\x12\x19\n\x15PrivilegeHasPartition\x10*\x12\x1a\n\x16PrivilegeGetFlushState\x10+\x12\x18\n\x14PrivilegeCreateAlias\x10,\x12\x16\n\x12PrivilegeDropAlias\x10-\x12\x1a\n\x16PrivilegeDescribeAlias\x10.\x12\x18\n\x14PrivilegeListAliases\x10/\x12!\n\x1dPrivilegeUpdateResourceGroups\x10\x30*S\n\tStateCode\x12\x10\n\x0cInitializing\x10\x00\x12\x0b\n\x07Healthy\x10\x01\x12\x0c\n\x08\x41\x62normal\x10\x02\x12\x0b\n\x07StandBy\x10\x03\x12\x0c\n\x08Stopping\x10\x04*c\n\tLoadState\x12\x15\n\x11LoadStateNotExist\x10\x00\x12\x14\n\x10LoadStateNotLoad\x10\x01\x12\x14\n\x10LoadStateLoading\x10\x02\x12\x13\n\x0fLoadStateLoaded\x10\x03:^\n\x11privilege_ext_obj\x12\x1f.google.protobuf.MessageOptions\x18\xe9\x07 \x01(\x0b\x32!.milvus.proto.common.PrivilegeExtBm\n\x0eio.milvus.grpcB\x0b\x43ommonProtoP\x01Z4github.com/milvus-io/milvus-proto/go-api/v2/commonpb\xa0\x01\x01\xaa\x02\x12Milvus.Client.Grpcb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63ommon.proto\x12\x13milvus.proto.common\x1a google/protobuf/descriptor.proto\"\xf3\x01\n\x06Status\x12\x36\n\nerror_code\x18\x01 \x01(\x0e\x32\x1e.milvus.proto.common.ErrorCodeB\x02\x18\x01\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\x05\x12\x11\n\tretriable\x18\x04 \x01(\x08\x12\x0e\n\x06\x64\x65tail\x18\x05 \x01(\t\x12>\n\nextra_info\x18\x06 \x03(\x0b\x32*.milvus.proto.common.Status.ExtraInfoEntry\x1a\x30\n\x0e\x45xtraInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x0cKeyValuePair\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"(\n\x0bKeyDataPair\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x15\n\x04\x42lob\x12\r\n\x05value\x18\x01 \x01(\x0c\"c\n\x10PlaceholderValue\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.milvus.proto.common.PlaceholderType\x12\x0e\n\x06values\x18\x03 \x03(\x0c\"O\n\x10PlaceholderGroup\x12;\n\x0cplaceholders\x18\x01 \x03(\x0b\x32%.milvus.proto.common.PlaceholderValue\"#\n\x07\x41\x64\x64ress\x12\n\n\x02ip\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x03\"\xaf\x02\n\x07MsgBase\x12.\n\x08msg_type\x18\x01 \x01(\x0e\x32\x1c.milvus.proto.common.MsgType\x12\r\n\x05msgID\x18\x02 \x01(\x03\x12\x11\n\ttimestamp\x18\x03 \x01(\x04\x12\x10\n\x08sourceID\x18\x04 \x01(\x03\x12\x10\n\x08targetID\x18\x05 \x01(\x03\x12@\n\nproperties\x18\x06 \x03(\x0b\x32,.milvus.proto.common.MsgBase.PropertiesEntry\x12\x39\n\rreplicateInfo\x18\x07 \x01(\x0b\x32\".milvus.proto.common.ReplicateInfo\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\rReplicateInfo\x12\x13\n\x0bisReplicate\x18\x01 \x01(\x08\x12\x14\n\x0cmsgTimestamp\x18\x02 \x01(\x04\"7\n\tMsgHeader\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\"M\n\x0c\x44MLMsgHeader\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x11\n\tshardName\x18\x02 \x01(\t\"\xbb\x01\n\x0cPrivilegeExt\x12\x34\n\x0bobject_type\x18\x01 \x01(\x0e\x32\x1f.milvus.proto.common.ObjectType\x12>\n\x10object_privilege\x18\x02 \x01(\x0e\x32$.milvus.proto.common.ObjectPrivilege\x12\x19\n\x11object_name_index\x18\x03 \x01(\x05\x12\x1a\n\x12object_name_indexs\x18\x04 \x01(\x05\"2\n\x0cSegmentStats\x12\x11\n\tSegmentID\x18\x01 \x01(\x03\x12\x0f\n\x07NumRows\x18\x02 \x01(\x03\"\xd5\x01\n\nClientInfo\x12\x10\n\x08sdk_type\x18\x01 \x01(\t\x12\x13\n\x0bsdk_version\x18\x02 \x01(\t\x12\x12\n\nlocal_time\x18\x03 \x01(\t\x12\x0c\n\x04user\x18\x04 \x01(\t\x12\x0c\n\x04host\x18\x05 \x01(\t\x12?\n\x08reserved\x18\x06 \x03(\x0b\x32-.milvus.proto.common.ClientInfo.ReservedEntry\x1a/\n\rReservedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe3\x01\n\nServerInfo\x12\x12\n\nbuild_tags\x18\x01 \x01(\t\x12\x12\n\nbuild_time\x18\x02 \x01(\t\x12\x12\n\ngit_commit\x18\x03 \x01(\t\x12\x12\n\ngo_version\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65ploy_mode\x18\x05 \x01(\t\x12?\n\x08reserved\x18\x06 \x03(\x0b\x32-.milvus.proto.common.ServerInfo.ReservedEntry\x1a/\n\rReservedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x08NodeInfo\x12\x0f\n\x07node_id\x18\x01 \x01(\x03\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x10\n\x08hostname\x18\x03 \x01(\t*\xc7\n\n\tErrorCode\x12\x0b\n\x07Success\x10\x00\x12\x13\n\x0fUnexpectedError\x10\x01\x12\x11\n\rConnectFailed\x10\x02\x12\x14\n\x10PermissionDenied\x10\x03\x12\x17\n\x13\x43ollectionNotExists\x10\x04\x12\x13\n\x0fIllegalArgument\x10\x05\x12\x14\n\x10IllegalDimension\x10\x07\x12\x14\n\x10IllegalIndexType\x10\x08\x12\x19\n\x15IllegalCollectionName\x10\t\x12\x0f\n\x0bIllegalTOPK\x10\n\x12\x14\n\x10IllegalRowRecord\x10\x0b\x12\x13\n\x0fIllegalVectorID\x10\x0c\x12\x17\n\x13IllegalSearchResult\x10\r\x12\x10\n\x0c\x46ileNotFound\x10\x0e\x12\x0e\n\nMetaFailed\x10\x0f\x12\x0f\n\x0b\x43\x61\x63heFailed\x10\x10\x12\x16\n\x12\x43\x61nnotCreateFolder\x10\x11\x12\x14\n\x10\x43\x61nnotCreateFile\x10\x12\x12\x16\n\x12\x43\x61nnotDeleteFolder\x10\x13\x12\x14\n\x10\x43\x61nnotDeleteFile\x10\x14\x12\x13\n\x0f\x42uildIndexError\x10\x15\x12\x10\n\x0cIllegalNLIST\x10\x16\x12\x15\n\x11IllegalMetricType\x10\x17\x12\x0f\n\x0bOutOfMemory\x10\x18\x12\x11\n\rIndexNotExist\x10\x19\x12\x13\n\x0f\x45mptyCollection\x10\x1a\x12\x1b\n\x17UpdateImportTaskFailure\x10\x1b\x12\x1a\n\x16\x43ollectionNameNotFound\x10\x1c\x12\x1b\n\x17\x43reateCredentialFailure\x10\x1d\x12\x1b\n\x17UpdateCredentialFailure\x10\x1e\x12\x1b\n\x17\x44\x65leteCredentialFailure\x10\x1f\x12\x18\n\x14GetCredentialFailure\x10 \x12\x18\n\x14ListCredUsersFailure\x10!\x12\x12\n\x0eGetUserFailure\x10\"\x12\x15\n\x11\x43reateRoleFailure\x10#\x12\x13\n\x0f\x44ropRoleFailure\x10$\x12\x1a\n\x16OperateUserRoleFailure\x10%\x12\x15\n\x11SelectRoleFailure\x10&\x12\x15\n\x11SelectUserFailure\x10\'\x12\x19\n\x15SelectResourceFailure\x10(\x12\x1b\n\x17OperatePrivilegeFailure\x10)\x12\x16\n\x12SelectGrantFailure\x10*\x12!\n\x1dRefreshPolicyInfoCacheFailure\x10+\x12\x15\n\x11ListPolicyFailure\x10,\x12\x12\n\x0eNotShardLeader\x10-\x12\x16\n\x12NoReplicaAvailable\x10.\x12\x13\n\x0fSegmentNotFound\x10/\x12\r\n\tForceDeny\x10\x30\x12\r\n\tRateLimit\x10\x31\x12\x12\n\x0eNodeIDNotMatch\x10\x32\x12\x14\n\x10UpsertAutoIDTrue\x10\x33\x12\x1c\n\x18InsufficientMemoryToLoad\x10\x34\x12\x18\n\x14MemoryQuotaExhausted\x10\x35\x12\x16\n\x12\x44iskQuotaExhausted\x10\x36\x12\x15\n\x11TimeTickLongDelay\x10\x37\x12\x11\n\rNotReadyServe\x10\x38\x12\x1b\n\x17NotReadyCoordActivating\x10\x39\x12\x0f\n\x0b\x44\x61taCoordNA\x10\x64\x12\x12\n\rDDRequestRace\x10\xe8\x07\x1a\x02\x18\x01*c\n\nIndexState\x12\x12\n\x0eIndexStateNone\x10\x00\x12\x0c\n\x08Unissued\x10\x01\x12\x0e\n\nInProgress\x10\x02\x12\x0c\n\x08\x46inished\x10\x03\x12\n\n\x06\x46\x61iled\x10\x04\x12\t\n\x05Retry\x10\x05*\x82\x01\n\x0cSegmentState\x12\x14\n\x10SegmentStateNone\x10\x00\x12\x0c\n\x08NotExist\x10\x01\x12\x0b\n\x07Growing\x10\x02\x12\n\n\x06Sealed\x10\x03\x12\x0b\n\x07\x46lushed\x10\x04\x12\x0c\n\x08\x46lushing\x10\x05\x12\x0b\n\x07\x44ropped\x10\x06\x12\r\n\tImporting\x10\x07*\x94\x01\n\x0fPlaceholderType\x12\x08\n\x04None\x10\x00\x12\x10\n\x0c\x42inaryVector\x10\x64\x12\x0f\n\x0b\x46loatVector\x10\x65\x12\x11\n\rFloat16Vector\x10\x66\x12\x12\n\x0e\x42\x46loat16Vector\x10g\x12\x15\n\x11SparseFloatVector\x10h\x12\t\n\x05Int64\x10\x05\x12\x0b\n\x07VarChar\x10\x15*\xe0\x10\n\x07MsgType\x12\r\n\tUndefined\x10\x00\x12\x14\n\x10\x43reateCollection\x10\x64\x12\x12\n\x0e\x44ropCollection\x10\x65\x12\x11\n\rHasCollection\x10\x66\x12\x16\n\x12\x44\x65scribeCollection\x10g\x12\x13\n\x0fShowCollections\x10h\x12\x14\n\x10GetSystemConfigs\x10i\x12\x12\n\x0eLoadCollection\x10j\x12\x15\n\x11ReleaseCollection\x10k\x12\x0f\n\x0b\x43reateAlias\x10l\x12\r\n\tDropAlias\x10m\x12\x0e\n\nAlterAlias\x10n\x12\x13\n\x0f\x41lterCollection\x10o\x12\x14\n\x10RenameCollection\x10p\x12\x11\n\rDescribeAlias\x10q\x12\x0f\n\x0bListAliases\x10r\x12\x14\n\x0f\x43reatePartition\x10\xc8\x01\x12\x12\n\rDropPartition\x10\xc9\x01\x12\x11\n\x0cHasPartition\x10\xca\x01\x12\x16\n\x11\x44\x65scribePartition\x10\xcb\x01\x12\x13\n\x0eShowPartitions\x10\xcc\x01\x12\x13\n\x0eLoadPartitions\x10\xcd\x01\x12\x16\n\x11ReleasePartitions\x10\xce\x01\x12\x11\n\x0cShowSegments\x10\xfa\x01\x12\x14\n\x0f\x44\x65scribeSegment\x10\xfb\x01\x12\x11\n\x0cLoadSegments\x10\xfc\x01\x12\x14\n\x0fReleaseSegments\x10\xfd\x01\x12\x14\n\x0fHandoffSegments\x10\xfe\x01\x12\x18\n\x13LoadBalanceSegments\x10\xff\x01\x12\x15\n\x10\x44\x65scribeSegments\x10\x80\x02\x12\x1c\n\x17\x46\x65\x64\x65rListIndexedSegment\x10\x81\x02\x12\"\n\x1d\x46\x65\x64\x65rDescribeSegmentIndexData\x10\x82\x02\x12\x10\n\x0b\x43reateIndex\x10\xac\x02\x12\x12\n\rDescribeIndex\x10\xad\x02\x12\x0e\n\tDropIndex\x10\xae\x02\x12\x17\n\x12GetIndexStatistics\x10\xaf\x02\x12\x0f\n\nAlterIndex\x10\xb0\x02\x12\x0b\n\x06Insert\x10\x90\x03\x12\x0b\n\x06\x44\x65lete\x10\x91\x03\x12\n\n\x05\x46lush\x10\x92\x03\x12\x17\n\x12ResendSegmentStats\x10\x93\x03\x12\x0b\n\x06Upsert\x10\x94\x03\x12\x0b\n\x06Search\x10\xf4\x03\x12\x11\n\x0cSearchResult\x10\xf5\x03\x12\x12\n\rGetIndexState\x10\xf6\x03\x12\x1a\n\x15GetIndexBuildProgress\x10\xf7\x03\x12\x1c\n\x17GetCollectionStatistics\x10\xf8\x03\x12\x1b\n\x16GetPartitionStatistics\x10\xf9\x03\x12\r\n\x08Retrieve\x10\xfa\x03\x12\x13\n\x0eRetrieveResult\x10\xfb\x03\x12\x14\n\x0fWatchDmChannels\x10\xfc\x03\x12\x15\n\x10RemoveDmChannels\x10\xfd\x03\x12\x17\n\x12WatchQueryChannels\x10\xfe\x03\x12\x18\n\x13RemoveQueryChannels\x10\xff\x03\x12\x1d\n\x18SealedSegmentsChangeInfo\x10\x80\x04\x12\x17\n\x12WatchDeltaChannels\x10\x81\x04\x12\x14\n\x0fGetShardLeaders\x10\x82\x04\x12\x10\n\x0bGetReplicas\x10\x83\x04\x12\x13\n\x0eUnsubDmChannel\x10\x84\x04\x12\x14\n\x0fGetDistribution\x10\x85\x04\x12\x15\n\x10SyncDistribution\x10\x86\x04\x12\x10\n\x0bSegmentInfo\x10\xd8\x04\x12\x0f\n\nSystemInfo\x10\xd9\x04\x12\x14\n\x0fGetRecoveryInfo\x10\xda\x04\x12\x14\n\x0fGetSegmentState\x10\xdb\x04\x12\r\n\x08TimeTick\x10\xb0\t\x12\x13\n\x0eQueryNodeStats\x10\xb1\t\x12\x0e\n\tLoadIndex\x10\xb2\t\x12\x0e\n\tRequestID\x10\xb3\t\x12\x0f\n\nRequestTSO\x10\xb4\t\x12\x14\n\x0f\x41llocateSegment\x10\xb5\t\x12\x16\n\x11SegmentStatistics\x10\xb6\t\x12\x15\n\x10SegmentFlushDone\x10\xb7\t\x12\x0f\n\nDataNodeTt\x10\xb8\t\x12\x0c\n\x07\x43onnect\x10\xb9\t\x12\x14\n\x0fListClientInfos\x10\xba\t\x12\x13\n\x0e\x41llocTimestamp\x10\xbb\t\x12\x15\n\x10\x43reateCredential\x10\xdc\x0b\x12\x12\n\rGetCredential\x10\xdd\x0b\x12\x15\n\x10\x44\x65leteCredential\x10\xde\x0b\x12\x15\n\x10UpdateCredential\x10\xdf\x0b\x12\x16\n\x11ListCredUsernames\x10\xe0\x0b\x12\x0f\n\nCreateRole\x10\xc0\x0c\x12\r\n\x08\x44ropRole\x10\xc1\x0c\x12\x14\n\x0fOperateUserRole\x10\xc2\x0c\x12\x0f\n\nSelectRole\x10\xc3\x0c\x12\x0f\n\nSelectUser\x10\xc4\x0c\x12\x13\n\x0eSelectResource\x10\xc5\x0c\x12\x15\n\x10OperatePrivilege\x10\xc6\x0c\x12\x10\n\x0bSelectGrant\x10\xc7\x0c\x12\x1b\n\x16RefreshPolicyInfoCache\x10\xc8\x0c\x12\x0f\n\nListPolicy\x10\xc9\x0c\x12\x18\n\x13\x43reateResourceGroup\x10\xa4\r\x12\x16\n\x11\x44ropResourceGroup\x10\xa5\r\x12\x17\n\x12ListResourceGroups\x10\xa6\r\x12\x1a\n\x15\x44\x65scribeResourceGroup\x10\xa7\r\x12\x11\n\x0cTransferNode\x10\xa8\r\x12\x14\n\x0fTransferReplica\x10\xa9\r\x12\x19\n\x14UpdateResourceGroups\x10\xaa\r\x12\x13\n\x0e\x43reateDatabase\x10\x89\x0e\x12\x11\n\x0c\x44ropDatabase\x10\x8a\x0e\x12\x12\n\rListDatabases\x10\x8b\x0e*\"\n\x07\x44slType\x12\x07\n\x03\x44sl\x10\x00\x12\x0e\n\nBoolExprV1\x10\x01*B\n\x0f\x43ompactionState\x12\x11\n\rUndefiedState\x10\x00\x12\r\n\tExecuting\x10\x01\x12\r\n\tCompleted\x10\x02*X\n\x10\x43onsistencyLevel\x12\n\n\x06Strong\x10\x00\x12\x0b\n\x07Session\x10\x01\x12\x0b\n\x07\x42ounded\x10\x02\x12\x0e\n\nEventually\x10\x03\x12\x0e\n\nCustomized\x10\x04*\x9e\x01\n\x0bImportState\x12\x11\n\rImportPending\x10\x00\x12\x10\n\x0cImportFailed\x10\x01\x12\x11\n\rImportStarted\x10\x02\x12\x13\n\x0fImportPersisted\x10\x05\x12\x11\n\rImportFlushed\x10\x08\x12\x13\n\x0fImportCompleted\x10\x06\x12\x1a\n\x16ImportFailedAndCleaned\x10\x07*2\n\nObjectType\x12\x0e\n\nCollection\x10\x00\x12\n\n\x06Global\x10\x01\x12\x08\n\x04User\x10\x02*\xba\n\n\x0fObjectPrivilege\x12\x10\n\x0cPrivilegeAll\x10\x00\x12\x1d\n\x19PrivilegeCreateCollection\x10\x01\x12\x1b\n\x17PrivilegeDropCollection\x10\x02\x12\x1f\n\x1bPrivilegeDescribeCollection\x10\x03\x12\x1c\n\x18PrivilegeShowCollections\x10\x04\x12\x11\n\rPrivilegeLoad\x10\x05\x12\x14\n\x10PrivilegeRelease\x10\x06\x12\x17\n\x13PrivilegeCompaction\x10\x07\x12\x13\n\x0fPrivilegeInsert\x10\x08\x12\x13\n\x0fPrivilegeDelete\x10\t\x12\x1a\n\x16PrivilegeGetStatistics\x10\n\x12\x18\n\x14PrivilegeCreateIndex\x10\x0b\x12\x18\n\x14PrivilegeIndexDetail\x10\x0c\x12\x16\n\x12PrivilegeDropIndex\x10\r\x12\x13\n\x0fPrivilegeSearch\x10\x0e\x12\x12\n\x0ePrivilegeFlush\x10\x0f\x12\x12\n\x0ePrivilegeQuery\x10\x10\x12\x18\n\x14PrivilegeLoadBalance\x10\x11\x12\x13\n\x0fPrivilegeImport\x10\x12\x12\x1c\n\x18PrivilegeCreateOwnership\x10\x13\x12\x17\n\x13PrivilegeUpdateUser\x10\x14\x12\x1a\n\x16PrivilegeDropOwnership\x10\x15\x12\x1c\n\x18PrivilegeSelectOwnership\x10\x16\x12\x1c\n\x18PrivilegeManageOwnership\x10\x17\x12\x17\n\x13PrivilegeSelectUser\x10\x18\x12\x13\n\x0fPrivilegeUpsert\x10\x19\x12 \n\x1cPrivilegeCreateResourceGroup\x10\x1a\x12\x1e\n\x1aPrivilegeDropResourceGroup\x10\x1b\x12\"\n\x1ePrivilegeDescribeResourceGroup\x10\x1c\x12\x1f\n\x1bPrivilegeListResourceGroups\x10\x1d\x12\x19\n\x15PrivilegeTransferNode\x10\x1e\x12\x1c\n\x18PrivilegeTransferReplica\x10\x1f\x12\x1f\n\x1bPrivilegeGetLoadingProgress\x10 \x12\x19\n\x15PrivilegeGetLoadState\x10!\x12\x1d\n\x19PrivilegeRenameCollection\x10\"\x12\x1b\n\x17PrivilegeCreateDatabase\x10#\x12\x19\n\x15PrivilegeDropDatabase\x10$\x12\x1a\n\x16PrivilegeListDatabases\x10%\x12\x15\n\x11PrivilegeFlushAll\x10&\x12\x1c\n\x18PrivilegeCreatePartition\x10\'\x12\x1a\n\x16PrivilegeDropPartition\x10(\x12\x1b\n\x17PrivilegeShowPartitions\x10)\x12\x19\n\x15PrivilegeHasPartition\x10*\x12\x1a\n\x16PrivilegeGetFlushState\x10+\x12\x18\n\x14PrivilegeCreateAlias\x10,\x12\x16\n\x12PrivilegeDropAlias\x10-\x12\x1a\n\x16PrivilegeDescribeAlias\x10.\x12\x18\n\x14PrivilegeListAliases\x10/\x12!\n\x1dPrivilegeUpdateResourceGroups\x10\x30*S\n\tStateCode\x12\x10\n\x0cInitializing\x10\x00\x12\x0b\n\x07Healthy\x10\x01\x12\x0c\n\x08\x41\x62normal\x10\x02\x12\x0b\n\x07StandBy\x10\x03\x12\x0c\n\x08Stopping\x10\x04*c\n\tLoadState\x12\x15\n\x11LoadStateNotExist\x10\x00\x12\x14\n\x10LoadStateNotLoad\x10\x01\x12\x14\n\x10LoadStateLoading\x10\x02\x12\x13\n\x0fLoadStateLoaded\x10\x03:^\n\x11privilege_ext_obj\x12\x1f.google.protobuf.MessageOptions\x18\xe9\x07 \x01(\x0b\x32!.milvus.proto.common.PrivilegeExtBm\n\x0eio.milvus.grpcB\x0b\x43ommonProtoP\x01Z4github.com/milvus-io/milvus-proto/go-api/v2/commonpb\xa0\x01\x01\xaa\x02\x12Milvus.Client.Grpcb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -35,32 +35,32 @@ _globals['_CLIENTINFO_RESERVEDENTRY']._serialized_options = b'8\001' _globals['_SERVERINFO_RESERVEDENTRY']._options = None _globals['_SERVERINFO_RESERVEDENTRY']._serialized_options = b'8\001' - _globals['_ERRORCODE']._serialized_start=1899 - _globals['_ERRORCODE']._serialized_end=3250 - _globals['_INDEXSTATE']._serialized_start=3252 - _globals['_INDEXSTATE']._serialized_end=3351 - _globals['_SEGMENTSTATE']._serialized_start=3354 - _globals['_SEGMENTSTATE']._serialized_end=3484 - _globals['_PLACEHOLDERTYPE']._serialized_start=3487 - _globals['_PLACEHOLDERTYPE']._serialized_end=3635 - _globals['_MSGTYPE']._serialized_start=3638 - _globals['_MSGTYPE']._serialized_end=5782 - _globals['_DSLTYPE']._serialized_start=5784 - _globals['_DSLTYPE']._serialized_end=5818 - _globals['_COMPACTIONSTATE']._serialized_start=5820 - _globals['_COMPACTIONSTATE']._serialized_end=5886 - _globals['_CONSISTENCYLEVEL']._serialized_start=5888 - _globals['_CONSISTENCYLEVEL']._serialized_end=5976 - _globals['_IMPORTSTATE']._serialized_start=5979 - _globals['_IMPORTSTATE']._serialized_end=6137 - _globals['_OBJECTTYPE']._serialized_start=6139 - _globals['_OBJECTTYPE']._serialized_end=6189 - _globals['_OBJECTPRIVILEGE']._serialized_start=6192 - _globals['_OBJECTPRIVILEGE']._serialized_end=7530 - _globals['_STATECODE']._serialized_start=7532 - _globals['_STATECODE']._serialized_end=7615 - _globals['_LOADSTATE']._serialized_start=7617 - _globals['_LOADSTATE']._serialized_end=7716 + _globals['_ERRORCODE']._serialized_start=1900 + _globals['_ERRORCODE']._serialized_end=3251 + _globals['_INDEXSTATE']._serialized_start=3253 + _globals['_INDEXSTATE']._serialized_end=3352 + _globals['_SEGMENTSTATE']._serialized_start=3355 + _globals['_SEGMENTSTATE']._serialized_end=3485 + _globals['_PLACEHOLDERTYPE']._serialized_start=3488 + _globals['_PLACEHOLDERTYPE']._serialized_end=3636 + _globals['_MSGTYPE']._serialized_start=3639 + _globals['_MSGTYPE']._serialized_end=5783 + _globals['_DSLTYPE']._serialized_start=5785 + _globals['_DSLTYPE']._serialized_end=5819 + _globals['_COMPACTIONSTATE']._serialized_start=5821 + _globals['_COMPACTIONSTATE']._serialized_end=5887 + _globals['_CONSISTENCYLEVEL']._serialized_start=5889 + _globals['_CONSISTENCYLEVEL']._serialized_end=5977 + _globals['_IMPORTSTATE']._serialized_start=5980 + _globals['_IMPORTSTATE']._serialized_end=6138 + _globals['_OBJECTTYPE']._serialized_start=6140 + _globals['_OBJECTTYPE']._serialized_end=6190 + _globals['_OBJECTPRIVILEGE']._serialized_start=6193 + _globals['_OBJECTPRIVILEGE']._serialized_end=7531 + _globals['_STATECODE']._serialized_start=7533 + _globals['_STATECODE']._serialized_end=7616 + _globals['_LOADSTATE']._serialized_start=7618 + _globals['_LOADSTATE']._serialized_end=7717 _globals['_STATUS']._serialized_start=72 _globals['_STATUS']._serialized_end=315 _globals['_STATUS_EXTRAINFOENTRY']._serialized_start=267 @@ -100,5 +100,5 @@ _globals['_SERVERINFO_RESERVEDENTRY']._serialized_start=1556 _globals['_SERVERINFO_RESERVEDENTRY']._serialized_end=1603 _globals['_NODEINFO']._serialized_start=1835 - _globals['_NODEINFO']._serialized_end=1896 + _globals['_NODEINFO']._serialized_end=1897 # @@protoc_insertion_point(module_scope) diff --git a/pymilvus/grpc_gen/common_pb2.pyi b/pymilvus/grpc_gen/common_pb2.pyi index 1fa1c69de..3cc6988ee 100644 --- a/pymilvus/grpc_gen/common_pb2.pyi +++ b/pymilvus/grpc_gen/common_pb2.pyi @@ -753,11 +753,11 @@ class ServerInfo(_message.Message): def __init__(self, build_tags: _Optional[str] = ..., build_time: _Optional[str] = ..., git_commit: _Optional[str] = ..., go_version: _Optional[str] = ..., deploy_mode: _Optional[str] = ..., reserved: _Optional[_Mapping[str, str]] = ...) -> None: ... class NodeInfo(_message.Message): - __slots__ = ("nodeID", "address", "hostname") - NODEID_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("node_id", "address", "hostname") + NODE_ID_FIELD_NUMBER: _ClassVar[int] ADDRESS_FIELD_NUMBER: _ClassVar[int] HOSTNAME_FIELD_NUMBER: _ClassVar[int] - nodeID: int + node_id: int address: str hostname: str - def __init__(self, nodeID: _Optional[int] = ..., address: _Optional[str] = ..., hostname: _Optional[str] = ...) -> None: ... + def __init__(self, node_id: _Optional[int] = ..., address: _Optional[str] = ..., hostname: _Optional[str] = ...) -> None: ... diff --git a/pymilvus/grpc_gen/milvus-proto b/pymilvus/grpc_gen/milvus-proto index 55a0bceef..6c95f3065 160000 --- a/pymilvus/grpc_gen/milvus-proto +++ b/pymilvus/grpc_gen/milvus-proto @@ -1 +1 @@ -Subproject commit 55a0bceef3e286134ee67472f0fdb6e4baf84a52 +Subproject commit 6c95f3065923d215fc2aaa5e701cd6343c9373d7 diff --git a/pymilvus/grpc_gen/rg_pb2.py b/pymilvus/grpc_gen/rg_pb2.py index 8ba35b562..1806e7b7f 100644 --- a/pymilvus/grpc_gen/rg_pb2.py +++ b/pymilvus/grpc_gen/rg_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x08rg.proto\x12\x0fmilvus.proto.rg\"%\n\x12ResourceGroupLimit\x12\x0f\n\x07nodeNum\x18\x01 \x01(\x05\"/\n\x15ResourceGroupTransfer\x12\x16\n\x0eresource_group\x18\x01 \x01(\t\"\xeb\x01\n\x13ResourceGroupConfig\x12\x35\n\x08requests\x18\x01 \x01(\x0b\x32#.milvus.proto.rg.ResourceGroupLimit\x12\x33\n\x06limits\x18\x02 \x01(\x0b\x32#.milvus.proto.rg.ResourceGroupLimit\x12\x34\n\x04\x66rom\x18\x03 \x03(\x0b\x32&.milvus.proto.rg.ResourceGroupTransfer\x12\x32\n\x02to\x18\x04 \x03(\x0b\x32&.milvus.proto.rg.ResourceGroupTransferBp\n\x0eio.milvus.grpcB\x12ResourceGroupProtoP\x01Z0github.com/milvus-io/milvus-proto/go-api/v2/rgpb\xa0\x01\x01\xaa\x02\x12Milvus.Client.Grpcb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x08rg.proto\x12\x0fmilvus.proto.rg\"&\n\x12ResourceGroupLimit\x12\x10\n\x08node_num\x18\x01 \x01(\x05\"/\n\x15ResourceGroupTransfer\x12\x16\n\x0eresource_group\x18\x01 \x01(\t\"\xfd\x01\n\x13ResourceGroupConfig\x12\x35\n\x08requests\x18\x01 \x01(\x0b\x32#.milvus.proto.rg.ResourceGroupLimit\x12\x33\n\x06limits\x18\x02 \x01(\x0b\x32#.milvus.proto.rg.ResourceGroupLimit\x12=\n\rtransfer_from\x18\x03 \x03(\x0b\x32&.milvus.proto.rg.ResourceGroupTransfer\x12;\n\x0btransfer_to\x18\x04 \x03(\x0b\x32&.milvus.proto.rg.ResourceGroupTransferBp\n\x0eio.milvus.grpcB\x12ResourceGroupProtoP\x01Z0github.com/milvus-io/milvus-proto/go-api/v2/rgpb\xa0\x01\x01\xaa\x02\x12Milvus.Client.Grpcb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,9 +23,9 @@ _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\016io.milvus.grpcB\022ResourceGroupProtoP\001Z0github.com/milvus-io/milvus-proto/go-api/v2/rgpb\240\001\001\252\002\022Milvus.Client.Grpc' _globals['_RESOURCEGROUPLIMIT']._serialized_start=29 - _globals['_RESOURCEGROUPLIMIT']._serialized_end=66 - _globals['_RESOURCEGROUPTRANSFER']._serialized_start=68 - _globals['_RESOURCEGROUPTRANSFER']._serialized_end=115 - _globals['_RESOURCEGROUPCONFIG']._serialized_start=118 - _globals['_RESOURCEGROUPCONFIG']._serialized_end=353 + _globals['_RESOURCEGROUPLIMIT']._serialized_end=67 + _globals['_RESOURCEGROUPTRANSFER']._serialized_start=69 + _globals['_RESOURCEGROUPTRANSFER']._serialized_end=116 + _globals['_RESOURCEGROUPCONFIG']._serialized_start=119 + _globals['_RESOURCEGROUPCONFIG']._serialized_end=372 # @@protoc_insertion_point(module_scope) diff --git a/pymilvus/grpc_gen/rg_pb2.pyi b/pymilvus/grpc_gen/rg_pb2.pyi index c9ba690ac..bc414361a 100644 --- a/pymilvus/grpc_gen/rg_pb2.pyi +++ b/pymilvus/grpc_gen/rg_pb2.pyi @@ -6,10 +6,10 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor class ResourceGroupLimit(_message.Message): - __slots__ = ("nodeNum",) - NODENUM_FIELD_NUMBER: _ClassVar[int] - nodeNum: int - def __init__(self, nodeNum: _Optional[int] = ...) -> None: ... + __slots__ = ("node_num",) + NODE_NUM_FIELD_NUMBER: _ClassVar[int] + node_num: int + def __init__(self, node_num: _Optional[int] = ...) -> None: ... class ResourceGroupTransfer(_message.Message): __slots__ = ("resource_group",) @@ -18,12 +18,13 @@ class ResourceGroupTransfer(_message.Message): def __init__(self, resource_group: _Optional[str] = ...) -> None: ... class ResourceGroupConfig(_message.Message): - __slots__ = ("requests", "limits", "to") + __slots__ = ("requests", "limits", "transfer_from", "transfer_to") REQUESTS_FIELD_NUMBER: _ClassVar[int] LIMITS_FIELD_NUMBER: _ClassVar[int] - FROM_FIELD_NUMBER: _ClassVar[int] - TO_FIELD_NUMBER: _ClassVar[int] + TRANSFER_FROM_FIELD_NUMBER: _ClassVar[int] + TRANSFER_TO_FIELD_NUMBER: _ClassVar[int] requests: ResourceGroupLimit limits: ResourceGroupLimit - to: _containers.RepeatedCompositeFieldContainer[ResourceGroupTransfer] - def __init__(self, requests: _Optional[_Union[ResourceGroupLimit, _Mapping]] = ..., limits: _Optional[_Union[ResourceGroupLimit, _Mapping]] = ..., to: _Optional[_Iterable[_Union[ResourceGroupTransfer, _Mapping]]] = ..., **kwargs) -> None: ... + transfer_from: _containers.RepeatedCompositeFieldContainer[ResourceGroupTransfer] + transfer_to: _containers.RepeatedCompositeFieldContainer[ResourceGroupTransfer] + def __init__(self, requests: _Optional[_Union[ResourceGroupLimit, _Mapping]] = ..., limits: _Optional[_Union[ResourceGroupLimit, _Mapping]] = ..., transfer_from: _Optional[_Iterable[_Union[ResourceGroupTransfer, _Mapping]]] = ..., transfer_to: _Optional[_Iterable[_Union[ResourceGroupTransfer, _Mapping]]] = ...) -> None: ... diff --git a/pymilvus/grpc_gen/schema_pb2.py b/pymilvus/grpc_gen/schema_pb2.py index b9dd24c21..62aa6fbf1 100644 --- a/pymilvus/grpc_gen/schema_pb2.py +++ b/pymilvus/grpc_gen/schema_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cschema.proto\x12\x13milvus.proto.schema\x1a\x0c\x63ommon.proto\x1a google/protobuf/descriptor.proto\"\xf2\x03\n\x0b\x46ieldSchema\x12\x0f\n\x07\x66ieldID\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x16\n\x0eis_primary_key\x18\x03 \x01(\x08\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x30\n\tdata_type\x18\x05 \x01(\x0e\x32\x1d.milvus.proto.schema.DataType\x12\x36\n\x0btype_params\x18\x06 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\x37\n\x0cindex_params\x18\x07 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\x0e\n\x06\x61utoID\x18\x08 \x01(\x08\x12.\n\x05state\x18\t \x01(\x0e\x32\x1f.milvus.proto.schema.FieldState\x12\x33\n\x0c\x65lement_type\x18\n \x01(\x0e\x32\x1d.milvus.proto.schema.DataType\x12\x36\n\rdefault_value\x18\x0b \x01(\x0b\x32\x1f.milvus.proto.schema.ValueField\x12\x12\n\nis_dynamic\x18\x0c \x01(\x08\x12\x18\n\x10is_partition_key\x18\r \x01(\x08\x12\x19\n\x11is_clustering_key\x18\x0e \x01(\x08\"\xd0\x01\n\x10\x43ollectionSchema\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x12\n\x06\x61utoID\x18\x03 \x01(\x08\x42\x02\x18\x01\x12\x30\n\x06\x66ields\x18\x04 \x03(\x0b\x32 .milvus.proto.schema.FieldSchema\x12\x1c\n\x14\x65nable_dynamic_field\x18\x05 \x01(\x08\x12\x35\n\nproperties\x18\x06 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\x19\n\tBoolArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x08\"\x18\n\x08IntArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x05\"\x19\n\tLongArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x03\"\x1a\n\nFloatArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x02\"\x1b\n\x0b\x44oubleArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x01\"\x1a\n\nBytesArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x0c\"\x1b\n\x0bStringArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\t\"q\n\nArrayArray\x12.\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32 .milvus.proto.schema.ScalarField\x12\x33\n\x0c\x65lement_type\x18\x02 \x01(\x0e\x32\x1d.milvus.proto.schema.DataType\"\x19\n\tJSONArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x0c\"\xac\x01\n\nValueField\x12\x13\n\tbool_data\x18\x01 \x01(\x08H\x00\x12\x12\n\x08int_data\x18\x02 \x01(\x05H\x00\x12\x13\n\tlong_data\x18\x03 \x01(\x03H\x00\x12\x14\n\nfloat_data\x18\x04 \x01(\x02H\x00\x12\x15\n\x0b\x64ouble_data\x18\x05 \x01(\x01H\x00\x12\x15\n\x0bstring_data\x18\x06 \x01(\tH\x00\x12\x14\n\nbytes_data\x18\x07 \x01(\x0cH\x00\x42\x06\n\x04\x64\x61ta\"\xfe\x03\n\x0bScalarField\x12\x33\n\tbool_data\x18\x01 \x01(\x0b\x32\x1e.milvus.proto.schema.BoolArrayH\x00\x12\x31\n\x08int_data\x18\x02 \x01(\x0b\x32\x1d.milvus.proto.schema.IntArrayH\x00\x12\x33\n\tlong_data\x18\x03 \x01(\x0b\x32\x1e.milvus.proto.schema.LongArrayH\x00\x12\x35\n\nfloat_data\x18\x04 \x01(\x0b\x32\x1f.milvus.proto.schema.FloatArrayH\x00\x12\x37\n\x0b\x64ouble_data\x18\x05 \x01(\x0b\x32 .milvus.proto.schema.DoubleArrayH\x00\x12\x37\n\x0bstring_data\x18\x06 \x01(\x0b\x32 .milvus.proto.schema.StringArrayH\x00\x12\x35\n\nbytes_data\x18\x07 \x01(\x0b\x32\x1f.milvus.proto.schema.BytesArrayH\x00\x12\x35\n\narray_data\x18\x08 \x01(\x0b\x32\x1f.milvus.proto.schema.ArrayArrayH\x00\x12\x33\n\tjson_data\x18\t \x01(\x0b\x32\x1e.milvus.proto.schema.JSONArrayH\x00\x42\x06\n\x04\x64\x61ta\"1\n\x10SparseFloatArray\x12\x10\n\x08\x63ontents\x18\x01 \x03(\x0c\x12\x0b\n\x03\x64im\x18\x02 \x01(\x03\"\xef\x01\n\x0bVectorField\x12\x0b\n\x03\x64im\x18\x01 \x01(\x03\x12\x37\n\x0c\x66loat_vector\x18\x02 \x01(\x0b\x32\x1f.milvus.proto.schema.FloatArrayH\x00\x12\x17\n\rbinary_vector\x18\x03 \x01(\x0cH\x00\x12\x18\n\x0e\x66loat16_vector\x18\x04 \x01(\x0cH\x00\x12\x19\n\x0f\x62\x66loat16_vector\x18\x05 \x01(\x0cH\x00\x12\x44\n\x13sparse_float_vector\x18\x06 \x01(\x0b\x32%.milvus.proto.schema.SparseFloatArrayH\x00\x42\x06\n\x04\x64\x61ta\"\xe5\x01\n\tFieldData\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.milvus.proto.schema.DataType\x12\x12\n\nfield_name\x18\x02 \x01(\t\x12\x33\n\x07scalars\x18\x03 \x01(\x0b\x32 .milvus.proto.schema.ScalarFieldH\x00\x12\x33\n\x07vectors\x18\x04 \x01(\x0b\x32 .milvus.proto.schema.VectorFieldH\x00\x12\x10\n\x08\x66ield_id\x18\x05 \x01(\x03\x12\x12\n\nis_dynamic\x18\x06 \x01(\x08\x42\x07\n\x05\x66ield\"w\n\x03IDs\x12\x30\n\x06int_id\x18\x01 \x01(\x0b\x32\x1e.milvus.proto.schema.LongArrayH\x00\x12\x32\n\x06str_id\x18\x02 \x01(\x0b\x32 .milvus.proto.schema.StringArrayH\x00\x42\n\n\x08id_field\"\xb3\x02\n\x10SearchResultData\x12\x13\n\x0bnum_queries\x18\x01 \x01(\x03\x12\r\n\x05top_k\x18\x02 \x01(\x03\x12\x33\n\x0b\x66ields_data\x18\x03 \x03(\x0b\x32\x1e.milvus.proto.schema.FieldData\x12\x0e\n\x06scores\x18\x04 \x03(\x02\x12%\n\x03ids\x18\x05 \x01(\x0b\x32\x18.milvus.proto.schema.IDs\x12\r\n\x05topks\x18\x06 \x03(\x03\x12\x15\n\routput_fields\x18\x07 \x03(\t\x12<\n\x14group_by_field_value\x18\x08 \x01(\x0b\x32\x1e.milvus.proto.schema.FieldData\x12\x18\n\x10\x61ll_search_count\x18\t \x01(\x03\x12\x11\n\tdistances\x18\n \x03(\x02\"Y\n\x14VectorClusteringInfo\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x32\n\x08\x63\x65ntroid\x18\x02 \x01(\x0b\x32 .milvus.proto.schema.VectorField\"%\n\x14ScalarClusteringInfo\x12\r\n\x05\x66ield\x18\x01 \x01(\t\"\xa8\x01\n\x0e\x43lusteringInfo\x12J\n\x17vector_clustering_infos\x18\x01 \x03(\x0b\x32).milvus.proto.schema.VectorClusteringInfo\x12J\n\x17scalar_clustering_infos\x18\x02 \x03(\x0b\x32).milvus.proto.schema.ScalarClusteringInfo*\xef\x01\n\x08\x44\x61taType\x12\x08\n\x04None\x10\x00\x12\x08\n\x04\x42ool\x10\x01\x12\x08\n\x04Int8\x10\x02\x12\t\n\x05Int16\x10\x03\x12\t\n\x05Int32\x10\x04\x12\t\n\x05Int64\x10\x05\x12\t\n\x05\x46loat\x10\n\x12\n\n\x06\x44ouble\x10\x0b\x12\n\n\x06String\x10\x14\x12\x0b\n\x07VarChar\x10\x15\x12\t\n\x05\x41rray\x10\x16\x12\x08\n\x04JSON\x10\x17\x12\x10\n\x0c\x42inaryVector\x10\x64\x12\x0f\n\x0b\x46loatVector\x10\x65\x12\x11\n\rFloat16Vector\x10\x66\x12\x12\n\x0e\x42\x46loat16Vector\x10g\x12\x15\n\x11SparseFloatVector\x10h*V\n\nFieldState\x12\x10\n\x0c\x46ieldCreated\x10\x00\x12\x11\n\rFieldCreating\x10\x01\x12\x11\n\rFieldDropping\x10\x02\x12\x10\n\x0c\x46ieldDropped\x10\x03\x42m\n\x0eio.milvus.grpcB\x0bSchemaProtoP\x01Z4github.com/milvus-io/milvus-proto/go-api/v2/schemapb\xa0\x01\x01\xaa\x02\x12Milvus.Client.Grpcb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cschema.proto\x12\x13milvus.proto.schema\x1a\x0c\x63ommon.proto\x1a google/protobuf/descriptor.proto\"\x84\x04\n\x0b\x46ieldSchema\x12\x0f\n\x07\x66ieldID\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x16\n\x0eis_primary_key\x18\x03 \x01(\x08\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x30\n\tdata_type\x18\x05 \x01(\x0e\x32\x1d.milvus.proto.schema.DataType\x12\x36\n\x0btype_params\x18\x06 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\x37\n\x0cindex_params\x18\x07 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\x0e\n\x06\x61utoID\x18\x08 \x01(\x08\x12.\n\x05state\x18\t \x01(\x0e\x32\x1f.milvus.proto.schema.FieldState\x12\x33\n\x0c\x65lement_type\x18\n \x01(\x0e\x32\x1d.milvus.proto.schema.DataType\x12\x36\n\rdefault_value\x18\x0b \x01(\x0b\x32\x1f.milvus.proto.schema.ValueField\x12\x12\n\nis_dynamic\x18\x0c \x01(\x08\x12\x18\n\x10is_partition_key\x18\r \x01(\x08\x12\x19\n\x11is_clustering_key\x18\x0e \x01(\x08\x12\x10\n\x08nullable\x18\x0f \x01(\x08\"\xd0\x01\n\x10\x43ollectionSchema\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x12\n\x06\x61utoID\x18\x03 \x01(\x08\x42\x02\x18\x01\x12\x30\n\x06\x66ields\x18\x04 \x03(\x0b\x32 .milvus.proto.schema.FieldSchema\x12\x1c\n\x14\x65nable_dynamic_field\x18\x05 \x01(\x08\x12\x35\n\nproperties\x18\x06 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\x19\n\tBoolArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x08\"\x18\n\x08IntArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x05\"\x19\n\tLongArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x03\"\x1a\n\nFloatArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x02\"\x1b\n\x0b\x44oubleArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x01\"\x1a\n\nBytesArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x0c\"\x1b\n\x0bStringArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\t\"q\n\nArrayArray\x12.\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32 .milvus.proto.schema.ScalarField\x12\x33\n\x0c\x65lement_type\x18\x02 \x01(\x0e\x32\x1d.milvus.proto.schema.DataType\"\x19\n\tJSONArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x0c\"\xac\x01\n\nValueField\x12\x13\n\tbool_data\x18\x01 \x01(\x08H\x00\x12\x12\n\x08int_data\x18\x02 \x01(\x05H\x00\x12\x13\n\tlong_data\x18\x03 \x01(\x03H\x00\x12\x14\n\nfloat_data\x18\x04 \x01(\x02H\x00\x12\x15\n\x0b\x64ouble_data\x18\x05 \x01(\x01H\x00\x12\x15\n\x0bstring_data\x18\x06 \x01(\tH\x00\x12\x14\n\nbytes_data\x18\x07 \x01(\x0cH\x00\x42\x06\n\x04\x64\x61ta\"\xfe\x03\n\x0bScalarField\x12\x33\n\tbool_data\x18\x01 \x01(\x0b\x32\x1e.milvus.proto.schema.BoolArrayH\x00\x12\x31\n\x08int_data\x18\x02 \x01(\x0b\x32\x1d.milvus.proto.schema.IntArrayH\x00\x12\x33\n\tlong_data\x18\x03 \x01(\x0b\x32\x1e.milvus.proto.schema.LongArrayH\x00\x12\x35\n\nfloat_data\x18\x04 \x01(\x0b\x32\x1f.milvus.proto.schema.FloatArrayH\x00\x12\x37\n\x0b\x64ouble_data\x18\x05 \x01(\x0b\x32 .milvus.proto.schema.DoubleArrayH\x00\x12\x37\n\x0bstring_data\x18\x06 \x01(\x0b\x32 .milvus.proto.schema.StringArrayH\x00\x12\x35\n\nbytes_data\x18\x07 \x01(\x0b\x32\x1f.milvus.proto.schema.BytesArrayH\x00\x12\x35\n\narray_data\x18\x08 \x01(\x0b\x32\x1f.milvus.proto.schema.ArrayArrayH\x00\x12\x33\n\tjson_data\x18\t \x01(\x0b\x32\x1e.milvus.proto.schema.JSONArrayH\x00\x42\x06\n\x04\x64\x61ta\"1\n\x10SparseFloatArray\x12\x10\n\x08\x63ontents\x18\x01 \x03(\x0c\x12\x0b\n\x03\x64im\x18\x02 \x01(\x03\"\xef\x01\n\x0bVectorField\x12\x0b\n\x03\x64im\x18\x01 \x01(\x03\x12\x37\n\x0c\x66loat_vector\x18\x02 \x01(\x0b\x32\x1f.milvus.proto.schema.FloatArrayH\x00\x12\x17\n\rbinary_vector\x18\x03 \x01(\x0cH\x00\x12\x18\n\x0e\x66loat16_vector\x18\x04 \x01(\x0cH\x00\x12\x19\n\x0f\x62\x66loat16_vector\x18\x05 \x01(\x0cH\x00\x12\x44\n\x13sparse_float_vector\x18\x06 \x01(\x0b\x32%.milvus.proto.schema.SparseFloatArrayH\x00\x42\x06\n\x04\x64\x61ta\"\xf9\x01\n\tFieldData\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.milvus.proto.schema.DataType\x12\x12\n\nfield_name\x18\x02 \x01(\t\x12\x33\n\x07scalars\x18\x03 \x01(\x0b\x32 .milvus.proto.schema.ScalarFieldH\x00\x12\x33\n\x07vectors\x18\x04 \x01(\x0b\x32 .milvus.proto.schema.VectorFieldH\x00\x12\x10\n\x08\x66ield_id\x18\x05 \x01(\x03\x12\x12\n\nis_dynamic\x18\x06 \x01(\x08\x12\x12\n\nvalid_data\x18\x07 \x03(\x08\x42\x07\n\x05\x66ield\"w\n\x03IDs\x12\x30\n\x06int_id\x18\x01 \x01(\x0b\x32\x1e.milvus.proto.schema.LongArrayH\x00\x12\x32\n\x06str_id\x18\x02 \x01(\x0b\x32 .milvus.proto.schema.StringArrayH\x00\x42\n\n\x08id_field\"\xb3\x02\n\x10SearchResultData\x12\x13\n\x0bnum_queries\x18\x01 \x01(\x03\x12\r\n\x05top_k\x18\x02 \x01(\x03\x12\x33\n\x0b\x66ields_data\x18\x03 \x03(\x0b\x32\x1e.milvus.proto.schema.FieldData\x12\x0e\n\x06scores\x18\x04 \x03(\x02\x12%\n\x03ids\x18\x05 \x01(\x0b\x32\x18.milvus.proto.schema.IDs\x12\r\n\x05topks\x18\x06 \x03(\x03\x12\x15\n\routput_fields\x18\x07 \x03(\t\x12<\n\x14group_by_field_value\x18\x08 \x01(\x0b\x32\x1e.milvus.proto.schema.FieldData\x12\x18\n\x10\x61ll_search_count\x18\t \x01(\x03\x12\x11\n\tdistances\x18\n \x03(\x02\"Y\n\x14VectorClusteringInfo\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x32\n\x08\x63\x65ntroid\x18\x02 \x01(\x0b\x32 .milvus.proto.schema.VectorField\"%\n\x14ScalarClusteringInfo\x12\r\n\x05\x66ield\x18\x01 \x01(\t\"\xa8\x01\n\x0e\x43lusteringInfo\x12J\n\x17vector_clustering_infos\x18\x01 \x03(\x0b\x32).milvus.proto.schema.VectorClusteringInfo\x12J\n\x17scalar_clustering_infos\x18\x02 \x03(\x0b\x32).milvus.proto.schema.ScalarClusteringInfo*\xef\x01\n\x08\x44\x61taType\x12\x08\n\x04None\x10\x00\x12\x08\n\x04\x42ool\x10\x01\x12\x08\n\x04Int8\x10\x02\x12\t\n\x05Int16\x10\x03\x12\t\n\x05Int32\x10\x04\x12\t\n\x05Int64\x10\x05\x12\t\n\x05\x46loat\x10\n\x12\n\n\x06\x44ouble\x10\x0b\x12\n\n\x06String\x10\x14\x12\x0b\n\x07VarChar\x10\x15\x12\t\n\x05\x41rray\x10\x16\x12\x08\n\x04JSON\x10\x17\x12\x10\n\x0c\x42inaryVector\x10\x64\x12\x0f\n\x0b\x46loatVector\x10\x65\x12\x11\n\rFloat16Vector\x10\x66\x12\x12\n\x0e\x42\x46loat16Vector\x10g\x12\x15\n\x11SparseFloatVector\x10h*V\n\nFieldState\x12\x10\n\x0c\x46ieldCreated\x10\x00\x12\x11\n\rFieldCreating\x10\x01\x12\x11\n\rFieldDropping\x10\x02\x12\x10\n\x0c\x46ieldDropped\x10\x03\x42m\n\x0eio.milvus.grpcB\x0bSchemaProtoP\x01Z4github.com/milvus-io/milvus-proto/go-api/v2/schemapb\xa0\x01\x01\xaa\x02\x12Milvus.Client.Grpcb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,50 +26,50 @@ _globals['DESCRIPTOR']._serialized_options = b'\n\016io.milvus.grpcB\013SchemaProtoP\001Z4github.com/milvus-io/milvus-proto/go-api/v2/schemapb\240\001\001\252\002\022Milvus.Client.Grpc' _globals['_COLLECTIONSCHEMA'].fields_by_name['autoID']._options = None _globals['_COLLECTIONSCHEMA'].fields_by_name['autoID']._serialized_options = b'\030\001' - _globals['_DATATYPE']._serialized_start=3079 - _globals['_DATATYPE']._serialized_end=3318 - _globals['_FIELDSTATE']._serialized_start=3320 - _globals['_FIELDSTATE']._serialized_end=3406 + _globals['_DATATYPE']._serialized_start=3117 + _globals['_DATATYPE']._serialized_end=3356 + _globals['_FIELDSTATE']._serialized_start=3358 + _globals['_FIELDSTATE']._serialized_end=3444 _globals['_FIELDSCHEMA']._serialized_start=86 - _globals['_FIELDSCHEMA']._serialized_end=584 - _globals['_COLLECTIONSCHEMA']._serialized_start=587 - _globals['_COLLECTIONSCHEMA']._serialized_end=795 - _globals['_BOOLARRAY']._serialized_start=797 - _globals['_BOOLARRAY']._serialized_end=822 - _globals['_INTARRAY']._serialized_start=824 - _globals['_INTARRAY']._serialized_end=848 - _globals['_LONGARRAY']._serialized_start=850 - _globals['_LONGARRAY']._serialized_end=875 - _globals['_FLOATARRAY']._serialized_start=877 - _globals['_FLOATARRAY']._serialized_end=903 - _globals['_DOUBLEARRAY']._serialized_start=905 - _globals['_DOUBLEARRAY']._serialized_end=932 - _globals['_BYTESARRAY']._serialized_start=934 - _globals['_BYTESARRAY']._serialized_end=960 - _globals['_STRINGARRAY']._serialized_start=962 - _globals['_STRINGARRAY']._serialized_end=989 - _globals['_ARRAYARRAY']._serialized_start=991 - _globals['_ARRAYARRAY']._serialized_end=1104 - _globals['_JSONARRAY']._serialized_start=1106 - _globals['_JSONARRAY']._serialized_end=1131 - _globals['_VALUEFIELD']._serialized_start=1134 - _globals['_VALUEFIELD']._serialized_end=1306 - _globals['_SCALARFIELD']._serialized_start=1309 - _globals['_SCALARFIELD']._serialized_end=1819 - _globals['_SPARSEFLOATARRAY']._serialized_start=1821 - _globals['_SPARSEFLOATARRAY']._serialized_end=1870 - _globals['_VECTORFIELD']._serialized_start=1873 - _globals['_VECTORFIELD']._serialized_end=2112 - _globals['_FIELDDATA']._serialized_start=2115 - _globals['_FIELDDATA']._serialized_end=2344 - _globals['_IDS']._serialized_start=2346 - _globals['_IDS']._serialized_end=2465 - _globals['_SEARCHRESULTDATA']._serialized_start=2468 - _globals['_SEARCHRESULTDATA']._serialized_end=2775 - _globals['_VECTORCLUSTERINGINFO']._serialized_start=2777 - _globals['_VECTORCLUSTERINGINFO']._serialized_end=2866 - _globals['_SCALARCLUSTERINGINFO']._serialized_start=2868 - _globals['_SCALARCLUSTERINGINFO']._serialized_end=2905 - _globals['_CLUSTERINGINFO']._serialized_start=2908 - _globals['_CLUSTERINGINFO']._serialized_end=3076 + _globals['_FIELDSCHEMA']._serialized_end=602 + _globals['_COLLECTIONSCHEMA']._serialized_start=605 + _globals['_COLLECTIONSCHEMA']._serialized_end=813 + _globals['_BOOLARRAY']._serialized_start=815 + _globals['_BOOLARRAY']._serialized_end=840 + _globals['_INTARRAY']._serialized_start=842 + _globals['_INTARRAY']._serialized_end=866 + _globals['_LONGARRAY']._serialized_start=868 + _globals['_LONGARRAY']._serialized_end=893 + _globals['_FLOATARRAY']._serialized_start=895 + _globals['_FLOATARRAY']._serialized_end=921 + _globals['_DOUBLEARRAY']._serialized_start=923 + _globals['_DOUBLEARRAY']._serialized_end=950 + _globals['_BYTESARRAY']._serialized_start=952 + _globals['_BYTESARRAY']._serialized_end=978 + _globals['_STRINGARRAY']._serialized_start=980 + _globals['_STRINGARRAY']._serialized_end=1007 + _globals['_ARRAYARRAY']._serialized_start=1009 + _globals['_ARRAYARRAY']._serialized_end=1122 + _globals['_JSONARRAY']._serialized_start=1124 + _globals['_JSONARRAY']._serialized_end=1149 + _globals['_VALUEFIELD']._serialized_start=1152 + _globals['_VALUEFIELD']._serialized_end=1324 + _globals['_SCALARFIELD']._serialized_start=1327 + _globals['_SCALARFIELD']._serialized_end=1837 + _globals['_SPARSEFLOATARRAY']._serialized_start=1839 + _globals['_SPARSEFLOATARRAY']._serialized_end=1888 + _globals['_VECTORFIELD']._serialized_start=1891 + _globals['_VECTORFIELD']._serialized_end=2130 + _globals['_FIELDDATA']._serialized_start=2133 + _globals['_FIELDDATA']._serialized_end=2382 + _globals['_IDS']._serialized_start=2384 + _globals['_IDS']._serialized_end=2503 + _globals['_SEARCHRESULTDATA']._serialized_start=2506 + _globals['_SEARCHRESULTDATA']._serialized_end=2813 + _globals['_VECTORCLUSTERINGINFO']._serialized_start=2815 + _globals['_VECTORCLUSTERINGINFO']._serialized_end=2904 + _globals['_SCALARCLUSTERINGINFO']._serialized_start=2906 + _globals['_SCALARCLUSTERINGINFO']._serialized_end=2943 + _globals['_CLUSTERINGINFO']._serialized_start=2946 + _globals['_CLUSTERINGINFO']._serialized_end=3114 # @@protoc_insertion_point(module_scope) diff --git a/pymilvus/grpc_gen/schema_pb2.pyi b/pymilvus/grpc_gen/schema_pb2.pyi index 26b754dee..f10420908 100644 --- a/pymilvus/grpc_gen/schema_pb2.pyi +++ b/pymilvus/grpc_gen/schema_pb2.pyi @@ -57,7 +57,7 @@ FieldDropping: FieldState FieldDropped: FieldState class FieldSchema(_message.Message): - __slots__ = ("fieldID", "name", "is_primary_key", "description", "data_type", "type_params", "index_params", "autoID", "state", "element_type", "default_value", "is_dynamic", "is_partition_key", "is_clustering_key") + __slots__ = ("fieldID", "name", "is_primary_key", "description", "data_type", "type_params", "index_params", "autoID", "state", "element_type", "default_value", "is_dynamic", "is_partition_key", "is_clustering_key", "nullable") FIELDID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] IS_PRIMARY_KEY_FIELD_NUMBER: _ClassVar[int] @@ -72,6 +72,7 @@ class FieldSchema(_message.Message): IS_DYNAMIC_FIELD_NUMBER: _ClassVar[int] IS_PARTITION_KEY_FIELD_NUMBER: _ClassVar[int] IS_CLUSTERING_KEY_FIELD_NUMBER: _ClassVar[int] + NULLABLE_FIELD_NUMBER: _ClassVar[int] fieldID: int name: str is_primary_key: bool @@ -86,7 +87,8 @@ class FieldSchema(_message.Message): is_dynamic: bool is_partition_key: bool is_clustering_key: bool - def __init__(self, fieldID: _Optional[int] = ..., name: _Optional[str] = ..., is_primary_key: bool = ..., description: _Optional[str] = ..., data_type: _Optional[_Union[DataType, str]] = ..., type_params: _Optional[_Iterable[_Union[_common_pb2.KeyValuePair, _Mapping]]] = ..., index_params: _Optional[_Iterable[_Union[_common_pb2.KeyValuePair, _Mapping]]] = ..., autoID: bool = ..., state: _Optional[_Union[FieldState, str]] = ..., element_type: _Optional[_Union[DataType, str]] = ..., default_value: _Optional[_Union[ValueField, _Mapping]] = ..., is_dynamic: bool = ..., is_partition_key: bool = ..., is_clustering_key: bool = ...) -> None: ... + nullable: bool + def __init__(self, fieldID: _Optional[int] = ..., name: _Optional[str] = ..., is_primary_key: bool = ..., description: _Optional[str] = ..., data_type: _Optional[_Union[DataType, str]] = ..., type_params: _Optional[_Iterable[_Union[_common_pb2.KeyValuePair, _Mapping]]] = ..., index_params: _Optional[_Iterable[_Union[_common_pb2.KeyValuePair, _Mapping]]] = ..., autoID: bool = ..., state: _Optional[_Union[FieldState, str]] = ..., element_type: _Optional[_Union[DataType, str]] = ..., default_value: _Optional[_Union[ValueField, _Mapping]] = ..., is_dynamic: bool = ..., is_partition_key: bool = ..., is_clustering_key: bool = ..., nullable: bool = ...) -> None: ... class CollectionSchema(_message.Message): __slots__ = ("name", "description", "autoID", "fields", "enable_dynamic_field", "properties") @@ -225,20 +227,22 @@ class VectorField(_message.Message): def __init__(self, dim: _Optional[int] = ..., float_vector: _Optional[_Union[FloatArray, _Mapping]] = ..., binary_vector: _Optional[bytes] = ..., float16_vector: _Optional[bytes] = ..., bfloat16_vector: _Optional[bytes] = ..., sparse_float_vector: _Optional[_Union[SparseFloatArray, _Mapping]] = ...) -> None: ... class FieldData(_message.Message): - __slots__ = ("type", "field_name", "scalars", "vectors", "field_id", "is_dynamic") + __slots__ = ("type", "field_name", "scalars", "vectors", "field_id", "is_dynamic", "valid_data") TYPE_FIELD_NUMBER: _ClassVar[int] FIELD_NAME_FIELD_NUMBER: _ClassVar[int] SCALARS_FIELD_NUMBER: _ClassVar[int] VECTORS_FIELD_NUMBER: _ClassVar[int] FIELD_ID_FIELD_NUMBER: _ClassVar[int] IS_DYNAMIC_FIELD_NUMBER: _ClassVar[int] + VALID_DATA_FIELD_NUMBER: _ClassVar[int] type: DataType field_name: str scalars: ScalarField vectors: VectorField field_id: int is_dynamic: bool - def __init__(self, type: _Optional[_Union[DataType, str]] = ..., field_name: _Optional[str] = ..., scalars: _Optional[_Union[ScalarField, _Mapping]] = ..., vectors: _Optional[_Union[VectorField, _Mapping]] = ..., field_id: _Optional[int] = ..., is_dynamic: bool = ...) -> None: ... + valid_data: _containers.RepeatedScalarFieldContainer[bool] + def __init__(self, type: _Optional[_Union[DataType, str]] = ..., field_name: _Optional[str] = ..., scalars: _Optional[_Union[ScalarField, _Mapping]] = ..., vectors: _Optional[_Union[VectorField, _Mapping]] = ..., field_id: _Optional[int] = ..., is_dynamic: bool = ..., valid_data: _Optional[_Iterable[bool]] = ...) -> None: ... class IDs(_message.Message): __slots__ = ("int_id", "str_id") diff --git a/pymilvus/orm/utility.py b/pymilvus/orm/utility.py index 7714d2615..9b522b8bb 100644 --- a/pymilvus/orm/utility.py +++ b/pymilvus/orm/utility.py @@ -11,9 +11,12 @@ # the License. from datetime import datetime, timedelta, timezone -from typing import List, Optional +from typing import List, Mapping, Optional -from pymilvus.client.types import BulkInsertState +from pymilvus.client.types import ( + BulkInsertState, + ResourceGroupConfig, +) from pymilvus.client.utils import hybridts_to_unixtime as _hybridts_to_unixtime from pymilvus.client.utils import mkts_from_datetime as _mkts_from_datetime from pymilvus.client.utils import mkts_from_hybridts as _mkts_from_hybridts @@ -1075,7 +1078,9 @@ def get_server_version(using: str = "default", timeout: Optional[float] = None) return _get_connection(using).get_server_version(timeout=timeout) -def create_resource_group(name: str, using: str = "default", timeout: Optional[float] = None): +def create_resource_group( + name: str, using: str = "default", timeout: Optional[float] = None, **kwargs +): """Create a resource group It will success whether or not the resource group exists. @@ -1086,7 +1091,44 @@ def create_resource_group(name: str, using: str = "default", timeout: Optional[f >>> rgs = utility.list_resource_groups() >>> print(f"resource groups in Milvus: {rgs}") """ - return _get_connection(using).create_resource_group(name, timeout) + return _get_connection(using).create_resource_group(name, timeout, **kwargs) + + +def update_resource_groups( + configs: Mapping[str, ResourceGroupConfig], + using: str = "default", + timeout: Optional[float] = None, +): + """Update resource groups. + This function updates the resource groups based on the provided configurations. + + :param configs: A mapping of resource group names to their configurations. + :type configs: Mapping[str, ResourceGroupConfig] + :param using: The name of the connection to use. Defaults to "default". + :type using: (str, optional) + :param timeout: The timeout value in seconds. Defaults to None. + :type timeout: (float, optional) + + :example: + >>> from pymilvus import connections, utility + >>> connections.connect() + >>> configs = { + ... "resource_group_1": ResourceGroupConfig( + ... requests={"node_num": 1}, + ... limits={"node_num": 5}, + ... transfer_from=[{"resource_group": "resource_group_2"}], + ... transfer_to=[{"resource_group": "resource_group_2"}], + ... ), + ... "resource_group_2": ResourceGroupConfig( + ... requests={"node_num": 4}, + ... limits={"node_num": 4}, + ... transfer_from=[{"resource_group": "__default_resource_group"}], + ... transfer_to=[{"resource_group": "resource_group_1"}], + ... ), + ... } + >>> utility.update_resource_groups(configs) + """ + return _get_connection(using).update_resource_groups(configs, timeout) def drop_resource_group(name: str, using: str = "default", timeout: Optional[float] = None):