|
@@ -419,7 +419,7 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
return new InsertResponse(
|
|
|
new Response(Response.Status.SUCCESS), response.getVectorIdArrayList());
|
|
|
} else {
|
|
|
- logSevere("Insert vectors failed:\n{0}", response.toString());
|
|
|
+ logSevere("Insert vectors failed:\n{0}", response.getStatus().toString());
|
|
|
return new InsertResponse(
|
|
|
new Response(
|
|
|
Response.Status.valueOf(response.getStatus().getErrorCodeValue()),
|
|
@@ -474,7 +474,7 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
searchResponse.getNumQueries());
|
|
|
return searchResponse;
|
|
|
} else {
|
|
|
- logSevere("Search failed:\n{0}", response.toString());
|
|
|
+ logSevere("Search failed:\n{0}", response.getStatus().toString());
|
|
|
SearchResponse searchResponse = new SearchResponse();
|
|
|
searchResponse.setResponse(
|
|
|
new Response(
|
|
@@ -538,7 +538,7 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
searchResponse.getNumQueries());
|
|
|
return searchResponse;
|
|
|
} else {
|
|
|
- logSevere("Search in files failed: {0}", response.toString());
|
|
|
+ logSevere("Search in files failed: {0}", response.getStatus().toString());
|
|
|
|
|
|
SearchResponse searchResponse = new SearchResponse();
|
|
|
searchResponse.setResponse(
|
|
@@ -581,7 +581,9 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
return new DescribeCollectionResponse(
|
|
|
new Response(Response.Status.SUCCESS), collectionMapping);
|
|
|
} else {
|
|
|
- logSevere("Describe Collection `{0}` failed:\n{1}", collectionName, response.toString());
|
|
|
+ logSevere(
|
|
|
+ "Describe Collection `{0}` failed:\n{1}",
|
|
|
+ collectionName, response.getStatus().toString());
|
|
|
return new DescribeCollectionResponse(
|
|
|
new Response(
|
|
|
Response.Status.valueOf(response.getStatus().getErrorCodeValue()),
|
|
@@ -615,7 +617,7 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
logInfo("Current collections: {0}", collectionNames.toString());
|
|
|
return new ShowCollectionsResponse(new Response(Response.Status.SUCCESS), collectionNames);
|
|
|
} else {
|
|
|
- logSevere("Show collections failed:\n{0}", response.toString());
|
|
|
+ logSevere("Show collections failed:\n{0}", response.getStatus().toString());
|
|
|
return new ShowCollectionsResponse(
|
|
|
new Response(
|
|
|
Response.Status.valueOf(response.getStatus().getErrorCodeValue()),
|
|
@@ -652,7 +654,8 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
new Response(Response.Status.SUCCESS), collectionRowCount);
|
|
|
} else {
|
|
|
logSevere(
|
|
|
- "Get collection `{0}` row count failed:\n{1}", collectionName, response.toString());
|
|
|
+ "Get collection `{0}` row count failed:\n{1}",
|
|
|
+ collectionName, response.getStatus().toString());
|
|
|
return new GetCollectionRowCountResponse(
|
|
|
new Response(
|
|
|
Response.Status.valueOf(response.getStatus().getErrorCodeValue()),
|
|
@@ -765,7 +768,7 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
} else {
|
|
|
logSevere(
|
|
|
"Describe index for collection `{0}` failed:\n{1}",
|
|
|
- collectionName, response.toString());
|
|
|
+ collectionName, response.getStatus().toString());
|
|
|
return new DescribeIndexResponse(
|
|
|
new Response(
|
|
|
Response.Status.valueOf(response.getStatus().getErrorCodeValue()),
|
|
@@ -855,7 +858,9 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
return new ShowCollectionInfoResponse(
|
|
|
new Response(Response.Status.SUCCESS), collectionInfo);
|
|
|
} else {
|
|
|
- logSevere("ShowCollectionInfo for `{0}` failed:\n{1}", collectionName, response.toString());
|
|
|
+ logSevere(
|
|
|
+ "ShowCollectionInfo for `{0}` failed:\n{1}",
|
|
|
+ collectionName, response.getStatus().toString());
|
|
|
return new ShowCollectionInfoResponse(
|
|
|
new Response(
|
|
|
Response.Status.valueOf(response.getStatus().getErrorCodeValue()),
|
|
@@ -896,7 +901,7 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
} else {
|
|
|
logSevere(
|
|
|
"getVectorById for `{0}` in collection `{1}` failed:\n{2}",
|
|
|
- String.valueOf(id), collectionName, response.toString());
|
|
|
+ String.valueOf(id), collectionName, response.getStatus().toString());
|
|
|
return new GetVectorByIdResponse(
|
|
|
new Response(
|
|
|
Response.Status.valueOf(response.getStatus().getErrorCodeValue()),
|
|
@@ -939,7 +944,7 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
} else {
|
|
|
logSevere(
|
|
|
"getVectorIds in collection `{0}`, segment `{1}` failed:\n{2}",
|
|
|
- collectionName, segmentName, response.toString());
|
|
|
+ collectionName, segmentName, response.getStatus().toString());
|
|
|
return new GetVectorIdsResponse(
|
|
|
new Response(
|
|
|
Response.Status.valueOf(response.getStatus().getErrorCodeValue()),
|
|
@@ -1078,7 +1083,7 @@ public class MilvusGrpcClient implements MilvusClient {
|
|
|
rowRecordBuilder.addAllFloatData(floatVectors.get(i));
|
|
|
}
|
|
|
if (i < binaryVectors.size()) {
|
|
|
- ((Buffer)binaryVectors.get(i)).rewind();
|
|
|
+ ((Buffer) binaryVectors.get(i)).rewind();
|
|
|
rowRecordBuilder.setBinaryData(ByteString.copyFrom(binaryVectors.get(i)));
|
|
|
}
|
|
|
|