Browse Source

Update GetBulkloadState proto (#293)

Signed-off-by: groot <yihua.mo@zilliz.com>
groot 3 years ago
parent
commit
f8f32061bf

+ 18 - 0
src/main/java/io/milvus/response/GetBulkloadStateWrapper.java

@@ -72,6 +72,24 @@ public class GetBulkloadStateWrapper {
         return getInfo(Constant.IMPORT_FILES);
     }
 
+    /**
+     * A flag indicating (heuristically) whether import data are queryable (i.e. loaded in query nodes).
+     *
+     * @return boolean whether import data are queryable(heuristically)
+     */
+    public boolean HeuristicQueryable() {
+        return response.getHeuristicDataQueryable();
+    }
+
+    /**
+     * A flag indicating (heuristically) whether import data are indexed.
+     *
+     * @return boolean whether import data are queryable(heuristically)
+     */
+    public boolean HeuristicIndexed() {
+        return response.getHeuristicDataQueryable();
+    }
+
     private String getInfo(@NonNull String key) {
         List<KeyValuePair> infos = response.getInfosList();
         for (KeyValuePair kv : infos) {

+ 1 - 1
src/main/milvus-proto

@@ -1 +1 @@
-Subproject commit 11a5d5da9b1854b047b3718c8c68ceec26cd51f3
+Subproject commit 92cb0e17d8c79add055f59aab78dd20dbe87565a

+ 4 - 0
src/test/java/io/milvus/client/MilvusServiceClientTest.java

@@ -2688,6 +2688,8 @@ class MilvusServiceClientTest {
                         .setKey(Constant.IMPORT_FILES)
                         .setValue(files)
                         .build())
+                .setHeuristicDataQueryable(false)
+                .setHeuristicDataIndexed(false)
                 .build();
 
         GetBulkloadStateWrapper wrapper = new GetBulkloadStateWrapper(reso);
@@ -2696,6 +2698,8 @@ class MilvusServiceClientTest {
         assertEquals(id, wrapper.getAutoGeneratedIDs().get(0));
         assertEquals(reason, wrapper.getFailedReason());
         assertEquals(files, wrapper.getFiles());
+        assertEquals(false, wrapper.HeuristicQueryable());
+        assertEquals(false, wrapper.HeuristicIndexed());
 
         assertFalse(wrapper.toString().isEmpty());
     }