mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 11:21:52 +08:00
update for proto update
This commit is contained in:
parent
81a78a40cb
commit
98d49b803d
@ -36,11 +36,8 @@ def resp_handler(err, error_code):
|
||||
return resp_class(status=status, string_reply='')
|
||||
|
||||
if resp_class == milvus_pb2.TableSchema:
|
||||
table_name = milvus_pb2.TableName(
|
||||
status=status
|
||||
)
|
||||
return milvus_pb2.TableSchema(
|
||||
table_name=table_name
|
||||
status=status
|
||||
)
|
||||
|
||||
if resp_class == milvus_pb2.IndexParam:
|
||||
|
||||
@ -21,7 +21,8 @@ class GrpcArgsParser(object):
|
||||
@error_status
|
||||
def parse_proto_TableSchema(cls, param):
|
||||
_table_schema = {
|
||||
'table_name': param.table_name.table_name,
|
||||
'status': param.status,
|
||||
'table_name': param.table_name,
|
||||
'dimension': param.dimension,
|
||||
'index_file_size': param.index_file_size,
|
||||
'metric_type': param.metric_type
|
||||
@ -47,7 +48,7 @@ class GrpcArgsParser(object):
|
||||
@classmethod
|
||||
@error_status
|
||||
def parse_proto_IndexParam(cls, param):
|
||||
_table_name = param.table_name.table_name
|
||||
_table_name = param.table_name
|
||||
_status, _index = cls.parse_proto_Index(param.index)
|
||||
|
||||
if not _status.OK():
|
||||
|
||||
@ -311,11 +311,8 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer):
|
||||
_status, _table_name = Parser.parse_proto_TableName(request)
|
||||
|
||||
if not _status.OK():
|
||||
table_name = milvus_pb2.TableName(
|
||||
status=status_pb2.Status(error_code=_status.code, reason=_status.message)
|
||||
)
|
||||
return milvus_pb2.TableSchema(
|
||||
table_name=table_name
|
||||
status=status_pb2.Status(error_code=_status.code, reason=_status.message),
|
||||
)
|
||||
|
||||
metadata = {
|
||||
@ -326,22 +323,17 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer):
|
||||
_status, _table = self.connection(metadata=metadata).describe_table(_table_name)
|
||||
|
||||
if _status.OK():
|
||||
_grpc_table_name = milvus_pb2.TableName(
|
||||
status=status_pb2.Status(error_code=_status.code, reason=_status.message),
|
||||
table_name=_table.table_name
|
||||
)
|
||||
|
||||
return milvus_pb2.TableSchema(
|
||||
table_name=_grpc_table_name,
|
||||
table_name=_table_name,
|
||||
index_file_size=_table.index_file_size,
|
||||
dimension=_table.dimension,
|
||||
metric_type=_table.metric_type
|
||||
metric_type=_table.metric_type,
|
||||
status=status_pb2.Status(error_code=_status.code, reason=_status.message),
|
||||
)
|
||||
|
||||
return milvus_pb2.TableSchema(
|
||||
table_name=milvus_pb2.TableName(
|
||||
status=status_pb2.Status(error_code=_status.code, reason=_status.message)
|
||||
)
|
||||
table_name=_table_name,
|
||||
status=status_pb2.Status(error_code=_status.code, reason=_status.message),
|
||||
)
|
||||
|
||||
@mark_grpc_method
|
||||
@ -398,14 +390,10 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer):
|
||||
}
|
||||
_status, _results = self.connection(metadata=metadata).show_tables()
|
||||
|
||||
if not _status.OK():
|
||||
_results = []
|
||||
|
||||
for _result in _results:
|
||||
yield milvus_pb2.TableName(
|
||||
return milvus_pb2.TableNameList(
|
||||
status=status_pb2.Status(error_code=_status.code, reason=_status.message),
|
||||
table_name=_result
|
||||
)
|
||||
table_names=_results
|
||||
)
|
||||
|
||||
@mark_grpc_method
|
||||
def DeleteByRange(self, request, context):
|
||||
|
||||
@ -14,8 +14,8 @@ py==1.8.0
|
||||
pyasn1==0.4.7
|
||||
pyasn1-modules==0.2.6
|
||||
pylint==2.3.1
|
||||
#pymilvus-test==0.2.15
|
||||
pymilvus==0.2.0
|
||||
pymilvus-test==0.2.15
|
||||
#pymilvus==0.2.0
|
||||
pyparsing==2.4.0
|
||||
pytest==4.6.3
|
||||
pytest-level==0.1.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user