Browse Source

Delete equals() and hashCode() methods, rename builder (#1657)

Signed-off-by: yhmo <yihua.mo@zilliz.com>
groot 3 months ago
parent
commit
b0101427e0
100 changed files with 3236 additions and 837 deletions
  1. 0 6
      examples/pom.xml
  2. 6 3
      examples/src/main/java/io/milvus/v1/ArrayFieldExample.java
  3. 2 2
      examples/src/main/java/io/milvus/v1/BinaryVectorExample.java
  4. 5 24
      examples/src/main/java/io/milvus/v1/BulkWriterExample.java
  5. 10 6
      examples/src/main/java/io/milvus/v1/ClientPoolExample.java
  6. 14 15
      examples/src/main/java/io/milvus/v1/CommonUtils.java
  7. 3 3
      examples/src/main/java/io/milvus/v1/ConsistencyLevelExample.java
  8. 15 7
      examples/src/main/java/io/milvus/v1/Float16VectorExample.java
  9. 1 1
      examples/src/main/java/io/milvus/v1/GeneralExample.java
  10. 13 8
      examples/src/main/java/io/milvus/v1/HighLevelExample.java
  11. 4 2
      examples/src/main/java/io/milvus/v1/HybridSearchExample.java
  12. 3 9
      examples/src/main/java/io/milvus/v1/IteratorExample.java
  13. 5 5
      examples/src/main/java/io/milvus/v1/JsonFieldExample.java
  14. 2 2
      examples/src/main/java/io/milvus/v1/NullAndDefaultExample.java
  15. 3 3
      examples/src/main/java/io/milvus/v1/RBACExample.java
  16. 1 2
      examples/src/main/java/io/milvus/v1/ResourceGroupExample.java
  17. 24 13
      examples/src/main/java/io/milvus/v1/SimpleExample.java
  18. 1 0
      examples/src/main/java/io/milvus/v1/UpsertExample.java
  19. 17 9
      examples/src/main/java/io/milvus/v1/resourcegroup/NodeInfo.java
  20. 31 14
      examples/src/main/java/io/milvus/v1/resourcegroup/ResourceGroupInfo.java
  21. 16 31
      examples/src/main/java/io/milvus/v1/resourcegroup/ResourceGroupManagement.java
  22. 4 1
      examples/src/main/java/io/milvus/v2/AddFieldExample.java
  23. 2 2
      examples/src/main/java/io/milvus/v2/ArrayFieldExample.java
  24. 6 6
      examples/src/main/java/io/milvus/v2/BinaryVectorExample.java
  25. 7 2
      examples/src/main/java/io/milvus/v2/CDCExample.java
  26. 6 5
      examples/src/main/java/io/milvus/v2/ClientPoolExample.java
  27. 3 3
      examples/src/main/java/io/milvus/v2/ConsistencyLevelExample.java
  28. 2 1
      examples/src/main/java/io/milvus/v2/Float16VectorExample.java
  29. 6 3
      examples/src/main/java/io/milvus/v2/FullTextSearchExample.java
  30. 7 16
      examples/src/main/java/io/milvus/v2/GeneralExample.java
  31. 5 2
      examples/src/main/java/io/milvus/v2/GeometryExample.java
  32. 10 14
      examples/src/main/java/io/milvus/v2/HybridSearchExample.java
  33. 5 7
      examples/src/main/java/io/milvus/v2/Int8VectorExample.java
  34. 10 8
      examples/src/main/java/io/milvus/v2/IteratorExample.java
  35. 9 9
      examples/src/main/java/io/milvus/v2/JsonFieldExample.java
  36. 6 3
      examples/src/main/java/io/milvus/v2/NullAndDefaultExample.java
  37. 6 2
      examples/src/main/java/io/milvus/v2/RankerExample.java
  38. 16 8
      examples/src/main/java/io/milvus/v2/SimpleExample.java
  39. 4 4
      examples/src/main/java/io/milvus/v2/SparseVectorExample.java
  40. 1 0
      examples/src/main/java/io/milvus/v2/StageFileManagerExample.java
  41. 1 0
      examples/src/main/java/io/milvus/v2/StageManagerExample.java
  42. 5 3
      examples/src/main/java/io/milvus/v2/StructExample.java
  43. 2 2
      examples/src/main/java/io/milvus/v2/TextMatchExample.java
  44. 4 3
      examples/src/main/java/io/milvus/v2/UpsertExample.java
  45. 1 1
      examples/src/main/java/io/milvus/v2/bulkwriter/BulkWriterLocalExample.java
  46. 22 33
      examples/src/main/java/io/milvus/v2/bulkwriter/BulkWriterRemoteExample.java
  47. 22 32
      examples/src/main/java/io/milvus/v2/bulkwriter/BulkWriterStageExample.java
  48. 3 0
      examples/src/main/java/io/milvus/v2/bulkwriter/CsvDataObject.java
  49. 0 1
      pom.xml
  50. 0 6
      sdk-bulkwriter/pom.xml
  51. 8 8
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/BulkWriter.java
  52. 4 4
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/LocalBulkWriter.java
  53. 35 11
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/LocalBulkWriterParam.java
  54. 3 3
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/RemoteBulkWriter.java
  55. 42 14
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/RemoteBulkWriterParam.java
  56. 4 4
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/StageBulkWriter.java
  57. 53 15
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/StageBulkWriterParam.java
  58. 3 8
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/StageFileManager.java
  59. 30 11
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/StageFileManagerParam.java
  60. 18 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/StageManagerParam.java
  61. 10 5
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/common/clientenum/BulkFileType.java
  62. 19 18
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/common/clientenum/CloudStorage.java
  63. 3 3
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/common/utils/GeneratorUtils.java
  64. 1 1
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/common/utils/ParquetUtils.java
  65. 1 2
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/common/utils/V2AdapterUtils.java
  66. 34 13
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/connect/AzureConnectParam.java
  67. 53 13
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/connect/S3ConnectParam.java
  68. 2 1
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/model/CompleteMultipartUploadOutputModel.java
  69. 65 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/model/UploadFilesResult.java
  70. 48 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/describe/BaseDescribeImportRequest.java
  71. 66 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/describe/CloudDescribeImportRequest.java
  72. 48 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/describe/MilvusDescribeImportRequest.java
  73. 66 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/import_/BaseImportRequest.java
  74. 218 28
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/import_/CloudImportRequest.java
  75. 114 20
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/import_/MilvusImportRequest.java
  76. 154 23
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/import_/StageImportRequest.java
  77. 47 10
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/list/BaseListImportJobsRequest.java
  78. 84 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/list/CloudListImportJobsRequest.java
  79. 48 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/list/MilvusListImportJobsRequest.java
  80. 66 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/ApplyStageRequest.java
  81. 66 10
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/BaseStageRequest.java
  82. 83 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/CreateStageRequest.java
  83. 47 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/DeleteStageRequest.java
  84. 84 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/ListStagesRequest.java
  85. 65 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/UploadFilesRequest.java
  86. 338 26
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/ApplyStageResponse.java
  87. 47 10
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/BulkImportResponse.java
  88. 350 25
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/GetImportProgressResponse.java
  89. 101 14
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/ListImportJobsResponse.java
  90. 83 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/Record.java
  91. 82 12
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/RestfulResponse.java
  92. 101 13
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/stage/ListStagesResponse.java
  93. 47 9
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/stage/StageInfo.java
  94. 12 6
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/restful/BulkImportUtils.java
  95. 16 8
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/restful/DataStageUtils.java
  96. 2 0
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/storage/StorageClient.java
  97. 1 8
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/storage/client/MinioStorageClient.java
  98. 3 3
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/writer/CSVFileWriter.java
  99. 2 2
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/writer/JSONFileWriter.java
  100. 8 8
      sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/writer/ParquetFileWriter.java

+ 0 - 6
examples/pom.xml

@@ -77,12 +77,6 @@
             <artifactId>tensorflow-core-platform</artifactId>
             <version>0.5.0</version>
         </dependency>
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-            <version>1.18.22</version>
-            <scope>provided</scope>
-        </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>

+ 6 - 3
examples/src/main/java/io/milvus/v1/ArrayFieldExample.java

@@ -34,7 +34,10 @@ import io.milvus.param.dml.QueryParam;
 import io.milvus.param.index.CreateIndexParam;
 import io.milvus.response.QueryResultsWrapper;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
 
 public class ArrayFieldExample {
     private static final String COLLECTION_NAME = "java_sdk_example_array_v1";
@@ -141,7 +144,7 @@ public class ArrayFieldExample {
             List<String> strArray = new ArrayList<>();
             int capacity = random.nextInt(5) + 5;
             for (int k = 0; k < capacity; k++) {
-                intArray.add((i+k)%100);
+                intArray.add((i + k) % 100);
                 strArray.add(String.format("string-%d-%d", i, k));
             }
             intArrArray.add(intArray);
@@ -186,7 +189,7 @@ public class ArrayFieldExample {
                 .withConsistencyLevel(ConsistencyLevelEnum.STRONG)
                 .build());
         QueryResultsWrapper queryWrapper = new QueryResultsWrapper(queryRet.getData());
-        System.out.printf("%d rows in collection\n", (long)queryWrapper.getFieldWrapper("count(*)").getFieldData().get(0));
+        System.out.printf("%d rows in collection\n", (long) queryWrapper.getFieldWrapper("count(*)").getFieldData().get(0));
 
         // Query by filtering expression
         queryWithExpr(client, "array_int32[0] == 99");

+ 2 - 2
examples/src/main/java/io/milvus/v1/BinaryVectorExample.java

@@ -42,7 +42,7 @@ public class BinaryVectorExample {
     private static final String VECTOR_FIELD = "vector";
 
     private static final Integer VECTOR_DIM = 128;
-    
+
 
     public static void main(String[] args) {
         // Connect to Milvus server. Replace the "localhost" and port with your Milvus server address.
@@ -172,7 +172,7 @@ public class BinaryVectorExample {
             System.out.printf("The result of No.%d target vector:\n", i);
             for (SearchResultsWrapper.IDScore score : scores) {
                 System.out.println(score);
-                ByteBuffer vector = (ByteBuffer)score.get(VECTOR_FIELD);
+                ByteBuffer vector = (ByteBuffer) score.get(VECTOR_FIELD);
                 CommonUtils.printBinaryVector(vector);
             }
             if (scores.get(0).getLongID() != k) {

+ 5 - 24
examples/src/main/java/io/milvus/v1/BulkWriterExample.java

@@ -24,11 +24,7 @@ import com.google.common.collect.Lists;
 import com.google.gson.Gson;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
-import io.milvus.bulkwriter.BulkWriter;
-import io.milvus.bulkwriter.LocalBulkWriter;
-import io.milvus.bulkwriter.LocalBulkWriterParam;
-import io.milvus.bulkwriter.RemoteBulkWriter;
-import io.milvus.bulkwriter.RemoteBulkWriterParam;
+import io.milvus.bulkwriter.*;
 import io.milvus.bulkwriter.common.clientenum.BulkFileType;
 import io.milvus.bulkwriter.common.clientenum.CloudStorage;
 import io.milvus.bulkwriter.common.utils.GeneratorUtils;
@@ -50,19 +46,8 @@ import io.milvus.common.utils.ExceptionUtils;
 import io.milvus.grpc.DataType;
 import io.milvus.grpc.GetCollectionStatisticsResponse;
 import io.milvus.grpc.QueryResults;
-import io.milvus.param.ConnectParam;
-import io.milvus.param.IndexType;
-import io.milvus.param.MetricType;
-import io.milvus.param.R;
-import io.milvus.param.RpcStatus;
-import io.milvus.param.collection.CollectionSchemaParam;
-import io.milvus.param.collection.CreateCollectionParam;
-import io.milvus.param.collection.DropCollectionParam;
-import io.milvus.param.collection.FieldType;
-import io.milvus.param.collection.FlushParam;
-import io.milvus.param.collection.GetCollectionStatisticsParam;
-import io.milvus.param.collection.HasCollectionParam;
-import io.milvus.param.collection.LoadCollectionParam;
+import io.milvus.param.*;
+import io.milvus.param.collection.*;
 import io.milvus.param.dml.QueryParam;
 import io.milvus.param.index.CreateIndexParam;
 import io.milvus.response.GetCollStatResponseWrapper;
@@ -74,11 +59,7 @@ import org.apache.http.util.Asserts;
 import java.io.File;
 import java.io.IOException;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.concurrent.TimeUnit;
 
 
@@ -596,7 +577,7 @@ public class BulkWriterExample {
 
     /**
      * @param collectionSchema collection info
-     * @param dropIfExist     if collection already exist, will drop firstly and then create again
+     * @param dropIfExist      if collection already exist, will drop firstly and then create again
      */
     private void createCollection(String collectionName, CollectionSchemaParam collectionSchema, boolean dropIfExist) {
         System.out.println("\n===================== create collection ====================");

+ 10 - 6
examples/src/main/java/io/milvus/v1/ClientPoolExample.java

@@ -38,7 +38,10 @@ import io.milvus.pool.PoolConfig;
 import io.milvus.response.QueryResultsWrapper;
 
 import java.time.Duration;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
 public class ClientPoolExample {
     public static String serverUri = "http://localhost:19530";
@@ -51,6 +54,7 @@ public class ClientPoolExample {
         System.out.printf("Key '%s': %d idle clients and %d active clients%n",
                 key, pool.getIdleClientNumber(key), pool.getActiveClientNumber(key));
     }
+
     private static void printClientNumber(MilvusClientV1Pool pool) {
         System.out.println("======================================================================");
         System.out.printf("Total %d idle clients and %d active clients%n",
@@ -158,7 +162,7 @@ public class ClientPoolExample {
             Gson gson = new Gson();
             for (int i = 0; i < repeatRequests; i++) {
                 MilvusClient client = null;
-                while(client == null) {
+                while (client == null) {
                     try {
                         // getClient() might exceeds the borrowMaxWaitMillis and throw exception
                         // retry to call until it return a client
@@ -201,7 +205,7 @@ public class ClientPoolExample {
         Thread t = new Thread(() -> {
             for (int i = 0; i < repeatRequests; i++) {
                 MilvusClient client = null;
-                while(client == null) {
+                while (client == null) {
                     try {
                         // getClient() might exceeds the borrowMaxWaitMillis and throw exception
                         // retry to call until it return a client
@@ -253,7 +257,7 @@ public class ClientPoolExample {
                         .withConsistencyLevel(ConsistencyLevelEnum.STRONG)
                         .build());
                 QueryResultsWrapper queryWrapper = new QueryResultsWrapper(queryRet.getData());
-                long rowCount = (long)queryWrapper.getFieldWrapper("count(*)").getFieldData().get(0);
+                long rowCount = (long) queryWrapper.getFieldWrapper("count(*)").getFieldData().get(0);
                 System.out.printf("%d rows persisted in collection '%s' of database '%s'%n",
                         rowCount, CollectionName, dbName);
                 if (rowCount != expectedCount) {
@@ -359,7 +363,7 @@ public class ClientPoolExample {
         printClientNumber(pool);
 
         // check row count of each collection, there are threadCount*repeatRequests rows were inserted by multiple threads
-        verifyRowCount(pool, threadCount*repeatRequests);
+        verifyRowCount(pool, threadCount * repeatRequests);
         // drop collections
         dropCollections(pool);
         // drop databases, only after database is empty, it is able to be dropped
@@ -367,7 +371,7 @@ public class ClientPoolExample {
 
         long end = System.currentTimeMillis();
         System.out.printf("%d insert requests and %d search requests finished in %.3f seconds%n",
-                threadCount*repeatRequests*3, threadCount*repeatRequests*3, (end-start)*0.001);
+                threadCount * repeatRequests * 3, threadCount * repeatRequests * 3, (end - start) * 0.001);
 
         printClientNumber(pool);
         pool.clear(); // clear idle clients

+ 14 - 15
examples/src/main/java/io/milvus/v1/CommonUtils.java

@@ -20,7 +20,6 @@ package io.milvus.v1;
 
 import io.milvus.common.utils.Float16Utils;
 import io.milvus.param.R;
-
 import org.tensorflow.Tensor;
 import org.tensorflow.ndarray.Shape;
 import org.tensorflow.ndarray.buffer.ByteDataBuffer;
@@ -69,7 +68,7 @@ public class CommonUtils {
     public static List<List<Float>> generateFixFloatVectors(int dimension, int count) {
         List<List<Float>> vectors = new ArrayList<>();
         for (int n = 0; n < count; ++n) {
-            List<Float> vector = generateFloatVector(dimension, (float)n);
+            List<Float> vector = generateFloatVector(dimension, (float) n);
             vectors.add(vector);
         }
         return vectors;
@@ -87,7 +86,7 @@ public class CommonUtils {
         }
     }
 
-    /////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// //////////////////////////////////////////////////////////////////////////////////////////////////
     public static ByteBuffer generateBinaryVector(int dimension) {
         Random ran = new Random();
         int byteCount = dimension / 8;
@@ -117,7 +116,7 @@ public class CommonUtils {
         System.out.println();
     }
 
-    /////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// //////////////////////////////////////////////////////////////////////////////////////////////////
     public static TBfloat16 genTensorflowBF16Vector(int dimension) {
         Random ran = new Random();
         float[] array = new float[dimension];
@@ -131,7 +130,7 @@ public class CommonUtils {
     public static List<TBfloat16> genTensorflowBF16Vectors(int dimension, int count) {
         List<TBfloat16> vectors = new ArrayList<>();
         for (int n = 0; n < count; ++n) {
-           TBfloat16 vector = genTensorflowBF16Vector(dimension);
+            TBfloat16 vector = genTensorflowBF16Vector(dimension);
             vectors.add(vector);
         }
 
@@ -140,7 +139,7 @@ public class CommonUtils {
 
     public static ByteBuffer encodeTensorBF16Vector(TBfloat16 vector) {
         ByteDataBuffer tensorBuf = vector.asRawTensor().data();
-        ByteBuffer buf = ByteBuffer.allocate((int)tensorBuf.size());
+        ByteBuffer buf = ByteBuffer.allocate((int) tensorBuf.size());
         for (long i = 0; i < tensorBuf.size(); i++) {
             buf.put(tensorBuf.getByte(i));
         }
@@ -157,10 +156,10 @@ public class CommonUtils {
     }
 
     public static TBfloat16 decodeBF16VectorToTensor(ByteBuffer buf) {
-        if (buf.limit()%2 != 0) {
+        if (buf.limit() % 2 != 0) {
             return null;
         }
-        int dim = buf.limit()/2;
+        int dim = buf.limit() / 2;
         ByteDataBuffer bf = DataBuffers.of(buf.array());
         return Tensor.of(TBfloat16.class, Shape.of(dim), bf);
     }
@@ -197,7 +196,7 @@ public class CommonUtils {
 
     public static ByteBuffer encodeTensorFP16Vector(TFloat16 vector) {
         ByteDataBuffer tensorBuf = vector.asRawTensor().data();
-        ByteBuffer buf = ByteBuffer.allocate((int)tensorBuf.size());
+        ByteBuffer buf = ByteBuffer.allocate((int) tensorBuf.size());
         for (long i = 0; i < tensorBuf.size(); i++) {
             buf.put(tensorBuf.getByte(i));
         }
@@ -214,10 +213,10 @@ public class CommonUtils {
     }
 
     public static TFloat16 decodeFP16VectorToTensor(ByteBuffer buf) {
-        if (buf.limit()%2 != 0) {
+        if (buf.limit() % 2 != 0) {
             return null;
         }
-        int dim = buf.limit()/2;
+        int dim = buf.limit() / 2;
         ByteDataBuffer bf = DataBuffers.of(buf.array());
         return Tensor.of(TFloat16.class, Shape.of(dim), bf);
     }
@@ -231,7 +230,7 @@ public class CommonUtils {
         return vector;
     }
 
-    /////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// //////////////////////////////////////////////////////////////////////////////////////////////////
     public static ByteBuffer encodeFloat16Vector(List<Float> originVector, boolean bfloat16) {
         if (bfloat16) {
             return Float16Utils.f32VectorToBf16Buffer(originVector);
@@ -274,7 +273,7 @@ public class CommonUtils {
         return vectors;
     }
 
-    /////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// //////////////////////////////////////////////////////////////////////////////////////////////////
     public static ByteBuffer generateInt8Vector(int dimension) {
         Random ran = new Random();
         int byteCount = dimension;
@@ -295,13 +294,13 @@ public class CommonUtils {
         return vectors;
     }
 
-    /////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// //////////////////////////////////////////////////////////////////////////////////////////////////
     public static SortedMap<Long, Float> generateSparseVector() {
         Random ran = new Random();
         SortedMap<Long, Float> sparse = new TreeMap<>();
         int dim = ran.nextInt(10) + 10;
         while (sparse.size() < dim) {
-            sparse.put((long)ran.nextInt(1000000), ran.nextFloat());
+            sparse.put((long) ran.nextInt(1000000), ran.nextFloat());
         }
         return sparse;
     }

+ 3 - 3
examples/src/main/java/io/milvus/v1/ConsistencyLevelExample.java

@@ -137,7 +137,7 @@ public class ConsistencyLevelExample {
                 .withCollectionName(collectionName)
                 .withVectorFieldName("vector")
                 .withFloatVectors(Collections.singletonList(CommonUtils.generateFloatVector(VECTOR_DIM)))
-                .withLimit((long)topK)
+                .withLimit((long) topK)
                 .withMetricType(MetricType.L2)
                 .build());
         CommonUtils.handleResponseStatus(searchR);
@@ -187,7 +187,7 @@ public class ConsistencyLevelExample {
             row.add("vector", gson.toJsonTree(vector));
 
             // insert by a MilvusClient
-            String clientName1 = String.format("client_%d", i%10);
+            String clientName1 = String.format("client_%d", i % 10);
             MilvusClient client1 = pool.getClient(clientName1);
             client1.insert(InsertParam.newBuilder()
                     .withCollectionName(collectionName)
@@ -198,7 +198,7 @@ public class ConsistencyLevelExample {
 
             // search by another MilvusClient, use the just inserted vector to search
             // the returned item is expected to be the just inserted item
-            String clientName2 = String.format("client_%d", i%10+1);
+            String clientName2 = String.format("client_%d", i % 10 + 1);
             MilvusClient client2 = pool.getClient(clientName2);
             R<SearchResults> searchR = client2.search(SearchParam.newBuilder()
                     .withCollectionName(collectionName)

+ 15 - 7
examples/src/main/java/io/milvus/v1/Float16VectorExample.java

@@ -22,12 +22,19 @@ import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import io.milvus.client.MilvusServiceClient;
 import io.milvus.common.clientenum.ConsistencyLevelEnum;
-import io.milvus.grpc.*;
+import io.milvus.grpc.DataType;
+import io.milvus.grpc.MutationResult;
+import io.milvus.grpc.QueryResults;
+import io.milvus.grpc.SearchResults;
 import io.milvus.param.*;
 import io.milvus.param.collection.*;
-import io.milvus.param.dml.*;
-import io.milvus.param.index.*;
-import io.milvus.response.*;
+import io.milvus.param.dml.InsertParam;
+import io.milvus.param.dml.QueryParam;
+import io.milvus.param.dml.SearchParam;
+import io.milvus.param.index.CreateIndexParam;
+import io.milvus.response.FieldDataWrapper;
+import io.milvus.response.QueryResultsWrapper;
+import io.milvus.response.SearchResultsWrapper;
 import org.tensorflow.types.TBfloat16;
 import org.tensorflow.types.TFloat16;
 
@@ -42,6 +49,7 @@ public class Float16VectorExample {
     private static final Integer VECTOR_DIM = 128;
 
     private static final MilvusServiceClient milvusClient;
+
     static {
         // Connect to Milvus server. Replace the "localhost" and port with your Milvus server address.
         milvusClient = new MilvusServiceClient(ConnectParam.newBuilder()
@@ -179,7 +187,7 @@ public class Float16VectorExample {
         // Ensure the returned top1 item's ID should be equal to target vector's ID
         for (int i = 0; i < 10; i++) {
             Random ran = new Random();
-            int k = ran.nextInt(batchRowCount*2);
+            int k = ran.nextInt(batchRowCount * 2);
             ByteBuffer targetVector = encodedVectors.get(k);
             SearchParam.Builder builder = SearchParam.newBuilder()
                     .withCollectionName(COLLECTION_NAME)
@@ -208,7 +216,7 @@ public class Float16VectorExample {
                         firstScore.getLongID(), k));
             }
 
-            ByteBuffer outputBuf = (ByteBuffer)firstScore.get(VECTOR_FIELD);
+            ByteBuffer outputBuf = (ByteBuffer) firstScore.get(VECTOR_FIELD);
             if (!outputBuf.equals(targetVector)) {
                 throw new RuntimeException(String.format("The output vector is not equal to target vector: ID %d", k));
             }
@@ -229,7 +237,7 @@ public class Float16VectorExample {
         // Retrieve some data and verify the output
         for (int i = 0; i < 10; i++) {
             Random ran = new Random();
-            int k = ran.nextInt(batchRowCount*2);
+            int k = ran.nextInt(batchRowCount * 2);
             R<QueryResults> queryR = milvusClient.query(QueryParam.newBuilder()
                     .withCollectionName(COLLECTION_NAME)
                     .withExpr(String.format("id == %d", k))

+ 1 - 1
examples/src/main/java/io/milvus/v1/GeneralExample.java

@@ -46,7 +46,7 @@ public class GeneralExample {
         ConnectParam connectParam = ConnectParam.newBuilder()
                 .withHost("localhost")
                 .withPort(19530)
-                .withAuthorization("root","Milvus")
+                .withAuthorization("root", "Milvus")
                 .build();
         RetryParam retryParam = RetryParam.newBuilder()
                 .withMaxRetryTimes(3)

+ 13 - 8
examples/src/main/java/io/milvus/v1/HighLevelExample.java

@@ -18,21 +18,26 @@
  */
 package io.milvus.v1;
 
+import com.google.common.collect.Lists;
 import com.google.gson.Gson;
 import com.google.gson.JsonObject;
-import com.google.common.collect.Lists;
 import io.milvus.client.MilvusServiceClient;
 import io.milvus.common.clientenum.ConsistencyLevelEnum;
 import io.milvus.common.utils.VectorUtils;
-import io.milvus.grpc.*;
-import io.milvus.param.*;
-import io.milvus.param.collection.*;
-import io.milvus.param.highlevel.collection.response.ListCollectionsResponse;
+import io.milvus.grpc.DescribeCollectionResponse;
+import io.milvus.param.ConnectParam;
+import io.milvus.param.IndexType;
+import io.milvus.param.R;
+import io.milvus.param.RpcStatus;
+import io.milvus.param.collection.DescribeCollectionParam;
+import io.milvus.param.collection.FlushParam;
 import io.milvus.param.highlevel.collection.CreateSimpleCollectionParam;
 import io.milvus.param.highlevel.collection.ListCollectionsParam;
+import io.milvus.param.highlevel.collection.response.ListCollectionsResponse;
 import io.milvus.param.highlevel.dml.*;
 import io.milvus.param.highlevel.dml.response.*;
-import io.milvus.response.*;
+import io.milvus.response.DescCollResponseWrapper;
+import io.milvus.response.QueryResultsWrapper;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -46,7 +51,7 @@ public class HighLevelExample {
         ConnectParam connectParam = ConnectParam.newBuilder()
                 .withHost("localhost")
                 .withPort(19530)
-                .withAuthorization("root","Milvus")
+                .withAuthorization("root", "Milvus")
                 .build();
         milvusClient = new MilvusServiceClient(connectParam);
     }
@@ -68,7 +73,7 @@ public class HighLevelExample {
     private static final String BOOL_FIELD_NAME = "bool";
     private static final String FLOAT_FIELD_NAME = "float";
     private static final String DOUBLE_FIELD_NAME = "double";
-    
+
 
     private R<DescribeCollectionResponse> describeCollection() {
         System.out.println("========== describeCollection() ==========");

+ 4 - 2
examples/src/main/java/io/milvus/v1/HybridSearchExample.java

@@ -29,8 +29,10 @@ import io.milvus.grpc.MutationResult;
 import io.milvus.grpc.SearchResults;
 import io.milvus.param.*;
 import io.milvus.param.collection.*;
-import io.milvus.param.dml.*;
-import io.milvus.param.dml.ranker.*;
+import io.milvus.param.dml.AnnSearchParam;
+import io.milvus.param.dml.HybridSearchParam;
+import io.milvus.param.dml.InsertParam;
+import io.milvus.param.dml.ranker.RRFRanker;
 import io.milvus.param.index.CreateIndexParam;
 import io.milvus.response.GetCollStatResponseWrapper;
 import io.milvus.response.SearchResultsWrapper;

+ 3 - 9
examples/src/main/java/io/milvus/v1/IteratorExample.java

@@ -24,22 +24,16 @@ import io.milvus.client.MilvusClient;
 import io.milvus.client.MilvusServiceClient;
 import io.milvus.common.clientenum.ConsistencyLevelEnum;
 import io.milvus.grpc.DataType;
-import io.milvus.grpc.FlushResponse;
 import io.milvus.grpc.GetCollectionStatisticsResponse;
 import io.milvus.grpc.MutationResult;
-import io.milvus.param.ConnectParam;
-import io.milvus.param.IndexType;
-import io.milvus.param.MetricType;
-import io.milvus.param.R;
-import io.milvus.param.RetryParam;
-import io.milvus.param.RpcStatus;
+import io.milvus.orm.iterator.QueryIterator;
+import io.milvus.orm.iterator.SearchIterator;
+import io.milvus.param.*;
 import io.milvus.param.collection.*;
 import io.milvus.param.dml.InsertParam;
 import io.milvus.param.dml.QueryIteratorParam;
 import io.milvus.param.dml.SearchIteratorParam;
 import io.milvus.param.index.CreateIndexParam;
-import io.milvus.orm.iterator.QueryIterator;
-import io.milvus.orm.iterator.SearchIterator;
 import io.milvus.response.GetCollStatResponseWrapper;
 import io.milvus.response.QueryResultsWrapper;
 

+ 5 - 5
examples/src/main/java/io/milvus/v1/JsonFieldExample.java

@@ -142,7 +142,7 @@ public class JsonFieldExample {
             JsonObject metadata = new JsonObject();
             metadata.addProperty("path", String.format("\\root/abc/path_%d", i));
             metadata.addProperty("size", i);
-            if (i%7 == 0) {
+            if (i % 7 == 0) {
                 metadata.addProperty("special", true);
             }
 
@@ -152,8 +152,8 @@ public class JsonFieldExample {
 //            System.out.println(metadata);
 
             // dynamic fields
-            if (i%2 == 0) {
-                row.addProperty("dynamic1", (double)i/3);
+            if (i % 2 == 0) {
+                row.addProperty("dynamic1", (double) i / 3);
             } else {
                 row.addProperty("dynamic2", "ok");
             }
@@ -172,7 +172,7 @@ public class JsonFieldExample {
                 .withConsistencyLevel(ConsistencyLevelEnum.STRONG)
                 .build());
         QueryResultsWrapper queryWrapper = new QueryResultsWrapper(queryRet.getData());
-        long rowCount = (long)queryWrapper.getFieldWrapper("count(*)").getFieldData().get(0);
+        long rowCount = (long) queryWrapper.getFieldWrapper("count(*)").getFieldData().get(0);
         System.out.printf("%d rows persisted\n", rowCount);
 
         // search and output JSON field
@@ -221,7 +221,7 @@ public class JsonFieldExample {
             for (QueryResultsWrapper.RowRecord record : records) {
                 System.out.println(record);
             }
-            long pk = (long)records.get(0).get(ID_FIELD);
+            long pk = (long) records.get(0).get(ID_FIELD);
             if (pk != i) {
                 throw new RuntimeException(String.format("The top1 ID %d is not equal to target vector's ID %d", pk, i));
             }

+ 2 - 2
examples/src/main/java/io/milvus/v1/NullAndDefaultExample.java

@@ -164,7 +164,7 @@ public class NullAndDefaultExample {
             }
 
             // some values are default value
-            if (i%3==0) {
+            if (i % 3 == 0) {
                 row.addProperty("default_test", 1.0);
             }
 
@@ -197,7 +197,7 @@ public class NullAndDefaultExample {
                 .withConsistencyLevel(ConsistencyLevelEnum.STRONG)
                 .build());
         QueryResultsWrapper wrapper = new QueryResultsWrapper(queryRet.getData());
-        long rowCount = (long)wrapper.getFieldWrapper("count(*)").getFieldData().get(0);
+        long rowCount = (long) wrapper.getFieldWrapper("count(*)").getFieldData().get(0);
         System.out.printf("%d rows in collection\n", rowCount);
 
         // Query by filtering expression

+ 3 - 3
examples/src/main/java/io/milvus/v1/RBACExample.java

@@ -37,7 +37,7 @@ public class RBACExample {
         ConnectParam connectParam = ConnectParam.newBuilder()
                 .withHost("localhost")
                 .withPort(19530)
-                .withAuthorization("root","Milvus")
+                .withAuthorization("root", "Milvus")
                 .build();
         milvusClient = new MilvusServiceClient(connectParam);
     }
@@ -118,7 +118,7 @@ public class RBACExample {
 
         // grant privilege to role.
         // grant object is all collections, grant object type is Collection, and the privilege is CreateCollection
-        resp = grantRolePrivilege("role1","Global","*",  "CreateCollection");
+        resp = grantRolePrivilege("role1", "Global", "*", "CreateCollection");
         Validate.isTrue(resp.getStatus() == R.success().getStatus(), "bind privileges to role fail!");
         System.out.println("grant privilege to role1");
 
@@ -128,7 +128,7 @@ public class RBACExample {
         System.out.println("bind role1 to user");
 
         // revoke privilege from role
-        resp = revokeRolePrivilege("role1","Global","*",  "CreateCollection");
+        resp = revokeRolePrivilege("role1", "Global", "*", "CreateCollection");
         Validate.isTrue(resp.getStatus() == R.success().getStatus(), "revoke privileges to role fail!");
         System.out.println("revoke privilege from role1");
 

+ 1 - 2
examples/src/main/java/io/milvus/v1/ResourceGroupExample.java

@@ -20,10 +20,9 @@
 package io.milvus.v1;
 
 import com.google.gson.Gson;
-
 import io.milvus.client.MilvusServiceClient;
-import io.milvus.v1.resourcegroup.ResourceGroupManagement;
 import io.milvus.param.ConnectParam;
+import io.milvus.v1.resourcegroup.ResourceGroupManagement;
 
 public class ResourceGroupExample {
     private static final ResourceGroupManagement manager;

+ 24 - 13
examples/src/main/java/io/milvus/v1/SimpleExample.java

@@ -22,15 +22,26 @@ import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import io.milvus.client.MilvusServiceClient;
 import io.milvus.common.clientenum.ConsistencyLevelEnum;
-import io.milvus.grpc.*;
+import io.milvus.grpc.DataType;
+import io.milvus.grpc.MutationResult;
+import io.milvus.grpc.QueryResults;
+import io.milvus.grpc.SearchResults;
 import io.milvus.param.*;
-import io.milvus.param.collection.*;
-import io.milvus.param.dml.*;
-import io.milvus.param.index.*;
-import io.milvus.response.*;
-import io.milvus.v2.service.vector.response.QueryResp;
-
-import java.util.*;
+import io.milvus.param.collection.CreateCollectionParam;
+import io.milvus.param.collection.DropCollectionParam;
+import io.milvus.param.collection.FieldType;
+import io.milvus.param.collection.LoadCollectionParam;
+import io.milvus.param.dml.InsertParam;
+import io.milvus.param.dml.QueryParam;
+import io.milvus.param.dml.SearchParam;
+import io.milvus.param.index.CreateIndexParam;
+import io.milvus.response.QueryResultsWrapper;
+import io.milvus.response.SearchResultsWrapper;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
 
 public class SimpleExample {
@@ -113,7 +124,7 @@ public class SimpleExample {
         for (long i = 1L; i <= 10; ++i) {
             JsonObject row = new JsonObject();
             row.addProperty(ID_FIELD, i);
-            List<Float> vector = Arrays.asList((float)i, (float)i, (float)i, (float)i);
+            List<Float> vector = Arrays.asList((float) i, (float) i, (float) i, (float) i);
             row.add(VECTOR_FIELD, gson.toJsonTree(vector));
             row.addProperty(TITLE_FIELD, "Tom and Jerry " + i);
             rows.add(row);
@@ -135,7 +146,7 @@ public class SimpleExample {
                 .withConsistencyLevel(ConsistencyLevelEnum.STRONG)
                 .build());
         QueryResultsWrapper wrapper = new QueryResultsWrapper(queryRet.getData());
-        long rowCount = (long)wrapper.getFieldWrapper("count(*)").getFieldData().get(0);
+        long rowCount = (long) wrapper.getFieldWrapper("count(*)").getFieldData().get(0);
         System.out.printf("%d rows persisted\n", rowCount);
 
         // Construct a vector to search top5 similar records, return the book title for us.
@@ -160,11 +171,11 @@ public class SimpleExample {
         SearchResultsWrapper resultsWrapper = new SearchResultsWrapper(searchRet.getData().getResults());
         List<SearchResultsWrapper.IDScore> scores = resultsWrapper.getIDScore(0);
         System.out.println("The result of No.0 target vector:");
-        for (SearchResultsWrapper.IDScore score:scores) {
-            List<Float> vectorReturned = (List<Float>)score.get(VECTOR_FIELD);
+        for (SearchResultsWrapper.IDScore score : scores) {
+            List<Float> vectorReturned = (List<Float>) score.get(VECTOR_FIELD);
             System.out.println(vectorReturned);
 
-            String title = (String)score.get(TITLE_FIELD);
+            String title = (String) score.get(TITLE_FIELD);
             System.out.println(title);
         }
 

+ 1 - 0
examples/src/main/java/io/milvus/v1/UpsertExample.java

@@ -50,6 +50,7 @@ public class UpsertExample {
                 .build();
         client = new MilvusServiceClient(connectParam);
     }
+
     private static final String COLLECTION_NAME = "java_sdk_example_upsert_v1";
     private static final String ID_FIELD = "pk";
     private static final String VECTOR_FIELD = "vector";

+ 17 - 9
examples/src/main/java/io/milvus/v1/resourcegroup/NodeInfo.java

@@ -19,14 +19,10 @@
 
 package io.milvus.v1.resourcegroup;
 
-import lombok.Getter;
-import lombok.NonNull;
-
-@Getter
 public class NodeInfo {
-    private long nodeId;
-    private String address;
-    private String hostname;
+    private final long nodeId;
+    private final String address;
+    private final String hostname;
 
     private NodeInfo(Builder builder) {
         this.nodeId = builder.nodeId;
@@ -34,6 +30,18 @@ public class NodeInfo {
         this.hostname = builder.hostname;
     }
 
+    public long getNodeId() {
+        return nodeId;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public String getHostname() {
+        return hostname;
+    }
+
     public static Builder newBuilder() {
         return new Builder();
     }
@@ -48,12 +56,12 @@ public class NodeInfo {
             return this;
         }
 
-        public Builder withAddress(@NonNull String address) {
+        public Builder withAddress(String address) {
             this.address = address;
             return this;
         }
 
-        public Builder withHostname(@NonNull String hostname) {
+        public Builder withHostname(String hostname) {
             this.hostname = hostname;
             return this;
         }

+ 31 - 14
examples/src/main/java/io/milvus/v1/resourcegroup/ResourceGroupInfo.java

@@ -19,23 +19,20 @@
 
 package io.milvus.v1.resourcegroup;
 
+import io.milvus.common.resourcegroup.ResourceGroupConfig;
+
 import java.util.HashSet;
 import java.util.Set;
 
-import io.milvus.common.resourcegroup.ResourceGroupConfig;
-import lombok.Getter;
-import lombok.NonNull;
-
-@Getter
 public class ResourceGroupInfo {
     private String resourceGroupName;
     private ResourceGroupConfig resourceGroupConfig;
     private Set<String> fullDatabases; // databases belong to this resource group completely.
     private Set<String> partialDatabases; // databases belong to this resource group partially, some collection is in
-                                          // other resource group.
+    // other resource group.
     private Set<NodeInfo> nodes; // actual query node in this resource group.
 
-    private ResourceGroupInfo(@NonNull Builder builder) {
+    private ResourceGroupInfo(Builder builder) {
         this.resourceGroupName = builder.resourceGroupName;
         this.resourceGroupConfig = builder.resourceGroupConfig;
         this.fullDatabases = builder.fullDatabases;
@@ -52,6 +49,26 @@ public class ResourceGroupInfo {
         }
     }
 
+    public String getResourceGroupName() {
+        return resourceGroupName;
+    }
+
+    public ResourceGroupConfig getResourceGroupConfig() {
+        return resourceGroupConfig;
+    }
+
+    public Set<String> getFullDatabases() {
+        return fullDatabases;
+    }
+
+    public Set<String> getPartialDatabases() {
+        return partialDatabases;
+    }
+
+    public Set<NodeInfo> getNodes() {
+        return nodes;
+    }
+
     public static Builder newBuilder() {
         return new Builder();
     }
@@ -63,12 +80,12 @@ public class ResourceGroupInfo {
         private Set<String> partialDatabases;
         private Set<NodeInfo> nodes; // actual query node in this resource group.
 
-        public Builder withResourceGroupName(@NonNull String resourceGroupName) {
+        public Builder withResourceGroupName(String resourceGroupName) {
             this.resourceGroupName = resourceGroupName;
             return this;
         }
 
-        public Builder addFullDatabases(@NonNull String databaseName) {
+        public Builder addFullDatabases(String databaseName) {
             if (this.fullDatabases == null) {
                 this.fullDatabases = new HashSet<String>();
             }
@@ -76,7 +93,7 @@ public class ResourceGroupInfo {
             return this;
         }
 
-        public Builder addPartialDatabases(@NonNull String databaseName) {
+        public Builder addPartialDatabases(String databaseName) {
             if (this.partialDatabases == null) {
                 this.partialDatabases = new HashSet<String>();
             }
@@ -84,7 +101,7 @@ public class ResourceGroupInfo {
             return this;
         }
 
-        public Builder addAvailableNode(@NonNull NodeInfo node) {
+        public Builder addAvailableNode(NodeInfo node) {
             if (this.nodes == null) {
                 this.nodes = new HashSet<NodeInfo>();
             }
@@ -92,7 +109,7 @@ public class ResourceGroupInfo {
             return this;
         }
 
-        public Builder withConfig(@NonNull ResourceGroupConfig resourceGroupConfig) {
+        public Builder withConfig(ResourceGroupConfig resourceGroupConfig) {
             this.resourceGroupConfig = resourceGroupConfig;
             return this;
         }
@@ -104,7 +121,7 @@ public class ResourceGroupInfo {
 
     /**
      * Check if this resource group is the default resource group.
-     * 
+     *
      * @return true if this resource group is the default resource group.
      */
     public boolean isDefaultResourceGroup() {
@@ -113,7 +130,7 @@ public class ResourceGroupInfo {
 
     /**
      * Check if this resource group is the recycle resource group.
-     * 
+     *
      * @return true if this resource group is the recycle resource group.
      */
     public boolean isRecycleResourceGroup() {

+ 16 - 31
examples/src/main/java/io/milvus/v1/resourcegroup/ResourceGroupManagement.java

@@ -19,36 +19,21 @@
 
 package io.milvus.v1.resourcegroup;
 
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
-
 import io.milvus.client.MilvusClient;
+import io.milvus.common.resourcegroup.ResourceGroupConfig;
+import io.milvus.common.resourcegroup.ResourceGroupLimit;
+import io.milvus.common.resourcegroup.ResourceGroupTransfer;
+import io.milvus.exception.MilvusException;
+import io.milvus.grpc.*;
 import io.milvus.param.R;
 import io.milvus.param.RpcStatus;
 import io.milvus.param.collection.GetLoadStateParam;
 import io.milvus.param.collection.ShowCollectionsParam;
 import io.milvus.param.control.GetReplicasParam;
-import io.milvus.param.resourcegroup.CreateResourceGroupParam;
-import io.milvus.param.resourcegroup.DescribeResourceGroupParam;
-import io.milvus.param.resourcegroup.DropResourceGroupParam;
-import io.milvus.param.resourcegroup.ListResourceGroupsParam;
-import io.milvus.param.resourcegroup.TransferReplicaParam;
-import io.milvus.param.resourcegroup.UpdateResourceGroupsParam;
-import io.milvus.common.resourcegroup.ResourceGroupConfig;
-import io.milvus.common.resourcegroup.ResourceGroupLimit;
-import io.milvus.common.resourcegroup.ResourceGroupTransfer;
-import io.milvus.exception.MilvusException;
-import io.milvus.grpc.DescribeResourceGroupResponse;
-import io.milvus.grpc.GetLoadStateResponse;
-import io.milvus.grpc.GetReplicasResponse;
-import io.milvus.grpc.ListDatabasesResponse;
-import io.milvus.grpc.ListResourceGroupsResponse;
-import io.milvus.grpc.LoadState;
-import io.milvus.grpc.ShowCollectionsResponse;
+import io.milvus.param.resourcegroup.*;
+
+import java.util.*;
+import java.util.stream.Collectors;
 
 
 public class ResourceGroupManagement {
@@ -65,7 +50,7 @@ public class ResourceGroupManagement {
 
     /**
      * list all resource groups.
-     * 
+     *
      * @return map of resource group name and resource group info.
      */
     public Map<String, ResourceGroupInfo> listResourceGroups() throws Exception {
@@ -134,7 +119,7 @@ public class ResourceGroupManagement {
 
     /**
      * Initialize the cluster with a recycle resource group.
-     * 
+     *
      * @param defaultResourceGroupNodeNum The number of query nodes to initialize
      *                                    the default resource group.
      */
@@ -173,7 +158,7 @@ public class ResourceGroupManagement {
     /**
      * Drop a resource group, before drop resource group, you should scale the
      * resource group to 0 first.
-     * 
+     *
      * @param resourceGroupName
      */
     public void dropResourceGroup(String resourceGroupName) throws Exception {
@@ -184,7 +169,7 @@ public class ResourceGroupManagement {
 
     /**
      * Scale to the number of nodes in a resource group.
-     * 
+     *
      * @param resourceGroupName
      * @param requestNodeNum
      */
@@ -209,7 +194,7 @@ public class ResourceGroupManagement {
     /**
      * Transfer a database to specified resource group.
      * Only support single replica now.
-     * 
+     *
      * @param dbName            The name of the database to transfer.
      * @param resourceGroupName The name of the target resource group.
      */
@@ -238,7 +223,7 @@ public class ResourceGroupManagement {
 
     /**
      * get the resource group name of the collection.
-     * 
+     *
      * @param dbName
      * @param collection
      * @return
@@ -278,7 +263,7 @@ public class ResourceGroupManagement {
     }
 
     /**
-     * 
+     *
      * @param <T>
      * @param response
      * @return

+ 4 - 1
examples/src/main/java/io/milvus/v2/AddFieldExample.java

@@ -35,7 +35,9 @@ import io.milvus.v2.service.vector.request.InsertReq;
 import io.milvus.v2.service.vector.request.QueryReq;
 import io.milvus.v2.service.vector.response.QueryResp;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 
 public class AddFieldExample {
     private static final MilvusClientV2 client;
@@ -46,6 +48,7 @@ public class AddFieldExample {
                 .build();
         client = new MilvusClientV2(config);
     }
+
     private static final String COLLECTION_NAME = "java_sdk_example_add_field_v2";
     private static final String ID_FIELD = "id";
     private static final String VECTOR_FIELD = "vector";

+ 2 - 2
examples/src/main/java/io/milvus/v2/ArrayFieldExample.java

@@ -126,7 +126,7 @@ public class ArrayFieldExample {
             List<String> strArray = new ArrayList<>();
             int capacity = random.nextInt(5) + 5;
             for (int k = 0; k < capacity; k++) {
-                intArray.add((i+k)%100);
+                intArray.add((i + k) % 100);
                 strArray.add(String.format("string-%d-%d", i, k));
             }
             row.add("array_int32", JsonUtils.toJsonTree(intArray).getAsJsonArray());
@@ -145,7 +145,7 @@ public class ArrayFieldExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows in collection\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows in collection\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
 
         // Query by filtering expression
         queryWithExpr(client, "array_int32[0] == 99");

+ 6 - 6
examples/src/main/java/io/milvus/v2/BinaryVectorExample.java

@@ -74,8 +74,8 @@ public class BinaryVectorExample {
                 .build());
 
         List<IndexParam> indexes = new ArrayList<>();
-        Map<String,Object> extraParams = new HashMap<>();
-        extraParams.put("nlist",64);
+        Map<String, Object> extraParams = new HashMap<>();
+        extraParams.put("nlist", 64);
         indexes.add(IndexParam.builder()
                 .fieldName(VECTOR_FIELD)
                 .indexType(IndexParam.IndexType.BIN_IVF_FLAT)
@@ -117,7 +117,7 @@ public class BinaryVectorExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows persisted\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows persisted\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
 
         // Pick some vectors from the inserted vectors to search
         // Ensure the returned top1 item's ID should be equal to target vector's ID
@@ -127,8 +127,8 @@ public class BinaryVectorExample {
             ByteBuffer targetVector = vectors.get(k);
             System.out.printf("\nANN search for vector ID=%d:\n", k);
             CommonUtils.printBinaryVector(targetVector);
-            Map<String,Object> params = new HashMap<>();
-            params.put("nprobe",16);
+            Map<String, Object> params = new HashMap<>();
+            params.put("nprobe", 16);
             SearchResp searchResp = client.search(SearchReq.builder()
                     .collectionName(COLLECTION_NAME)
                     .data(Collections.singletonList(new BinaryVec(targetVector)))
@@ -150,7 +150,7 @@ public class BinaryVectorExample {
             }
 
             SearchResp.SearchResult firstResult = results.get(0);
-            if ((long)firstResult.getId() != k) {
+            if ((long) firstResult.getId() != k) {
                 throw new RuntimeException(String.format("The top1 ID %d is not equal to target vector's ID %d",
                         firstResult.getId(), k));
             }

+ 7 - 2
examples/src/main/java/io/milvus/v2/CDCExample.java

@@ -74,8 +74,13 @@ public class CDCExample {
                 .build();
 
         ReplicateConfiguration configuration = ReplicateConfiguration.builder()
-                .clusters(new ArrayList<MilvusCluster>(){{ add(milvusClusterA); add(milvusClusterB); }})
-                .crossClusterTopologies(new ArrayList<CrossClusterTopology>(){{ add(topology); }} )
+                .clusters(new ArrayList<MilvusCluster>() {{
+                    add(milvusClusterA);
+                    add(milvusClusterB);
+                }})
+                .crossClusterTopologies(new ArrayList<CrossClusterTopology>() {{
+                    add(topology);
+                }})
                 .build();
 
         UpdateReplicateConfigurationReq updateReq = UpdateReplicateConfigurationReq.builder()

+ 6 - 5
examples/src/main/java/io/milvus/v2/ClientPoolExample.java

@@ -57,6 +57,7 @@ public class ClientPoolExample {
         System.out.printf("Key '%s': %d idle clients and %d active clients%n",
                 key, pool.getIdleClientNumber(key), pool.getActiveClientNumber(key));
     }
+
     private static void printClientNumber(MilvusClientV2Pool pool) {
         System.out.println("======================================================================");
         System.out.printf("Total %d idle clients and %d active clients%n",
@@ -137,7 +138,7 @@ public class ClientPoolExample {
             Gson gson = new Gson();
             for (int i = 0; i < repeatRequests; i++) {
                 MilvusClientV2 client = null;
-                while(client == null) {
+                while (client == null) {
                     try {
                         // getClient() might exceeds the borrowMaxWaitMillis and throw exception
                         // retry to call until it return a client
@@ -176,7 +177,7 @@ public class ClientPoolExample {
         Thread t = new Thread(() -> {
             for (int i = 0; i < repeatRequests; i++) {
                 MilvusClientV2 client = null;
-                while(client == null) {
+                while (client == null) {
                     try {
                         // getClient() might exceeds the borrowMaxWaitMillis and throw exception
                         // retry to call until it return a client
@@ -222,7 +223,7 @@ public class ClientPoolExample {
                         .outputFields(Collections.singletonList("count(*)"))
                         .consistencyLevel(ConsistencyLevel.STRONG)
                         .build());
-                long rowCount = (long)countR.getQueryResults().get(0).getEntity().get("count(*)");
+                long rowCount = (long) countR.getQueryResults().get(0).getEntity().get("count(*)");
                 System.out.printf("%d rows persisted in collection '%s' of database '%s'%n",
                         rowCount, CollectionName, dbName);
                 if (rowCount != expectedCount) {
@@ -331,7 +332,7 @@ public class ClientPoolExample {
         printClientNumber(pool);
 
         // check row count of each collection, there are threadCount*repeatRequests rows were inserted by multiple threads
-        verifyRowCount(pool, threadCount*repeatRequests);
+        verifyRowCount(pool, threadCount * repeatRequests);
         // drop collections
         dropCollections(pool);
         // drop databases, only after database is empty, it is able to be dropped
@@ -339,7 +340,7 @@ public class ClientPoolExample {
 
         long end = System.currentTimeMillis();
         System.out.printf("%d insert requests and %d search requests finished in %.3f seconds%n",
-                threadCount*repeatRequests*3, threadCount*repeatRequests*3, (end-start)*0.001);
+                threadCount * repeatRequests * 3, threadCount * repeatRequests * 3, (end - start) * 0.001);
 
         printClientNumber(pool);
         pool.clear(); // clear idle clients

+ 3 - 3
examples/src/main/java/io/milvus/v2/ConsistencyLevelExample.java

@@ -146,7 +146,7 @@ public class ConsistencyLevelExample {
             row.add("vector", gson.toJsonTree(vector));
 
             // insert by a MilvusClient
-            String clientName1 = String.format("client_%d", i%10);
+            String clientName1 = String.format("client_%d", i % 10);
             MilvusClientV2 client1 = pool.getClient(clientName1);
             client1.insert(InsertReq.builder()
                     .collectionName(collectionName)
@@ -157,7 +157,7 @@ public class ConsistencyLevelExample {
 
             // search by another MilvusClient, use the just inserted vector to search
             // the returned item is expected to be the just inserted item
-            String clientName2 = String.format("client_%d", i%10+1);
+            String clientName2 = String.format("client_%d", i % 10 + 1);
             MilvusClientV2 client2 = pool.getClient(clientName2);
             SearchResp searchR = client2.search(SearchReq.builder()
                     .collectionName(collectionName)
@@ -170,7 +170,7 @@ public class ConsistencyLevelExample {
             if (results.size() != 1) {
                 throw new RuntimeException("Search result is empty");
             }
-            if (i != (Long)results.get(0).getId()) {
+            if (i != (Long) results.get(0).getId()) {
                 throw new RuntimeException("The just inserted entity is not found");
             }
             System.out.println("search");

+ 2 - 1
examples/src/main/java/io/milvus/v2/Float16VectorExample.java

@@ -52,6 +52,7 @@ public class Float16VectorExample {
     private static final Integer VECTOR_DIM = 128;
 
     private static final MilvusClientV2 client;
+
     static {
         client = new MilvusClientV2(ConnectConfig.builder()
                 .uri("http://localhost:19530")
@@ -162,7 +163,7 @@ public class Float16VectorExample {
             }
             Map<String, Object> entity = topResult.getEntity();
             ByteBuffer vectorBuf = (ByteBuffer) entity.get(vectorFieldName);
-            ByteBuffer targetVectorBuf = (ByteBuffer)targetVectors.get(i).getData();
+            ByteBuffer targetVectorBuf = (ByteBuffer) targetVectors.get(i).getData();
             if (!vectorBuf.equals(targetVectorBuf)) {
                 throw new RuntimeException("The top1 output vector is incorrect");
             }

+ 6 - 3
examples/src/main/java/io/milvus/v2/FullTextSearchExample.java

@@ -29,8 +29,8 @@ import io.milvus.v2.common.DataType;
 import io.milvus.v2.common.IndexParam;
 import io.milvus.v2.service.collection.request.AddFieldReq;
 import io.milvus.v2.service.collection.request.CreateCollectionReq;
-import io.milvus.v2.service.collection.request.DropCollectionReq;
 import io.milvus.v2.service.collection.request.CreateCollectionReq.Function;
+import io.milvus.v2.service.collection.request.DropCollectionReq;
 import io.milvus.v2.service.vector.request.InsertReq;
 import io.milvus.v2.service.vector.request.QueryReq;
 import io.milvus.v2.service.vector.request.SearchReq;
@@ -38,7 +38,10 @@ import io.milvus.v2.service.vector.request.data.EmbeddedText;
 import io.milvus.v2.service.vector.response.QueryResp;
 import io.milvus.v2.service.vector.response.SearchResp;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
 public class FullTextSearchExample {
     private static final String COLLECTION_NAME = "java_sdk_example_text_match_v2";
@@ -146,7 +149,7 @@ public class FullTextSearchExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows in collection\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows in collection\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
 
         // Query by filtering expression
         searchByText(client, "moon and earth distance");

+ 7 - 16
examples/src/main/java/io/milvus/v2/GeneralExample.java

@@ -27,12 +27,7 @@ import io.milvus.v2.client.MilvusClientV2;
 import io.milvus.v2.common.ConsistencyLevel;
 import io.milvus.v2.common.DataType;
 import io.milvus.v2.common.IndexParam;
-import io.milvus.v2.service.collection.request.AddFieldReq;
-import io.milvus.v2.service.collection.request.CreateCollectionReq;
-import io.milvus.v2.service.collection.request.DescribeCollectionReq;
-import io.milvus.v2.service.collection.request.DropCollectionReq;
-import io.milvus.v2.service.collection.request.LoadCollectionReq;
-import io.milvus.v2.service.collection.request.ReleaseCollectionReq;
+import io.milvus.v2.service.collection.request.*;
 import io.milvus.v2.service.collection.response.DescribeCollectionResp;
 import io.milvus.v2.service.collection.response.ListCollectionsResp;
 import io.milvus.v2.service.partition.request.CreatePartitionReq;
@@ -44,15 +39,11 @@ import io.milvus.v2.service.vector.request.data.FloatVec;
 import io.milvus.v2.service.vector.response.InsertResp;
 import io.milvus.v2.service.vector.response.SearchResp;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
+import java.util.*;
 
 public class GeneralExample {
     private static final MilvusClientV2 client;
+
     static {
         client = new MilvusClientV2(ConnectConfig.builder()
                 .uri("http://localhost:19530")
@@ -96,8 +87,8 @@ public class GeneralExample {
                 .build());
 
         List<IndexParam> indexes = new ArrayList<>();
-        Map<String,Object> extraParams = new HashMap<>();
-        extraParams.put("nlist",128);
+        Map<String, Object> extraParams = new HashMap<>();
+        extraParams.put("nlist", 128);
         indexes.add(IndexParam.builder()
                 .fieldName(VECTOR_FIELD)
                 .indexName(INDEX_NAME)
@@ -193,8 +184,8 @@ public class GeneralExample {
         }
 
         long begin = System.currentTimeMillis();
-        Map<String,Object> params = new HashMap<>();
-        params.put("nprobe",10);
+        Map<String, Object> params = new HashMap<>();
+        params.put("nprobe", 10);
         SearchResp resp = client.search(SearchReq.builder()
                 .collectionName(COLLECTION_NAME)
                 .limit(SEARCH_K)

+ 5 - 2
examples/src/main/java/io/milvus/v2/GeometryExample.java

@@ -36,10 +36,13 @@ import io.milvus.v2.service.vector.request.InsertReq;
 import io.milvus.v2.service.vector.request.QueryReq;
 import io.milvus.v2.service.vector.response.QueryResp;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 
 public class GeometryExample {
     private static final MilvusClientV2 client;
+
     static {
         client = new MilvusClientV2(ConnectConfig.builder()
                 .uri("http://localhost:19530")
@@ -120,7 +123,7 @@ public class GeometryExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows persisted\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows persisted\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
     }
 
     private static void query(String filter) {

+ 10 - 14
examples/src/main/java/io/milvus/v2/HybridSearchExample.java

@@ -21,20 +21,16 @@ package io.milvus.v2;
 
 import com.google.gson.Gson;
 import com.google.gson.JsonObject;
-import io.milvus.v2.common.DataType;
 import io.milvus.v1.CommonUtils;
 import io.milvus.v2.client.ConnectConfig;
 import io.milvus.v2.client.MilvusClientV2;
 import io.milvus.v2.common.ConsistencyLevel;
+import io.milvus.v2.common.DataType;
 import io.milvus.v2.common.IndexParam;
 import io.milvus.v2.service.collection.request.AddFieldReq;
 import io.milvus.v2.service.collection.request.CreateCollectionReq;
 import io.milvus.v2.service.collection.request.DropCollectionReq;
-import io.milvus.v2.service.vector.request.AnnSearchReq;
-import io.milvus.v2.service.vector.request.FunctionScore;
-import io.milvus.v2.service.vector.request.HybridSearchReq;
-import io.milvus.v2.service.vector.request.InsertReq;
-import io.milvus.v2.service.vector.request.QueryReq;
+import io.milvus.v2.service.vector.request.*;
 import io.milvus.v2.service.vector.request.data.BaseVector;
 import io.milvus.v2.service.vector.request.data.BinaryVec;
 import io.milvus.v2.service.vector.request.data.FloatVec;
@@ -107,10 +103,10 @@ public class HybridSearchExample {
                 .build());
 
         List<IndexParam> indexes = new ArrayList<>();
-        Map<String,Object> fvParams = new HashMap<>();
-        fvParams.put("nlist",128);
-        fvParams.put("m",16);
-        fvParams.put("nbits",8);
+        Map<String, Object> fvParams = new HashMap<>();
+        fvParams.put("nlist", 128);
+        fvParams.put("m", 16);
+        fvParams.put("nbits", 8);
         indexes.add(IndexParam.builder()
                 .fieldName(FLOAT_VECTOR_FIELD)
                 .indexType(IndexParam.IndexType.IVF_PQ)
@@ -122,9 +118,9 @@ public class HybridSearchExample {
                 .indexType(IndexParam.IndexType.BIN_FLAT)
                 .metricType(BINARY_VECTOR_METRIC)
                 .build());
-        Map<String,Object> fv16Params = new HashMap<>();
-        fv16Params.put("M",16);
-        fv16Params.put("efConstruction",64);
+        Map<String, Object> fv16Params = new HashMap<>();
+        fv16Params.put("M", 16);
+        fv16Params.put("efConstruction", 64);
         indexes.add(IndexParam.builder()
                 .fieldName(FLOAT16_VECTOR_FIELD)
                 .indexType(IndexParam.IndexType.HNSW)
@@ -177,7 +173,7 @@ public class HybridSearchExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows persisted\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows persisted\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
     }
 
     private static void hybridSearch() {

+ 5 - 7
examples/src/main/java/io/milvus/v2/Int8VectorExample.java

@@ -21,7 +21,6 @@ package io.milvus.v2;
 
 import com.google.gson.Gson;
 import com.google.gson.JsonObject;
-import io.milvus.v1.CommonUtils;
 import io.milvus.v2.client.ConnectConfig;
 import io.milvus.v2.client.MilvusClientV2;
 import io.milvus.v2.common.ConsistencyLevel;
@@ -33,7 +32,6 @@ import io.milvus.v2.service.collection.request.DropCollectionReq;
 import io.milvus.v2.service.vector.request.InsertReq;
 import io.milvus.v2.service.vector.request.QueryReq;
 import io.milvus.v2.service.vector.request.SearchReq;
-import io.milvus.v2.service.vector.request.data.BinaryVec;
 import io.milvus.v2.service.vector.request.data.Int8Vec;
 import io.milvus.v2.service.vector.response.QueryResp;
 import io.milvus.v2.service.vector.response.SearchResp;
@@ -89,7 +87,7 @@ public class Int8VectorExample {
                 .build());
 
         List<IndexParam> indexes = new ArrayList<>();
-        Map<String,Object> extraParams = new HashMap<>();
+        Map<String, Object> extraParams = new HashMap<>();
         extraParams.put("M", 64);
         extraParams.put("efConstruction", 200);
         indexes.add(IndexParam.builder()
@@ -116,7 +114,7 @@ public class Int8VectorExample {
         for (long i = 0L; i < rowCount; ++i) {
             JsonObject row = new JsonObject();
             row.addProperty(ID_FIELD, i);
-            ByteBuffer vector = vectors.get((int)i);
+            ByteBuffer vector = vectors.get((int) i);
             row.add(VECTOR_FIELD, gson.toJsonTree(vector.array()));
             rows.add(row);
         }
@@ -132,7 +130,7 @@ public class Int8VectorExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows persisted\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows persisted\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
 
         // Pick some vectors from the inserted vectors to search
         // Ensure the returned top1 item's ID should be equal to target vector's ID
@@ -160,9 +158,9 @@ public class Int8VectorExample {
             }
 
             SearchResp.SearchResult firstResult = results.get(0);
-            if ((long)firstResult.getId() != k) {
+            if ((long) firstResult.getId() != k) {
                 throw new RuntimeException(String.format("The top1 ID %d is not equal to target vector's ID %d",
-                        (long)firstResult.getId(), k));
+                        (long) firstResult.getId(), k));
             }
         }
         System.out.println("Search result is correct");

+ 10 - 8
examples/src/main/java/io/milvus/v2/IteratorExample.java

@@ -47,11 +47,13 @@ import java.util.function.Function;
 
 public class IteratorExample {
     private static final MilvusClientV2 client;
+
     static {
         client = new MilvusClientV2(ConnectConfig.builder()
                 .uri("http://localhost:19530")
                 .build());
     }
+
     private static final String COLLECTION_NAME = "java_sdk_example_iterator_v2";
     private static final String ID_FIELD = "userID";
     private static final String AGE_FIELD = "userAge";
@@ -200,7 +202,7 @@ public class IteratorExample {
                                          Function<List<SearchResp.SearchResult>, List<SearchResp.SearchResult>> externalFilterFunc) {
         System.out.println("\n========== searchIteratorV2() ==========");
         System.out.println(String.format("expr='%s', params='%s', batchSize=%d, topK=%d",
-                filter, params==null ? "" : params.toString(), batchSize, topK));
+                filter, params == null ? "" : params.toString(), batchSize, topK));
         SearchIteratorV2 searchIterator = client.searchIteratorV2(SearchIteratorReqV2.builder()
                 .collectionName(COLLECTION_NAME)
                 .outputFields(Lists.newArrayList(AGE_FIELD))
@@ -208,7 +210,7 @@ public class IteratorExample {
                 .vectorFieldName(VECTOR_FIELD)
                 .vectors(Collections.singletonList(new FloatVec(CommonUtils.generateFloatVector(VECTOR_DIM))))
                 .filter(filter)
-                .searchParams(params==null ? new HashMap<>() : params)
+                .searchParams(params == null ? new HashMap<>() : params)
                 .limit(topK)
                 .metricType(IndexParam.MetricType.L2)
                 .consistencyLevel(ConsistencyLevel.BOUNDED)
@@ -235,21 +237,21 @@ public class IteratorExample {
 
     public static void main(String[] args) {
         buildCollection();
-        queryIterator("userID < 300",50, 5,400);
+        queryIterator("userID < 300", 50, 5, 400);
         searchIteratorV1("userAge > 50 &&userAge < 100", "{\"range_filter\": 15.0, \"radius\": 20.0}", 100, 500);
         searchIteratorV1("", "", 10, 99);
         searchIteratorV2("userAge > 10 &&userAge < 20", null, 50, 120, null);
 
-        Map<String,Object> extraParams = new HashMap<>();
-        extraParams.put("radius",15.0);
+        Map<String, Object> extraParams = new HashMap<>();
+        extraParams.put("radius", 15.0);
         searchIteratorV2("", extraParams, 50, 100, null);
 
         // use external function to filter the result
-        Function<List<SearchResp.SearchResult>, List<SearchResp.SearchResult>> externalFilterFunc = (List<SearchResp.SearchResult> src)->{
+        Function<List<SearchResp.SearchResult>, List<SearchResp.SearchResult>> externalFilterFunc = (List<SearchResp.SearchResult> src) -> {
             List<SearchResp.SearchResult> newRes = new ArrayList<>();
             for (SearchResp.SearchResult res : src) {
-                long id = (long)res.getId();
-                if (id%2 == 0) {
+                long id = (long) res.getId();
+                if (id % 2 == 0) {
                     newRes.add(res);
                 }
             }

+ 9 - 9
examples/src/main/java/io/milvus/v2/JsonFieldExample.java

@@ -101,7 +101,7 @@ public class JsonFieldExample {
         // Create INVERTED index for a specific entry of JSON field
         // Index for JSON field is supported from milvus v2.5.7 and fully supported in v2.5.13+
         // Read the doc for more info: https://milvus.io/docs/json-indexing.md
-        Map<String,Object> p1 = new HashMap<>();
+        Map<String, Object> p1 = new HashMap<>();
         p1.put("json_path", "metadata[\"flags\"]");
         p1.put("json_cast_type", "array_double");
         indexes.add(IndexParam.builder()
@@ -113,8 +113,8 @@ public class JsonFieldExample {
         // Create NGRAM index for a specific entry of JSON field
         // NGRAM index for JSON field is supported from milvus v2.6.2
         // Read the doc for more info: https://milvus.io/docs/ngram.md
-        Map<String,Object> p2 = new HashMap<>();
-        p2.put("json_path","metadata[\"path\"]");
+        Map<String, Object> p2 = new HashMap<>();
+        p2.put("json_path", "metadata[\"path\"]");
         p2.put("json_cast_type", "varchar");
         p2.put("min_gram", 3);
         p2.put("max_gram", 5);
@@ -149,7 +149,7 @@ public class JsonFieldExample {
             JsonObject metadata = new JsonObject();
             metadata.addProperty("path", String.format("\\root/abc_%d/path_%d", i, i));
             metadata.addProperty("size", i);
-            if (i%7 == 0) {
+            if (i % 7 == 0) {
                 metadata.addProperty("special", true);
             }
             metadata.add("flags", gson.toJsonTree(Arrays.asList(i, i + 1, i + 2)));
@@ -158,8 +158,8 @@ public class JsonFieldExample {
 //            System.out.println(metadata);
 
             // dynamic fields
-            if (i%2 == 0) {
-                row.addProperty("dynamic1", (double)i/3);
+            if (i % 2 == 0) {
+                row.addProperty("dynamic1", (double) i / 3);
             } else {
                 row.addProperty("dynamic2", "ok");
             }
@@ -176,7 +176,7 @@ public class JsonFieldExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows persisted\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows persisted\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
 
         // Search and output JSON field
         List<BaseVector> searchVectors = new ArrayList<>();
@@ -203,7 +203,7 @@ public class JsonFieldExample {
                 System.out.println(result);
             }
 
-            long pk = (long)results.get(0).getId();
+            long pk = (long) results.get(0).getId();
             if (pk != i) {
                 throw new RuntimeException(String.format("The top1 ID %d is not equal to target vector's ID %d", pk, i));
             }
@@ -213,7 +213,7 @@ public class JsonFieldExample {
                         metadata, expectedMetadatas.get(i)));
             }
             List<Float> vector = (List<Float>) results.get(0).getEntity().get(VECTOR_FIELD);
-            CommonUtils.compareFloatVectors(vector, (List<Float>)searchVectors.get(i).getData());
+            CommonUtils.compareFloatVectors(vector, (List<Float>) searchVectors.get(i).getData());
         }
 
         // Query by filtering JSON

+ 6 - 3
examples/src/main/java/io/milvus/v2/NullAndDefaultExample.java

@@ -35,7 +35,10 @@ import io.milvus.v2.service.vector.request.InsertReq;
 import io.milvus.v2.service.vector.request.QueryReq;
 import io.milvus.v2.service.vector.response.QueryResp;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
 public class NullAndDefaultExample {
     private static final String COLLECTION_NAME = "java_sdk_example_nullable_v2";
@@ -144,7 +147,7 @@ public class NullAndDefaultExample {
             }
 
             // some values are default value
-            if (i%3==0) {
+            if (i % 3 == 0) {
                 row.addProperty("default_test", 1.0);
             }
 
@@ -172,7 +175,7 @@ public class NullAndDefaultExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows in collection\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows in collection\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
 
         // Query by filtering expression
         queryWithExpr(client, "id >= 0"); // show all items

+ 6 - 2
examples/src/main/java/io/milvus/v2/RankerExample.java

@@ -39,7 +39,10 @@ import io.milvus.v2.service.vector.request.ranker.DecayRanker;
 import io.milvus.v2.service.vector.response.QueryResp;
 import io.milvus.v2.service.vector.response.SearchResp;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
 public class RankerExample {
     private static final MilvusClientV2 client;
@@ -61,6 +64,7 @@ public class RankerExample {
         public String name;
         public int fromYear;
         public int toYear;
+
         public Person(String name, int from, int to) {
             this.name = name;
             this.fromYear = from;
@@ -186,7 +190,7 @@ public class RankerExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows persisted\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows persisted\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
     }
 
     private static void dropCollection() {

+ 16 - 8
examples/src/main/java/io/milvus/v2/SimpleExample.java

@@ -19,14 +19,22 @@
 
 package io.milvus.v2;
 
-import com.google.gson.*;
-import io.milvus.v2.client.*;
+import com.google.gson.Gson;
+import com.google.gson.JsonObject;
+import io.milvus.v2.client.ConnectConfig;
+import io.milvus.v2.client.MilvusClientV2;
 import io.milvus.v2.common.ConsistencyLevel;
 import io.milvus.v2.service.collection.request.CreateCollectionReq;
 import io.milvus.v2.service.collection.request.DropCollectionReq;
-import io.milvus.v2.service.vector.request.*;
+import io.milvus.v2.service.vector.request.GetReq;
+import io.milvus.v2.service.vector.request.InsertReq;
+import io.milvus.v2.service.vector.request.QueryReq;
+import io.milvus.v2.service.vector.request.SearchReq;
 import io.milvus.v2.service.vector.request.data.FloatVec;
-import io.milvus.v2.service.vector.response.*;
+import io.milvus.v2.service.vector.response.GetResp;
+import io.milvus.v2.service.vector.response.InsertResp;
+import io.milvus.v2.service.vector.response.QueryResp;
+import io.milvus.v2.service.vector.response.SearchResp;
 
 import java.util.*;
 
@@ -57,7 +65,7 @@ public class SimpleExample {
         for (int i = 0; i < 100; i++) {
             JsonObject row = new JsonObject();
             row.addProperty("id", i);
-            row.add("vector", gson.toJsonTree(new float[]{i, (float) i /2, (float) i /3, (float) i /4}));
+            row.add("vector", gson.toJsonTree(new float[]{i, (float) i / 2, (float) i / 3, (float) i / 4}));
             row.addProperty(String.format("dynamic_%d", i), "this is dynamic value"); // this value is stored in dynamic field
             rows.add(row);
         }
@@ -73,7 +81,7 @@ public class SimpleExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows persisted\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows persisted\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
 
         // Retrieve
         List<Object> ids = Arrays.asList(1L, 50L);
@@ -99,7 +107,7 @@ public class SimpleExample {
         System.out.println("\nSearch results:");
         for (List<SearchResp.SearchResult> results : searchResults) {
             for (SearchResp.SearchResult result : results) {
-                System.out.printf("ID: %d, Score: %f, %s\n", (long)result.getId(), result.getScore(), result.getEntity().toString());
+                System.out.printf("ID: %d, Score: %f, %s\n", (long) result.getId(), result.getScore(), result.getEntity().toString());
             }
         }
 
@@ -128,7 +136,7 @@ public class SimpleExample {
             System.out.println("\nSearch with template results:");
             for (List<SearchResp.SearchResult> results : searchResults2) {
                 for (SearchResp.SearchResult result : results) {
-                    System.out.printf("ID: %d, Score: %f, %s\n", (long)result.getId(), result.getScore(), result.getEntity().toString());
+                    System.out.printf("ID: %d, Score: %f, %s\n", (long) result.getId(), result.getScore(), result.getEntity().toString());
                 }
             }
         });

+ 4 - 4
examples/src/main/java/io/milvus/v2/SparseVectorExample.java

@@ -110,7 +110,7 @@ public class SparseVectorExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows persisted\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows persisted\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
 
         // Pick some vectors from the inserted vectors to search
         // Ensure the returned top1 item's ID should be equal to target vector's ID
@@ -119,8 +119,8 @@ public class SparseVectorExample {
             int k = ran.nextInt(rowCount);
             SortedMap<Long, Float> targetVector = vectors.get(k);
             System.out.println("\nTarget vector: " + targetVector);
-            Map<String,Object> params = new HashMap<>();
-            params.put("drop_ratio_search",0.2);
+            Map<String, Object> params = new HashMap<>();
+            params.put("drop_ratio_search", 0.2);
             SearchResp searchResp = client.search(SearchReq.builder()
                     .collectionName(COLLECTION_NAME)
                     .data(Collections.singletonList(new SparseFloatVec(targetVector)))
@@ -140,7 +140,7 @@ public class SparseVectorExample {
             }
 
             SearchResp.SearchResult firstResult = results.get(0);
-            if ((long)firstResult.getId() != k) {
+            if ((long) firstResult.getId() != k) {
                 throw new RuntimeException(String.format("The top1 ID %d is not equal to target vector's ID %d",
                         firstResult.getId(), k));
             }

+ 1 - 0
examples/src/main/java/io/milvus/v2/StageFileManagerExample.java

@@ -31,6 +31,7 @@ import io.milvus.bulkwriter.request.stage.UploadFilesRequest;
  */
 public class StageFileManagerExample {
     private static final StageFileManager stageFileManager;
+
     static {
         StageFileManagerParam stageFileManagerParam = StageFileManagerParam.newBuilder()
                 .withCloudEndpoint("https://api.cloud.zilliz.com")

+ 1 - 0
examples/src/main/java/io/milvus/v2/StageManagerExample.java

@@ -32,6 +32,7 @@ import io.milvus.bulkwriter.response.stage.ListStagesResponse;
  */
 public class StageManagerExample {
     private static final StageManager stageManager;
+
     static {
         StageManagerParam stageManagerParam = StageManagerParam.newBuilder()
                 .withCloudEndpoint("https://api.cloud.zilliz.com")

+ 5 - 3
examples/src/main/java/io/milvus/v2/StructExample.java

@@ -47,6 +47,7 @@ import java.util.*;
 
 public class StructExample {
     private static final MilvusClientV2 client;
+
     static {
         client = new MilvusClientV2(ConnectConfig.builder()
                 .uri("http://localhost:19530")
@@ -184,9 +185,10 @@ public class StructExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows persisted\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows persisted\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
 
     }
+
     private static List<QueryResp.QueryResult> query(String filter) {
         System.out.println("===================================================");
         System.out.println("Query with filter expression: " + filter);
@@ -244,10 +246,10 @@ public class StructExample {
             // in the insertData() method, we inserted 5 structures for each row
             // in query results, each struct is represented as a Map
             Map<String, Object> fetchedEntity = result.getEntity();
-            List<Map<String, Object>> structs = (List<Map<String, Object>>)fetchedEntity.get(STRUCT_FIELD);
+            List<Map<String, Object>> structs = (List<Map<String, Object>>) fetchedEntity.get(STRUCT_FIELD);
             EmbeddingList embList = new EmbeddingList();
             for (Map<String, Object> struct : structs) {
-                List<Float> vector = (List<Float>)struct.get(CLIP_VECTOR_FIELD);
+                List<Float> vector = (List<Float>) struct.get(CLIP_VECTOR_FIELD);
                 embList.add(new FloatVec(vector));
             }
             search(CLIP_VECTOR_FIELD, Collections.singletonList(embList));

+ 2 - 2
examples/src/main/java/io/milvus/v2/TextMatchExample.java

@@ -73,7 +73,7 @@ public class TextMatchExample {
         List<List<SearchResp.SearchResult>> searchResults = searchResp.getSearchResults();
         for (List<SearchResp.SearchResult> results : searchResults) {
             for (SearchResp.SearchResult result : results) {
-                System.out.printf("ID: %d, Score: %f, %s\n", (long)result.getId(), result.getScore(), result.getEntity().toString());
+                System.out.printf("ID: %d, Score: %f, %s\n", (long) result.getId(), result.getScore(), result.getEntity().toString());
             }
         }
         System.out.println("=============================================================");
@@ -162,7 +162,7 @@ public class TextMatchExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        System.out.printf("%d rows in collection\n", (long)countR.getQueryResults().get(0).getEntity().get("count(*)"));
+        System.out.printf("%d rows in collection\n", (long) countR.getQueryResults().get(0).getEntity().get("count(*)"));
 
         // TEXT_MATCH requires the data is persisted
         client.flush(FlushReq.builder().collectionNames(Collections.singletonList(COLLECTION_NAME)).build());

+ 4 - 3
examples/src/main/java/io/milvus/v2/UpsertExample.java

@@ -41,6 +41,7 @@ import java.util.*;
 
 public class UpsertExample {
     private static final MilvusClientV2 client;
+
     static {
         client = new MilvusClientV2(ConnectConfig.builder()
                 .uri("http://localhost:19530")
@@ -159,7 +160,7 @@ public class UpsertExample {
         // Upsert, update all fields value
         // If autoID is true, the server will return a new primary key for the updated entity
         JsonObject row = new JsonObject();
-        row.addProperty(ID_FIELD, (Long)id); // primary key must be input so that it can know which entity to be updated
+        row.addProperty(ID_FIELD, (Long) id); // primary key must be input so that it can know which entity to be updated
         List<Float> vectorUpdated = Arrays.asList(1.0f, 1.0f, 1.0f, 1.0f);
         row.add(VECTOR_FIELD, gson.toJsonTree(vectorUpdated));
         String textUpdated = "this field has been updated";
@@ -285,7 +286,7 @@ public class UpsertExample {
                 if (entity.get(NULLABLE_FIELD) != null) {
                     throw new RuntimeException("Nullable field is not correctly updated for filter: " + filter);
                 }
-                JsonObject newJson = (JsonObject)entity.get(JSON_FIELD);
+                JsonObject newJson = (JsonObject) entity.get(JSON_FIELD);
                 if (!newJson.has("updated") && !newJson.get("updated").equals("yes")) {
                     throw new RuntimeException("JSON field is not correctly updated for filter: " + filter);
                 }
@@ -312,7 +313,7 @@ public class UpsertExample {
         List<Object> ids = createCollection(autoID);
 
         // Update the entire row of the No.2 entity
-        fullUpsert((Long)ids.get(1));
+        fullUpsert((Long) ids.get(1));
 
         // Partially update the vectors of No.5 and No.6 entities
         partialUpsert(ids.subList(4, 6), true);

+ 1 - 1
examples/src/main/java/io/milvus/v2/bulkwriter/BulkWriterLocalExample.java

@@ -231,7 +231,7 @@ public class BulkWriterLocalExample {
 
     /**
      * @param collectionSchema collection info
-     * @param dropIfExist     if collection already exist, will drop firstly and then create again
+     * @param dropIfExist      if collection already exist, will drop firstly and then create again
      */
     private static void createCollection(String collectionName, CreateCollectionReq.CollectionSchema collectionSchema, boolean dropIfExist) {
         System.out.println("\n===================== create collection ====================");

+ 22 - 33
examples/src/main/java/io/milvus/v2/bulkwriter/BulkWriterRemoteExample.java

@@ -47,12 +47,7 @@ import io.milvus.v2.client.MilvusClientV2;
 import io.milvus.v2.common.ConsistencyLevel;
 import io.milvus.v2.common.DataType;
 import io.milvus.v2.common.IndexParam;
-import io.milvus.v2.service.collection.request.AddFieldReq;
-import io.milvus.v2.service.collection.request.CreateCollectionReq;
-import io.milvus.v2.service.collection.request.DropCollectionReq;
-import io.milvus.v2.service.collection.request.HasCollectionReq;
-import io.milvus.v2.service.collection.request.LoadCollectionReq;
-import io.milvus.v2.service.collection.request.RefreshLoadReq;
+import io.milvus.v2.service.collection.request.*;
 import io.milvus.v2.service.index.request.CreateIndexReq;
 import io.milvus.v2.service.vector.request.QueryReq;
 import io.milvus.v2.service.vector.response.QueryResp;
@@ -61,13 +56,7 @@ import java.io.File;
 import java.io.IOException;
 import java.net.URL;
 import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.concurrent.TimeUnit;
 
 
@@ -243,13 +232,13 @@ public class BulkWriterRemoteExample {
         for (int i = 0; i < count; ++i) {
             Map<String, Object> row = new HashMap<>();
             // scalar field
-            row.put("id", (long)i);
+            row.put("id", (long) i);
             row.put("bool", i % 5 == 0);
             row.put("int8", i % 128);
             row.put("int16", i % 1000);
             row.put("int32", i % 100000);
-            row.put("float", (float)i / 3);
-            row.put("double", (double)i / 7);
+            row.put("float", (float) i / 3);
+            row.put("double", (double) i / 7);
             row.put("varchar", "varchar_" + i);
             row.put("json", String.format("{\"dummy\": %s, \"ok\": \"name_%s\"}", i, i));
 
@@ -275,7 +264,7 @@ public class BulkWriterRemoteExample {
         {
             Map<String, Object> row = new HashMap<>();
             // scalar field
-            row.put("id", (long)data.size());
+            row.put("id", (long) data.size());
             row.put("bool", null);
             row.put("int8", null);
             row.put("int16", 16);
@@ -312,7 +301,7 @@ public class BulkWriterRemoteExample {
             JsonObject rowObject = new JsonObject();
 
             // scalar field
-            rowObject.addProperty("id", (Number)row.get("id"));
+            rowObject.addProperty("id", (Number) row.get("id"));
             if (row.get("bool") != null) { // nullable value can be missed
                 rowObject.addProperty("bool", (Boolean) row.get("bool"));
             }
@@ -328,7 +317,7 @@ public class BulkWriterRemoteExample {
             // Note: for JSON field, use gson.fromJson() to construct a real JsonObject
             // don't use rowObject.addProperty("json", jsonContent) since the value is treated as a string, not a JsonObject
             Object jsonContent = row.get("json");
-            rowObject.add("json", jsonContent == null ? null : GSON_INSTANCE.fromJson((String)jsonContent, JsonElement.class));
+            rowObject.add("json", jsonContent == null ? null : GSON_INSTANCE.fromJson((String) jsonContent, JsonElement.class));
 
             // vector field
             rowObject.add("float_vector", GSON_INSTANCE.toJsonTree(row.get("float_vector")));
@@ -488,7 +477,7 @@ public class BulkWriterRemoteExample {
 
     /**
      * @param collectionSchema collection info
-     * @param dropIfExist     if collection already exist, will drop firstly and then create again
+     * @param dropIfExist      if collection already exist, will drop firstly and then create again
      */
     private static void createCollection(String collectionName, CreateCollectionReq.CollectionSchema collectionSchema, boolean dropIfExist) {
         System.out.println("\n===================== create collection ====================");
@@ -523,7 +512,7 @@ public class BulkWriterRemoteExample {
                 expectedValue = field.getDefaultValue();
                 // for Int8/Int16 value, the default value is Short type, the returned value is Integer type
                 if (expectedValue instanceof Short) {
-                    expectedValue = ((Short)expectedValue).intValue();
+                    expectedValue = ((Short) expectedValue).intValue();
                 }
             }
         }
@@ -541,19 +530,19 @@ public class BulkWriterRemoteExample {
 
         boolean matched;
         if (fetchedValue instanceof Float) {
-            matched = Math.abs((Float)fetchedValue - (Float)expectedValue) < 1e-4;
+            matched = Math.abs((Float) fetchedValue - (Float) expectedValue) < 1e-4;
         } else if (fetchedValue instanceof Double) {
-            matched = Math.abs((Double)fetchedValue - (Double)expectedValue) < 1e-8;
+            matched = Math.abs((Double) fetchedValue - (Double) expectedValue) < 1e-8;
         } else if (fetchedValue instanceof JsonElement) {
-            JsonElement expectedJson = GSON_INSTANCE.fromJson((String)expectedValue, JsonElement.class);
+            JsonElement expectedJson = GSON_INSTANCE.fromJson((String) expectedValue, JsonElement.class);
             matched = fetchedValue.equals(expectedJson);
         } else if (fetchedValue instanceof ByteBuffer) {
-            byte[] bb = ((ByteBuffer)fetchedValue).array();
-            matched = Arrays.equals(bb, (byte[])expectedValue);
+            byte[] bb = ((ByteBuffer) fetchedValue).array();
+            matched = Arrays.equals(bb, (byte[]) expectedValue);
         } else if (fetchedValue instanceof List) {
             matched = fetchedValue.equals(expectedValue);
             // currently, for array field, null value, the server returns an empty list
-            if (((List<?>) fetchedValue).isEmpty() && expectedValue==null) {
+            if (((List<?>) fetchedValue).isEmpty() && expectedValue == null) {
                 matched = true;
             }
         } else {
@@ -572,7 +561,7 @@ public class BulkWriterRemoteExample {
     private static void verifyImportData(CreateCollectionReq.CollectionSchema collectionSchema, List<Map<String, Object>> rows) {
         createIndex();
 
-        List<Long> QUERY_IDS = Lists.newArrayList(1L, (long)rows.get(rows.size()-1).get("id"));
+        List<Long> QUERY_IDS = Lists.newArrayList(1L, (long) rows.get(rows.size() - 1).get("id"));
         System.out.printf("Load collection and query items %s%n", QUERY_IDS);
         loadCollection();
 
@@ -586,8 +575,8 @@ public class BulkWriterRemoteExample {
         }
         for (QueryResp.QueryResult result : results) {
             Map<String, Object> fetchedEntity = result.getEntity();
-            long id = (Long)fetchedEntity.get("id");
-            Map<String, Object> originalEntity = rows.get((int)id);
+            long id = (Long) fetchedEntity.get("id");
+            Map<String, Object> originalEntity = rows.get((int) id);
             comparePrint(collectionSchema, originalEntity, fetchedEntity, "bool");
             comparePrint(collectionSchema, originalEntity, fetchedEntity, "int8");
             comparePrint(collectionSchema, originalEntity, fetchedEntity, "int16");
@@ -687,7 +676,7 @@ public class BulkWriterRemoteExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        return (long)countR.getQueryResults().get(0).getEntity().get("count(*)");
+        return (long) countR.getQueryResults().get(0).getEntity().get("count(*)");
     }
 
     private static void exampleCloudImport() {
@@ -762,7 +751,7 @@ public class BulkWriterRemoteExample {
         schemaV2.addField(AddFieldReq.builder()
                 .fieldName("int8")
                 .dataType(DataType.Int8)
-                .defaultValue((short)88)
+                .defaultValue((short) 88)
                 .build());
         schemaV2.addField(AddFieldReq.builder()
                 .fieldName("int16")
@@ -778,7 +767,7 @@ public class BulkWriterRemoteExample {
                 .fieldName("float")
                 .dataType(DataType.Float)
                 .isNullable(true)
-                .defaultValue((float)3.14159)
+                .defaultValue((float) 3.14159)
                 .build());
         schemaV2.addField(AddFieldReq.builder()
                 .fieldName("double")

+ 22 - 32
examples/src/main/java/io/milvus/v2/bulkwriter/BulkWriterStageExample.java

@@ -38,24 +38,14 @@ import io.milvus.v2.client.MilvusClientV2;
 import io.milvus.v2.common.ConsistencyLevel;
 import io.milvus.v2.common.DataType;
 import io.milvus.v2.common.IndexParam;
-import io.milvus.v2.service.collection.request.AddFieldReq;
-import io.milvus.v2.service.collection.request.CreateCollectionReq;
-import io.milvus.v2.service.collection.request.DropCollectionReq;
-import io.milvus.v2.service.collection.request.HasCollectionReq;
-import io.milvus.v2.service.collection.request.LoadCollectionReq;
-import io.milvus.v2.service.collection.request.RefreshLoadReq;
+import io.milvus.v2.service.collection.request.*;
 import io.milvus.v2.service.index.request.CreateIndexReq;
 import io.milvus.v2.service.vector.request.QueryReq;
 import io.milvus.v2.service.vector.response.QueryResp;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.concurrent.TimeUnit;
 
 
@@ -171,13 +161,13 @@ public class BulkWriterStageExample {
         for (int i = 0; i < count; ++i) {
             Map<String, Object> row = new HashMap<>();
             // scalar field
-            row.put("id", (long)i);
+            row.put("id", (long) i);
             row.put("bool", i % 5 == 0);
             row.put("int8", i % 128);
             row.put("int16", i % 1000);
             row.put("int32", i % 100000);
-            row.put("float", (float)i / 3);
-            row.put("double", (double)i / 7);
+            row.put("float", (float) i / 3);
+            row.put("double", (double) i / 7);
             row.put("varchar", "varchar_" + i);
             row.put("json", String.format("{\"dummy\": %s, \"ok\": \"name_%s\"}", i, i));
 
@@ -203,7 +193,7 @@ public class BulkWriterStageExample {
         {
             Map<String, Object> row = new HashMap<>();
             // scalar field
-            row.put("id", (long)data.size());
+            row.put("id", (long) data.size());
             row.put("bool", null);
             row.put("int8", null);
             row.put("int16", 16);
@@ -240,7 +230,7 @@ public class BulkWriterStageExample {
             JsonObject rowObject = new JsonObject();
 
             // scalar field
-            rowObject.addProperty("id", (Number)row.get("id"));
+            rowObject.addProperty("id", (Number) row.get("id"));
             if (row.get("bool") != null) { // nullable value can be missed
                 rowObject.addProperty("bool", (Boolean) row.get("bool"));
             }
@@ -256,7 +246,7 @@ public class BulkWriterStageExample {
             // Note: for JSON field, use gson.fromJson() to construct a real JsonObject
             // don't use rowObject.addProperty("json", jsonContent) since the value is treated as a string, not a JsonObject
             Object jsonContent = row.get("json");
-            rowObject.add("json", jsonContent == null ? null : GSON_INSTANCE.fromJson((String)jsonContent, JsonElement.class));
+            rowObject.add("json", jsonContent == null ? null : GSON_INSTANCE.fromJson((String) jsonContent, JsonElement.class));
 
             // vector field
             rowObject.add("float_vector", GSON_INSTANCE.toJsonTree(row.get("float_vector")));
@@ -322,7 +312,7 @@ public class BulkWriterStageExample {
 
     /**
      * @param collectionSchema collection info
-     * @param dropIfExist     if collection already exist, will drop firstly and then create again
+     * @param dropIfExist      if collection already exist, will drop firstly and then create again
      */
     private static void createCollection(String collectionName, CreateCollectionReq.CollectionSchema collectionSchema, boolean dropIfExist) {
         System.out.println("\n===================== create collection ====================");
@@ -357,7 +347,7 @@ public class BulkWriterStageExample {
                 expectedValue = field.getDefaultValue();
                 // for Int8/Int16 value, the default value is Short type, the returned value is Integer type
                 if (expectedValue instanceof Short) {
-                    expectedValue = ((Short)expectedValue).intValue();
+                    expectedValue = ((Short) expectedValue).intValue();
                 }
             }
         }
@@ -375,19 +365,19 @@ public class BulkWriterStageExample {
 
         boolean matched;
         if (fetchedValue instanceof Float) {
-            matched = Math.abs((Float)fetchedValue - (Float)expectedValue) < 1e-4;
+            matched = Math.abs((Float) fetchedValue - (Float) expectedValue) < 1e-4;
         } else if (fetchedValue instanceof Double) {
-            matched = Math.abs((Double)fetchedValue - (Double)expectedValue) < 1e-8;
+            matched = Math.abs((Double) fetchedValue - (Double) expectedValue) < 1e-8;
         } else if (fetchedValue instanceof JsonElement) {
-            JsonElement expectedJson = GSON_INSTANCE.fromJson((String)expectedValue, JsonElement.class);
+            JsonElement expectedJson = GSON_INSTANCE.fromJson((String) expectedValue, JsonElement.class);
             matched = fetchedValue.equals(expectedJson);
         } else if (fetchedValue instanceof ByteBuffer) {
-            byte[] bb = ((ByteBuffer)fetchedValue).array();
-            matched = Arrays.equals(bb, (byte[])expectedValue);
+            byte[] bb = ((ByteBuffer) fetchedValue).array();
+            matched = Arrays.equals(bb, (byte[]) expectedValue);
         } else if (fetchedValue instanceof List) {
             matched = fetchedValue.equals(expectedValue);
             // currently, for array field, null value, the server returns an empty list
-            if (((List<?>) fetchedValue).isEmpty() && expectedValue==null) {
+            if (((List<?>) fetchedValue).isEmpty() && expectedValue == null) {
                 matched = true;
             }
         } else {
@@ -406,7 +396,7 @@ public class BulkWriterStageExample {
     private static void verifyImportData(CreateCollectionReq.CollectionSchema collectionSchema, List<Map<String, Object>> rows) {
         createIndex();
 
-        List<Long> QUERY_IDS = Lists.newArrayList(1L, (long)rows.get(rows.size()-1).get("id"));
+        List<Long> QUERY_IDS = Lists.newArrayList(1L, (long) rows.get(rows.size() - 1).get("id"));
         System.out.printf("Load collection and query items %s%n", QUERY_IDS);
         loadCollection();
 
@@ -420,8 +410,8 @@ public class BulkWriterStageExample {
         }
         for (QueryResp.QueryResult result : results) {
             Map<String, Object> fetchedEntity = result.getEntity();
-            long id = (Long)fetchedEntity.get("id");
-            Map<String, Object> originalEntity = rows.get((int)id);
+            long id = (Long) fetchedEntity.get("id");
+            Map<String, Object> originalEntity = rows.get((int) id);
             comparePrint(collectionSchema, originalEntity, fetchedEntity, "bool");
             comparePrint(collectionSchema, originalEntity, fetchedEntity, "int8");
             comparePrint(collectionSchema, originalEntity, fetchedEntity, "int16");
@@ -521,7 +511,7 @@ public class BulkWriterStageExample {
                 .outputFields(Collections.singletonList("count(*)"))
                 .consistencyLevel(ConsistencyLevel.STRONG)
                 .build());
-        return (long)countR.getQueryResults().get(0).getEntity().get("count(*)");
+        return (long) countR.getQueryResults().get(0).getEntity().get("count(*)");
     }
 
     private static CreateCollectionReq.CollectionSchema buildAllTypesSchema() {
@@ -543,7 +533,7 @@ public class BulkWriterStageExample {
         schemaV2.addField(AddFieldReq.builder()
                 .fieldName("int8")
                 .dataType(DataType.Int8)
-                .defaultValue((short)88)
+                .defaultValue((short) 88)
                 .build());
         schemaV2.addField(AddFieldReq.builder()
                 .fieldName("int16")
@@ -559,7 +549,7 @@ public class BulkWriterStageExample {
                 .fieldName("float")
                 .dataType(DataType.Float)
                 .isNullable(true)
-                .defaultValue((float)3.14159)
+                .defaultValue((float) 3.14159)
                 .build());
         schemaV2.addField(AddFieldReq.builder()
                 .fieldName("double")

+ 3 - 0
examples/src/main/java/io/milvus/v2/bulkwriter/CsvDataObject.java

@@ -38,12 +38,15 @@ public class CsvDataObject {
     public String getVector() {
         return vector;
     }
+
     public String getPath() {
         return path;
     }
+
     public String getLabel() {
         return label;
     }
+
     public List<Float> toFloatArray() {
         return GSON_INSTANCE.fromJson(vector, new TypeToken<List<Float>>() {
         }.getType());

+ 0 - 1
pom.xml

@@ -100,7 +100,6 @@
         <slf4j.api.version>1.7.36</slf4j.api.version>
         <junit.version>4.13.2</junit.version>
         <junit.jupiter.version>5.10.1</junit.jupiter.version>
-        <lombok.version>1.18.22</lombok.version>
         <okhttp.version>4.12.0</okhttp.version>
         <maven.source.plugin.version>3.1.0</maven.source.plugin.version>
         <maven.javadoc.plugin.version>3.7.0</maven.javadoc.plugin.version>

+ 0 - 6
sdk-bulkwriter/pom.xml

@@ -101,12 +101,6 @@
             <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-            <version>${lombok.version}</version>
-            <scope>provided</scope>
-        </dependency>
         <dependency>
             <groupId>org.apache.parquet</groupId>
             <artifactId>parquet-avro</artifactId>

+ 8 - 8
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/BulkWriter.java

@@ -127,7 +127,7 @@ public abstract class BulkWriter implements AutoCloseable {
 
         switch (fileType) {
             case PARQUET:
-                this.fileWriter =  new ParquetFileWriter(collectionSchema, filePathPrefix.toString());
+                this.fileWriter = new ParquetFileWriter(collectionSchema, filePathPrefix.toString());
                 break;
             case JSON:
                 this.fileWriter = new JSONFileWriter(collectionSchema, filePathPrefix.toString());
@@ -223,7 +223,7 @@ public abstract class BulkWriter implements AutoCloseable {
             }
 
             JsonElement obj = row.get(fieldName);
-            if (obj == null ) {
+            if (obj == null) {
                 obj = JsonNull.INSTANCE;
             }
             if (outputFieldNames.contains(fieldName)) {
@@ -288,7 +288,7 @@ public abstract class BulkWriter implements AutoCloseable {
                 case Float16Vector:
                 case BFloat16Vector:
                 case SparseFloatVector:
-                case Int8Vector:{
+                case Int8Vector: {
                     Pair<Object, Integer> objectAndSize = verifyVector(obj, field);
                     rowValues.put(fieldName, objectAndSize.getLeft());
                     rowSize += objectAndSize.getRight();
@@ -369,21 +369,21 @@ public abstract class BulkWriter implements AutoCloseable {
                 return Pair.of(vector, ((List<?>) vector).size() * 4);
             case BinaryVector:
             case Int8Vector:
-                return Pair.of(vector, ((ByteBuffer)vector).limit());
+                return Pair.of(vector, ((ByteBuffer) vector).limit());
             case Float16Vector:
             case BFloat16Vector:
                 // for JSON and CSV, float16/bfloat16 vector is parsed as float values in text
                 if (this.fileType == BulkFileType.CSV || this.fileType == BulkFileType.JSON) {
-                    ByteBuffer bv = (ByteBuffer)vector;
+                    ByteBuffer bv = (ByteBuffer) vector;
                     bv.order(ByteOrder.LITTLE_ENDIAN); // ensure LITTLE_ENDIAN
                     List<Float> v = (dataType == DataType.Float16Vector) ?
                             Float16Utils.fp16BufferToVector(bv) : Float16Utils.bf16BufferToVector(bv);
                     return Pair.of(v, v.size() * 4);
                 }
                 // for PARQUET, float16/bfloat16 vector is parsed as binary
-                return Pair.of(vector, ((ByteBuffer)vector).limit() * 2);
+                return Pair.of(vector, ((ByteBuffer) vector).limit() * 2);
             case SparseFloatVector:
-                return Pair.of(vector, ((SortedMap<Long, Float>)vector).size() * 12);
+                return Pair.of(vector, ((SortedMap<Long, Float>) vector).size() * 12);
             default:
                 ExceptionUtils.throwUnExpectedException("Unknown vector type");
         }
@@ -417,7 +417,7 @@ public abstract class BulkWriter implements AutoCloseable {
         int rowSize = 0;
         DataType elementType = field.getElementType();
         if (TypeSize.contains(elementType)) {
-            rowSize = TypeSize.getSize(elementType) * ((List<?>)array).size();
+            rowSize = TypeSize.getSize(elementType) * ((List<?>) array).size();
         } else if (elementType == DataType.VarChar) {
             for (String str : (List<String>) array) {
                 rowSize += str.length();

+ 4 - 4
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/LocalBulkWriter.java

@@ -41,9 +41,9 @@ import java.util.concurrent.locks.ReentrantLock;
 public class LocalBulkWriter extends BulkWriter {
     private static final Logger logger = LoggerFactory.getLogger(LocalBulkWriter.class);
 
-    private Map<String, Thread> workingThread;
-    private ReentrantLock workingThreadLock;
-    private List<List<String>> localFiles;
+    private final Map<String, Thread> workingThread;
+    private final ReentrantLock workingThreadLock;
+    private final List<List<String>> localFiles;
 
     public LocalBulkWriter(LocalBulkWriterParam bulkWriterParam) throws IOException {
         super(bulkWriterParam.getCollectionSchema(), bulkWriterParam.getChunkSize(), bulkWriterParam.getFileType(), bulkWriterParam.getLocalPath(), bulkWriterParam.getConfig());
@@ -93,7 +93,7 @@ public class LocalBulkWriter extends BulkWriter {
 
         String filePath = super.getFileWriter().getFilePath();
         String msg = String.format("Prepare to commit file:%s, current_file_total_row_count: %s, current_file_total_size:%s, create_new_file:%s",
-                filePath ,super.getTotalRowCount(), super.getTotalSize(), createNewFile);
+                filePath, super.getTotalRowCount(), super.getTotalSize(), createNewFile);
         logger.info(msg);
 
         List<String> fileList = Lists.newArrayList(filePath);

+ 35 - 11
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/LocalBulkWriterParam.java

@@ -25,9 +25,6 @@ import io.milvus.exception.ParamException;
 import io.milvus.param.ParamUtils;
 import io.milvus.param.collection.CollectionSchemaParam;
 import io.milvus.v2.service.collection.request.CreateCollectionReq;
-import lombok.Getter;
-import lombok.NonNull;
-import lombok.ToString;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -35,8 +32,6 @@ import java.util.Map;
 /**
  * Parameters for <code>bulkWriter</code> interface.
  */
-@Getter
-@ToString
 public class LocalBulkWriterParam {
     private final CreateCollectionReq.CollectionSchema collectionSchema;
     private final String localPath;
@@ -44,7 +39,7 @@ public class LocalBulkWriterParam {
     private final BulkFileType fileType;
     private final Map<String, Object> config;
 
-    private LocalBulkWriterParam(@NonNull Builder builder) {
+    private LocalBulkWriterParam(Builder builder) {
         this.collectionSchema = builder.collectionSchema;
         this.localPath = builder.localPath;
         this.chunkSize = builder.chunkSize;
@@ -52,6 +47,36 @@ public class LocalBulkWriterParam {
         this.config = builder.config;
     }
 
+    public CreateCollectionReq.CollectionSchema getCollectionSchema() {
+        return collectionSchema;
+    }
+
+    public String getLocalPath() {
+        return localPath;
+    }
+
+    public long getChunkSize() {
+        return chunkSize;
+    }
+
+    public BulkFileType getFileType() {
+        return fileType;
+    }
+
+    public Map<String, Object> getConfig() {
+        return config;
+    }
+
+    @Override
+    public String toString() {
+        return "LocalBulkWriterParam{" +
+                "collectionSchema=" + collectionSchema +
+                ", localPath='" + localPath + '\'' +
+                ", chunkSize=" + chunkSize +
+                ", fileType=" + fileType +
+                '}';
+    }
+
     public static Builder newBuilder() {
         return new Builder();
     }
@@ -64,7 +89,7 @@ public class LocalBulkWriterParam {
         private String localPath;
         private long chunkSize = 128 * 1024 * 1024;
         private BulkFileType fileType = BulkFileType.PARQUET;
-        private Map<String, Object> config = new HashMap<>();
+        private final Map<String, Object> config = new HashMap<>();
 
         private Builder() {
         }
@@ -75,7 +100,7 @@ public class LocalBulkWriterParam {
          * @param collectionSchema collection schema
          * @return <code>Builder</code>
          */
-        public Builder withCollectionSchema(@NonNull CollectionSchemaParam collectionSchema) {
+        public Builder withCollectionSchema(CollectionSchemaParam collectionSchema) {
             this.collectionSchema = V2AdapterUtils.convertV1Schema(collectionSchema);
             return this;
         }
@@ -86,7 +111,7 @@ public class LocalBulkWriterParam {
          * @param collectionSchema collection schema
          * @return <code>Builder</code>
          */
-        public Builder withCollectionSchema(@NonNull CreateCollectionReq.CollectionSchema collectionSchema) {
+        public Builder withCollectionSchema(CreateCollectionReq.CollectionSchema collectionSchema) {
             this.collectionSchema = collectionSchema;
             return this;
         }
@@ -97,7 +122,7 @@ public class LocalBulkWriterParam {
          * @param localPath collection name
          * @return <code>Builder</code>
          */
-        public Builder withLocalPath(@NonNull String localPath) {
+        public Builder withLocalPath(String localPath) {
             this.localPath = localPath;
             return this;
         }
@@ -132,5 +157,4 @@ public class LocalBulkWriterParam {
             return new LocalBulkWriterParam(this);
         }
     }
-
 }

+ 3 - 3
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/RemoteBulkWriter.java

@@ -47,11 +47,11 @@ import java.util.concurrent.ExecutionException;
 public class RemoteBulkWriter extends LocalBulkWriter {
     private static final Logger logger = LoggerFactory.getLogger(RemoteBulkWriter.class);
 
-    private String remotePath;
-    private StorageConnectParam connectParam;
+    private final String remotePath;
+    private final StorageConnectParam connectParam;
     private StorageClient storageClient;
 
-    private List<List<String>> remoteFiles;
+    private final List<List<String>> remoteFiles;
 
     public RemoteBulkWriter(RemoteBulkWriterParam bulkWriterParam) throws IOException {
         super(bulkWriterParam.getCollectionSchema(),

+ 42 - 14
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/RemoteBulkWriterParam.java

@@ -19,17 +19,13 @@
 
 package io.milvus.bulkwriter;
 
+import io.milvus.bulkwriter.common.clientenum.BulkFileType;
 import io.milvus.bulkwriter.common.utils.V2AdapterUtils;
 import io.milvus.bulkwriter.connect.StorageConnectParam;
-import io.milvus.bulkwriter.common.clientenum.BulkFileType;
 import io.milvus.exception.ParamException;
 import io.milvus.param.ParamUtils;
 import io.milvus.param.collection.CollectionSchemaParam;
 import io.milvus.v2.service.collection.request.CreateCollectionReq;
-import lombok.Getter;
-import lombok.NonNull;
-import lombok.ToString;
-import org.jetbrains.annotations.NotNull;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -37,8 +33,6 @@ import java.util.Map;
 /**
  * Parameters for <code>bulkWriter</code> interface.
  */
-@Getter
-@ToString
 public class RemoteBulkWriterParam {
     private final CreateCollectionReq.CollectionSchema collectionSchema;
     private final StorageConnectParam connectParam;
@@ -47,7 +41,7 @@ public class RemoteBulkWriterParam {
     private final BulkFileType fileType;
     private final Map<String, Object> config;
 
-    private RemoteBulkWriterParam(@NonNull Builder builder) {
+    private RemoteBulkWriterParam(Builder builder) {
         this.collectionSchema = builder.collectionSchema;
         this.connectParam = builder.connectParam;
         this.remotePath = builder.remotePath;
@@ -56,6 +50,40 @@ public class RemoteBulkWriterParam {
         this.config = builder.config;
     }
 
+    public CreateCollectionReq.CollectionSchema getCollectionSchema() {
+        return collectionSchema;
+    }
+
+    public StorageConnectParam getConnectParam() {
+        return connectParam;
+    }
+
+    public String getRemotePath() {
+        return remotePath;
+    }
+
+    public long getChunkSize() {
+        return chunkSize;
+    }
+
+    public BulkFileType getFileType() {
+        return fileType;
+    }
+
+    public Map<String, Object> getConfig() {
+        return config;
+    }
+
+    @Override
+    public String toString() {
+        return "RemoteBulkWriterParam{" +
+                "collectionSchema=" + collectionSchema +
+                ", remotePath='" + remotePath + '\'' +
+                ", chunkSize=" + chunkSize +
+                ", fileType=" + fileType +
+                '}';
+    }
+
     public static Builder newBuilder() {
         return new Builder();
     }
@@ -69,7 +97,7 @@ public class RemoteBulkWriterParam {
         private String remotePath;
         private long chunkSize = 128 * 1024 * 1024;
         private BulkFileType fileType = BulkFileType.PARQUET;
-        private Map<String, Object> config = new HashMap<>();
+        private final Map<String, Object> config = new HashMap<>();
 
         private Builder() {
         }
@@ -80,7 +108,7 @@ public class RemoteBulkWriterParam {
          * @param collectionSchema collection info
          * @return <code>Builder</code>
          */
-        public Builder withCollectionSchema(@NonNull CollectionSchemaParam collectionSchema) {
+        public Builder withCollectionSchema(CollectionSchemaParam collectionSchema) {
             this.collectionSchema = V2AdapterUtils.convertV1Schema(collectionSchema);
             return this;
         }
@@ -91,12 +119,12 @@ public class RemoteBulkWriterParam {
          * @param collectionSchema collection schema
          * @return <code>Builder</code>
          */
-        public Builder withCollectionSchema(@NonNull CreateCollectionReq.CollectionSchema collectionSchema) {
+        public Builder withCollectionSchema(CreateCollectionReq.CollectionSchema collectionSchema) {
             this.collectionSchema = collectionSchema;
             return this;
         }
 
-        public Builder withConnectParam(@NotNull StorageConnectParam connectParam) {
+        public Builder withConnectParam(StorageConnectParam connectParam) {
             this.connectParam = connectParam;
             return this;
         }
@@ -107,7 +135,7 @@ public class RemoteBulkWriterParam {
          * @param remotePath remote path
          * @return <code>Builder</code>
          */
-        public Builder withRemotePath(@NonNull String remotePath) {
+        public Builder withRemotePath(String remotePath) {
             this.remotePath = remotePath;
             return this;
         }
@@ -117,7 +145,7 @@ public class RemoteBulkWriterParam {
             return this;
         }
 
-        public Builder withFileType(@NonNull BulkFileType fileType) {
+        public Builder withFileType(BulkFileType fileType) {
             this.fileType = fileType;
             return this;
         }

+ 4 - 4
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/StageBulkWriter.java

@@ -39,10 +39,10 @@ import java.util.List;
 public class StageBulkWriter extends LocalBulkWriter {
     private static final Logger logger = LoggerFactory.getLogger(StageBulkWriter.class);
 
-    private String remotePath;
-    private List<List<String>> remoteFiles;
-    private StageFileManager stageFileManager;
-    private StageBulkWriterParam stageBulkWriterParam;
+    private final String remotePath;
+    private final List<List<String>> remoteFiles;
+    private final StageFileManager stageFileManager;
+    private final StageBulkWriterParam stageBulkWriterParam;
 
     public StageBulkWriter(StageBulkWriterParam bulkWriterParam) throws IOException {
         super(bulkWriterParam.getCollectionSchema(),

+ 53 - 15
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/StageBulkWriterParam.java

@@ -25,10 +25,6 @@ import io.milvus.exception.ParamException;
 import io.milvus.param.ParamUtils;
 import io.milvus.param.collection.CollectionSchemaParam;
 import io.milvus.v2.service.collection.request.CreateCollectionReq;
-import lombok.Getter;
-import lombok.NonNull;
-import lombok.ToString;
-import org.jetbrains.annotations.NotNull;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -36,8 +32,6 @@ import java.util.Map;
 /**
  * Parameters for <code>stageBulkWriter</code> interface.
  */
-@Getter
-@ToString
 public class StageBulkWriterParam {
     private final CreateCollectionReq.CollectionSchema collectionSchema;
     private final String remotePath;
@@ -49,7 +43,7 @@ public class StageBulkWriterParam {
     private final String apiKey;
     private final String stageName;
 
-    private StageBulkWriterParam(@NonNull Builder builder) {
+    private StageBulkWriterParam(Builder builder) {
         this.collectionSchema = builder.collectionSchema;
         this.remotePath = builder.remotePath;
         this.chunkSize = builder.chunkSize;
@@ -61,6 +55,50 @@ public class StageBulkWriterParam {
         this.stageName = builder.stageName;
     }
 
+    public CreateCollectionReq.CollectionSchema getCollectionSchema() {
+        return collectionSchema;
+    }
+
+    public String getRemotePath() {
+        return remotePath;
+    }
+
+    public long getChunkSize() {
+        return chunkSize;
+    }
+
+    public BulkFileType getFileType() {
+        return fileType;
+    }
+
+    public Map<String, Object> getConfig() {
+        return config;
+    }
+
+    public String getCloudEndpoint() {
+        return cloudEndpoint;
+    }
+
+    public String getApiKey() {
+        return apiKey;
+    }
+
+    public String getStageName() {
+        return stageName;
+    }
+
+    @Override
+    public String toString() {
+        return "StageBulkWriterParam{" +
+                "collectionSchema=" + collectionSchema +
+                ", remotePath='" + remotePath + '\'' +
+                ", chunkSize=" + chunkSize +
+                ", fileType=" + fileType +
+                ", cloudEndpoint='" + cloudEndpoint + '\'' +
+                ", stageName='" + stageName + '\'' +
+                '}';
+    }
+
     public static Builder newBuilder() {
         return new Builder();
     }
@@ -73,7 +111,7 @@ public class StageBulkWriterParam {
         private String remotePath;
         private long chunkSize = 128 * 1024 * 1024;
         private BulkFileType fileType = BulkFileType.PARQUET;
-        private Map<String, Object> config = new HashMap<>();
+        private final Map<String, Object> config = new HashMap<>();
 
         private String cloudEndpoint;
         private String apiKey;
@@ -89,7 +127,7 @@ public class StageBulkWriterParam {
          * @param collectionSchema collection info
          * @return <code>Builder</code>
          */
-        public Builder withCollectionSchema(@NonNull CollectionSchemaParam collectionSchema) {
+        public Builder withCollectionSchema(CollectionSchemaParam collectionSchema) {
             this.collectionSchema = V2AdapterUtils.convertV1Schema(collectionSchema);
             return this;
         }
@@ -100,7 +138,7 @@ public class StageBulkWriterParam {
          * @param collectionSchema collection schema
          * @return <code>Builder</code>
          */
-        public Builder withCollectionSchema(@NonNull CreateCollectionReq.CollectionSchema collectionSchema) {
+        public Builder withCollectionSchema(CreateCollectionReq.CollectionSchema collectionSchema) {
             this.collectionSchema = collectionSchema;
             return this;
         }
@@ -111,7 +149,7 @@ public class StageBulkWriterParam {
          * @param remotePath remote path
          * @return <code>Builder</code>
          */
-        public Builder withRemotePath(@NonNull String remotePath) {
+        public Builder withRemotePath(String remotePath) {
             this.remotePath = remotePath;
             return this;
         }
@@ -121,7 +159,7 @@ public class StageBulkWriterParam {
             return this;
         }
 
-        public Builder withFileType(@NonNull BulkFileType fileType) {
+        public Builder withFileType(BulkFileType fileType) {
             this.fileType = fileType;
             return this;
         }
@@ -131,17 +169,17 @@ public class StageBulkWriterParam {
             return this;
         }
 
-        public Builder withCloudEndpoint(@NotNull String cloudEndpoint) {
+        public Builder withCloudEndpoint(String cloudEndpoint) {
             this.cloudEndpoint = cloudEndpoint;
             return this;
         }
 
-        public Builder withApiKey(@NotNull String apiKey) {
+        public Builder withApiKey(String apiKey) {
             this.apiKey = apiKey;
             return this;
         }
 
-        public Builder withStageName(@NotNull String stageName) {
+        public Builder withStageName(String stageName) {
             this.stageName = stageName;
             return this;
         }

+ 3 - 8
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/StageFileManager.java

@@ -42,12 +42,7 @@ import java.nio.file.Paths;
 import java.time.Instant;
 import java.util.Date;
 import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.CompletionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.*;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 
@@ -131,12 +126,12 @@ public class StageFileManager {
      * tasks to complete within a timeout period. If tasks do not finish within
      * the timeout, it will forcefully shut down the executor.
      * </p>
-     *
+     * <p>
      * Usage recommendation:
      * <ul>
      *   <li>Call this method when the StageFileManager is no longer needed.</li>
      * </ul>
-     *
+     * <p>
      * Thread interruption is respected, and the interrupt status is restored if interrupted during shutdown.
      */
     public void shutdownGracefully() {

+ 30 - 11
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/StageFileManagerParam.java

@@ -22,29 +22,48 @@ package io.milvus.bulkwriter;
 import io.milvus.bulkwriter.common.clientenum.ConnectType;
 import io.milvus.exception.ParamException;
 import io.milvus.param.ParamUtils;
-import lombok.Getter;
-import lombok.NonNull;
-import lombok.ToString;
-import org.jetbrains.annotations.NotNull;
 
 /**
  * Parameters for <code>stageFileManager</code> interface.
  */
-@Getter
-@ToString
 public class StageFileManagerParam {
     private final String cloudEndpoint;
     private final String apiKey;
     private final String stageName;
     private final ConnectType connectType;
 
-    private StageFileManagerParam(@NonNull Builder builder) {
+    private StageFileManagerParam(Builder builder) {
         this.cloudEndpoint = builder.cloudEndpoint;
         this.apiKey = builder.apiKey;
         this.stageName = builder.stageName;
         this.connectType = builder.connectType;
     }
 
+    public String getCloudEndpoint() {
+        return cloudEndpoint;
+    }
+
+    public String getApiKey() {
+        return apiKey;
+    }
+
+    public String getStageName() {
+        return stageName;
+    }
+
+    public ConnectType getConnectType() {
+        return connectType;
+    }
+
+    @Override
+    public String toString() {
+        return "StageFileManagerParam{" +
+                "cloudEndpoint='" + cloudEndpoint + '\'' +
+                ", stageName='" + stageName + '\'' +
+                ", connectType=" + connectType +
+                '}';
+    }
+
     public static Builder newBuilder() {
         return new Builder();
     }
@@ -69,17 +88,17 @@ public class StageFileManagerParam {
          * For overseas regions, it is: https://api.cloud.zilliz.com
          * For regions in China, it is: https://api.cloud.zilliz.com.cn
          */
-        public Builder withCloudEndpoint(@NotNull String cloudEndpoint) {
+        public Builder withCloudEndpoint(String cloudEndpoint) {
             this.cloudEndpoint = cloudEndpoint;
             return this;
         }
 
-        public Builder withApiKey(@NotNull String apiKey) {
+        public Builder withApiKey(String apiKey) {
             this.apiKey = apiKey;
             return this;
         }
 
-        public Builder withStageName(@NotNull String stageName) {
+        public Builder withStageName(String stageName) {
             this.stageName = stageName;
             return this;
         }
@@ -90,7 +109,7 @@ public class StageFileManagerParam {
          * otherwise, the public endpoint will be used.
          * You can also force the use of either the internal or public endpoint.
          */
-        public Builder withConnectType(@NotNull ConnectType connectType) {
+        public Builder withConnectType(ConnectType connectType) {
             this.connectType = connectType;
             return this;
         }

+ 18 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/StageManagerParam.java

@@ -21,25 +21,34 @@ package io.milvus.bulkwriter;
 
 import io.milvus.exception.ParamException;
 import io.milvus.param.ParamUtils;
-import lombok.Getter;
-import lombok.NonNull;
-import lombok.ToString;
-import org.jetbrains.annotations.NotNull;
 
 /**
  * Parameters for <code>stageManager</code> interface.
  */
-@Getter
-@ToString
 public class StageManagerParam {
     private final String cloudEndpoint;
     private final String apiKey;
 
-    private StageManagerParam(@NonNull Builder builder) {
+    private StageManagerParam(Builder builder) {
         this.cloudEndpoint = builder.cloudEndpoint;
         this.apiKey = builder.apiKey;
     }
 
+    public String getCloudEndpoint() {
+        return cloudEndpoint;
+    }
+
+    public String getApiKey() {
+        return apiKey;
+    }
+
+    @Override
+    public String toString() {
+        return "StageManagerParam{" +
+                "cloudEndpoint='" + cloudEndpoint + '\'' +
+                '}';
+    }
+
     public static Builder newBuilder() {
         return new Builder();
     }
@@ -60,12 +69,12 @@ public class StageManagerParam {
          * For overseas regions, it is: https://api.cloud.zilliz.com
          * For regions in China, it is: https://api.cloud.zilliz.com.cn
          */
-        public Builder withCloudEndpoint(@NotNull String cloudEndpoint) {
+        public Builder withCloudEndpoint(String cloudEndpoint) {
             this.cloudEndpoint = cloudEndpoint;
             return this;
         }
 
-        public Builder withApiKey(@NotNull String apiKey) {
+        public Builder withApiKey(String apiKey) {
             this.apiKey = apiKey;
             return this;
         }

+ 10 - 5
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/common/clientenum/BulkFileType.java

@@ -19,20 +19,25 @@
 
 package io.milvus.bulkwriter.common.clientenum;
 
-import lombok.Getter;
-
-@Getter
 public enum BulkFileType {
     PARQUET(1, ".parquet"),
     JSON(2, ".json"),
     CSV(3, ".csv"),
     ;
 
-    private Integer code;
-    private String suffix;
+    private final Integer code;
+    private final String suffix;
 
     BulkFileType(Integer code, String suffix) {
         this.code = code;
         this.suffix = suffix;
     }
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public String getSuffix() {
+        return suffix;
+    }
 }

+ 19 - 18
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/common/clientenum/CloudStorage.java

@@ -20,35 +20,32 @@
 package io.milvus.bulkwriter.common.clientenum;
 
 import io.milvus.exception.ParamException;
-import lombok.Getter;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.hadoop.util.Lists;
 
 import java.util.List;
 
 public enum CloudStorage {
-    MINIO("minio","%s", "minioAddress"),
-    AWS("aws","s3.amazonaws.com", null),
-    GCP("gcp" ,"storage.googleapis.com", null),
+    MINIO("minio", "%s", "minioAddress"),
+    AWS("aws", "s3.amazonaws.com", null),
+    GCP("gcp", "storage.googleapis.com", null),
 
-    AZ("az" ,"%s.blob.core.windows.net", "accountName"),
-    AZURE("azure" ,"%s.blob.core.windows.net", "accountName"),
+    AZ("az", "%s.blob.core.windows.net", "accountName"),
+    AZURE("azure", "%s.blob.core.windows.net", "accountName"),
 
-    ALI("ali","oss-%s.aliyuncs.com", "region"),
-    ALIYUN("aliyun","oss-%s.aliyuncs.com", "region"),
-    ALIBABA("alibaba","oss-%s.aliyuncs.com", "region"),
-    ALICLOU("alicloud","oss-%s.aliyuncs.com", "region"),
+    ALI("ali", "oss-%s.aliyuncs.com", "region"),
+    ALIYUN("aliyun", "oss-%s.aliyuncs.com", "region"),
+    ALIBABA("alibaba", "oss-%s.aliyuncs.com", "region"),
+    ALICLOU("alicloud", "oss-%s.aliyuncs.com", "region"),
 
-    TC("tc","cos.%s.myqcloud.com", "region"),
-    TENCENT("tencent","cos.%s.myqcloud.com", "region")
-    ;
+    TC("tc", "cos.%s.myqcloud.com", "region"),
+    TENCENT("tencent", "cos.%s.myqcloud.com", "region");
 
-    @Getter
-    private String cloudName;
+    private final String cloudName;
 
-    private String endpoint;
+    private final String endpoint;
 
-    private String replace;
+    private final String replace;
 
     CloudStorage(String cloudName, String endpoint, String replace) {
         this.cloudName = cloudName;
@@ -56,6 +53,10 @@ public enum CloudStorage {
         this.replace = replace;
     }
 
+    public String getCloudName() {
+        return cloudName;
+    }
+
     public static boolean isAliCloud(String cloudName) {
         List<CloudStorage> aliCloudStorages = Lists.newArrayList(
                 CloudStorage.ALI, CloudStorage.ALIYUN, CloudStorage.ALIBABA, CloudStorage.ALICLOU
@@ -87,7 +88,7 @@ public enum CloudStorage {
     }
 
     public String getEndpoint(String... replaceParams) {
-        if (StringUtils.isEmpty(replace))  {
+        if (StringUtils.isEmpty(replace)) {
             return endpoint;
         }
         if (replaceParams.length == 0) {

+ 3 - 3
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/common/utils/GeneratorUtils.java

@@ -72,7 +72,7 @@ public class GeneratorUtils {
     public static List<Float> generatorFloatValue(int count) {
         List<Float> result = new ArrayList<>();
         for (int i = 0; i < count; ++i) {
-            result.add( (float)i / 3);
+            result.add((float) i / 3);
         }
         return result;
     }
@@ -80,7 +80,7 @@ public class GeneratorUtils {
     public static List<Double> generatorDoubleValue(int count) {
         List<Double> result = new ArrayList<>();
         for (int i = 0; i < count; ++i) {
-            result.add((double)i / 7);
+            result.add((double) i / 7);
         }
         return result;
     }
@@ -135,7 +135,7 @@ public class GeneratorUtils {
         for (int i = 0; i < count; ++i) {
             List<Float> result = new ArrayList<>();
             for (int j = 0; j < dim; ++j) {
-                result.add( (float)j / 3);
+                result.add((float) j / 3);
             }
             floatVector.add(result);
         }

+ 1 - 1
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/common/utils/ParquetUtils.java

@@ -19,12 +19,12 @@
 
 package io.milvus.bulkwriter.common.utils;
 
+import io.milvus.v2.service.collection.request.CreateCollectionReq;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.parquet.schema.LogicalTypeAnnotation;
 import org.apache.parquet.schema.MessageType;
 import org.apache.parquet.schema.PrimitiveType;
 import org.apache.parquet.schema.Types;
-import io.milvus.v2.service.collection.request.CreateCollectionReq;
 
 import java.util.List;
 

+ 1 - 2
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/common/utils/V2AdapterUtils.java

@@ -19,7 +19,6 @@
 
 package io.milvus.bulkwriter.common.utils;
 
-import io.milvus.grpc.DataType;
 import io.milvus.param.collection.CollectionSchemaParam;
 import io.milvus.param.collection.FieldType;
 import io.milvus.v2.service.collection.request.CreateCollectionReq;
@@ -66,7 +65,7 @@ public class V2AdapterUtils {
 //    }
 
     private static CreateCollectionReq.FieldSchema convertV1Field(FieldType fieldType) {
-        Integer maxLength = fieldType.getMaxLength() > 0 ? fieldType.getMaxLength():65535;
+        Integer maxLength = fieldType.getMaxLength() > 0 ? fieldType.getMaxLength() : 65535;
         Integer dimension = fieldType.getDimension() > 0 ? fieldType.getDimension() : null;
         Integer maxCapacity = fieldType.getMaxCapacity() > 0 ? fieldType.getMaxCapacity() : null;
         io.milvus.v2.common.DataType elementType = fieldType.getElementType() == null ? null : io.milvus.v2.common.DataType.valueOf(fieldType.getElementType().name());

+ 34 - 13
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/connect/AzureConnectParam.java

@@ -22,28 +22,49 @@ package io.milvus.bulkwriter.connect;
 import com.azure.core.credential.TokenCredential;
 import io.milvus.exception.ParamException;
 import io.milvus.param.ParamUtils;
-import lombok.Getter;
-import lombok.NonNull;
-import lombok.ToString;
+import org.jetbrains.annotations.NotNull;
 
 /**
  * Parameters for <code>RemoteBulkWriter</code> interface.
  */
-@Getter
-@ToString
 public class AzureConnectParam extends StorageConnectParam {
     private final String containerName;
     private final String connStr;
     private final String accountUrl;
     private final TokenCredential credential;
 
-    private AzureConnectParam(@NonNull Builder builder) {
+    private AzureConnectParam(Builder builder) {
         this.containerName = builder.containerName;
         this.connStr = builder.connStr;
         this.accountUrl = builder.accountUrl;
         this.credential = builder.credential;
     }
 
+    public String getContainerName() {
+        return containerName;
+    }
+
+    public String getConnStr() {
+        return connStr;
+    }
+
+    public String getAccountUrl() {
+        return accountUrl;
+    }
+
+    public TokenCredential getCredential() {
+        return credential;
+    }
+
+    @Override
+    public String toString() {
+        return "AzureConnectParam{" +
+                "containerName='" + containerName + '\'' +
+                ", connStr='" + connStr + '\'' +
+                ", accountUrl='" + accountUrl + '\'' +
+                '}';
+    }
+
     public static Builder newBuilder() {
         return new Builder();
     }
@@ -64,7 +85,7 @@ public class AzureConnectParam extends StorageConnectParam {
          * @param containerName The target container name
          * @return <code>Builder</code>
          */
-        public Builder withContainerName(@NonNull String containerName) {
+        public Builder withContainerName(@NotNull String containerName) {
             this.containerName = containerName;
             return this;
         }
@@ -76,18 +97,18 @@ public class AzureConnectParam extends StorageConnectParam {
          *                <a href="https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string">...</a>
          * @return <code>Builder</code>
          */
-        public Builder withConnStr(@NonNull String connStr) {
+        public Builder withConnStr(@NotNull String connStr) {
             this.connStr = connStr;
             return this;
         }
 
         /**
          * @param accountUrl A string in format like "https://[storage-account].blob.core.windows.net"
-         *                     Read this link for more info:
-         *                     <a href="https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview">...</a>
+         *                   Read this link for more info:
+         *                   <a href="https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview">...</a>
          * @return <code>Builder</code>
          */
-        public Builder withAccountUrl(@NonNull String accountUrl) {
+        public Builder withAccountUrl(@NotNull String accountUrl) {
             this.accountUrl = accountUrl;
             return this;
         }
@@ -95,10 +116,10 @@ public class AzureConnectParam extends StorageConnectParam {
         /**
          *
          * @param credential Account access key for the account, read this link for more info:
-         *                     <a href="https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal#view-account-access-keys">...</a>
+         *                   <a href="https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal#view-account-access-keys">...</a>
          * @return <code>Builder</code>
          */
-        public Builder withCredential(@NonNull TokenCredential credential) {
+        public Builder withCredential(@NotNull TokenCredential credential) {
             this.credential = credential;
             return this;
         }

+ 53 - 13
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/connect/S3ConnectParam.java

@@ -21,17 +21,12 @@ package io.milvus.bulkwriter.connect;
 
 import io.milvus.exception.ParamException;
 import io.milvus.param.ParamUtils;
-import lombok.Getter;
-import lombok.NonNull;
-import lombok.ToString;
 import okhttp3.OkHttpClient;
 import org.jetbrains.annotations.NotNull;
 
 /**
  * Parameters for <code>RemoteBulkWriter</code> interface.
  */
-@Getter
-@ToString
 public class S3ConnectParam extends StorageConnectParam {
     private final String bucketName;
     private final String endpoint;
@@ -42,7 +37,7 @@ public class S3ConnectParam extends StorageConnectParam {
     private final OkHttpClient httpClient;
     private final String cloudName;
 
-    private S3ConnectParam(@NonNull Builder builder) {
+    private S3ConnectParam(@NotNull Builder builder) {
         this.bucketName = builder.bucketName;
         this.endpoint = builder.endpoint;
         this.accessKey = builder.accessKey;
@@ -53,6 +48,51 @@ public class S3ConnectParam extends StorageConnectParam {
         this.cloudName = builder.cloudName;
     }
 
+    public String getBucketName() {
+        return bucketName;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public String getAccessKey() {
+        return accessKey;
+    }
+
+    public String getSecretKey() {
+        return secretKey;
+    }
+
+    public String getSessionToken() {
+        return sessionToken;
+    }
+
+    public String getRegion() {
+        return region;
+    }
+
+    public OkHttpClient getHttpClient() {
+        return httpClient;
+    }
+
+    public String getCloudName() {
+        return cloudName;
+    }
+
+    @Override
+    public String toString() {
+        return "S3ConnectParam{" +
+                "bucketName='" + bucketName + '\'' +
+                ", endpoint='" + endpoint + '\'' +
+                ", accessKey='" + accessKey + '\'' +
+                ", secretKey='" + secretKey + '\'' +
+                ", sessionToken='" + sessionToken + '\'' +
+                ", region='" + region + '\'' +
+                ", cloudName='" + cloudName + '\'' +
+                '}';
+    }
+
     public static Builder newBuilder() {
         return new Builder();
     }
@@ -90,7 +130,7 @@ public class S3ConnectParam extends StorageConnectParam {
          * @param bucketName bucket info
          * @return <code>Builder</code>
          */
-        public Builder withBucketName(@NonNull String bucketName) {
+        public Builder withBucketName(@NotNull String bucketName) {
             this.bucketName = bucketName;
             return this;
         }
@@ -101,32 +141,32 @@ public class S3ConnectParam extends StorageConnectParam {
          * @param endpoint endpoint info
          * @return <code>Builder</code>
          */
-        public Builder withEndpoint(@NonNull String endpoint) {
+        public Builder withEndpoint(@NotNull String endpoint) {
             this.endpoint = endpoint;
             return this;
         }
 
-        public Builder withAccessKey(@NonNull String accessKey) {
+        public Builder withAccessKey(@NotNull String accessKey) {
             this.accessKey = accessKey;
             return this;
         }
 
-        public Builder withSecretKey(@NonNull String secretKey) {
+        public Builder withSecretKey(@NotNull String secretKey) {
             this.secretKey = secretKey;
             return this;
         }
 
-        public Builder withSessionToken(@NonNull String sessionToken) {
+        public Builder withSessionToken(@NotNull String sessionToken) {
             this.sessionToken = sessionToken;
             return this;
         }
 
-        public Builder withRegion(@NonNull String region) {
+        public Builder withRegion(@NotNull String region) {
             this.region = region;
             return this;
         }
 
-        public Builder withHttpClient(@NonNull OkHttpClient httpClient) {
+        public Builder withHttpClient(@NotNull OkHttpClient httpClient) {
             this.httpClient = httpClient;
             return this;
         }

+ 2 - 1
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/model/CompleteMultipartUploadOutputModel.java

@@ -19,7 +19,8 @@ public class CompleteMultipartUploadOutputModel {
     @Element(name = "ETag")
     private String etag;
 
-    public CompleteMultipartUploadOutputModel() {}
+    public CompleteMultipartUploadOutputModel() {
+    }
 
     public String location() {
         return location;

+ 65 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/model/UploadFilesResult.java

@@ -1,15 +1,71 @@
 package io.milvus.bulkwriter.model;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
 public class UploadFilesResult {
     private String stageName;
     private String path;
+
+    public UploadFilesResult() {
+    }
+
+    public UploadFilesResult(String stageName, String path) {
+        this.stageName = stageName;
+        this.path = path;
+    }
+
+    private UploadFilesResult(UploadFilesResultBuilder builder) {
+        this.stageName = builder.stageName;
+        this.path = builder.path;
+    }
+
+    public String getStageName() {
+        return stageName;
+    }
+
+    public void setStageName(String stageName) {
+        this.stageName = stageName;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    @Override
+    public String toString() {
+        return "UploadFilesResult{" +
+                "stageName='" + stageName + '\'' +
+                ", path='" + path + '\'' +
+                '}';
+    }
+
+    public static UploadFilesResultBuilder builder() {
+        return new UploadFilesResultBuilder();
+    }
+
+    public static class UploadFilesResultBuilder {
+        private String stageName;
+        private String path;
+
+        private UploadFilesResultBuilder() {
+            this.stageName = "";
+            this.path = "";
+        }
+
+        public UploadFilesResultBuilder stageName(String stageName) {
+            this.stageName = stageName;
+            return this;
+        }
+
+        public UploadFilesResultBuilder path(String path) {
+            this.path = path;
+            return this;
+        }
+
+        public UploadFilesResult build() {
+            return new UploadFilesResult(this);
+        }
+    }
 }

+ 48 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/describe/BaseDescribeImportRequest.java

@@ -19,22 +19,61 @@
 
 package io.milvus.bulkwriter.request.describe;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
 import java.io.Serializable;
 
-@Data
-@SuperBuilder(toBuilder = true)
-@AllArgsConstructor
-@NoArgsConstructor
 public class BaseDescribeImportRequest implements Serializable {
     private static final long serialVersionUID = -787626534606813089L;
+
     /**
      * If you are calling the cloud API, this parameter should be set to your API_KEY.
      * If you are using Milvus directly, this parameter should be set to your userName:password.
      */
     private String apiKey;
+
+    public BaseDescribeImportRequest() {
+    }
+
+    public BaseDescribeImportRequest(String apiKey) {
+        this.apiKey = apiKey;
+    }
+
+    protected BaseDescribeImportRequest(BaseDescribeImportRequestBuilder<?> builder) {
+        this.apiKey = builder.apiKey;
+    }
+
+    public String getApiKey() {
+        return apiKey;
+    }
+
+    public void setApiKey(String apiKey) {
+        this.apiKey = apiKey;
+    }
+
+    @Override
+    public String toString() {
+        return "BaseDescribeImportRequest{" +
+                "apiKey='" + apiKey + '\'' +
+                '}';
+    }
+
+    public static BaseDescribeImportRequestBuilder<?> builder() {
+        return new BaseDescribeImportRequestBuilder<>();
+    }
+
+    public static class BaseDescribeImportRequestBuilder<T extends BaseDescribeImportRequestBuilder<T>> {
+        private String apiKey = "";
+
+        protected BaseDescribeImportRequestBuilder() {
+            this.apiKey = "";
+        }
+
+        public T apiKey(String apiKey) {
+            this.apiKey = apiKey;
+            return (T) this;
+        }
+
+        public BaseDescribeImportRequest build() {
+            return new BaseDescribeImportRequest(this);
+        }
+    }
 }

+ 66 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/describe/CloudDescribeImportRequest.java

@@ -19,17 +19,74 @@
 
 package io.milvus.bulkwriter.request.describe;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 public class CloudDescribeImportRequest extends BaseDescribeImportRequest {
     private static final long serialVersionUID = -6479634844757426430L;
     private String clusterId;
     private String jobId;
+
+    public CloudDescribeImportRequest() {
+    }
+
+    public CloudDescribeImportRequest(String clusterId, String jobId) {
+        this.clusterId = clusterId;
+        this.jobId = jobId;
+    }
+
+    protected CloudDescribeImportRequest(CloudDescribeImportRequestBuilder builder) {
+        super(builder);
+        this.clusterId = builder.clusterId;
+        this.jobId = builder.jobId;
+    }
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public void setClusterId(String clusterId) {
+        this.clusterId = clusterId;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    @Override
+    public String toString() {
+        return "CloudDescribeImportRequest{" +
+                "clusterId='" + clusterId + '\'' +
+                ", jobId='" + jobId + '\'' +
+                '}';
+    }
+
+    public static CloudDescribeImportRequestBuilder builder() {
+        return new CloudDescribeImportRequestBuilder();
+    }
+
+    public static class CloudDescribeImportRequestBuilder extends BaseDescribeImportRequestBuilder<CloudDescribeImportRequestBuilder> {
+        private String clusterId;
+        private String jobId;
+
+        private CloudDescribeImportRequestBuilder() {
+            this.clusterId = "";
+            this.jobId = "";
+        }
+
+        public CloudDescribeImportRequestBuilder clusterId(String clusterId) {
+            this.clusterId = clusterId;
+            return this;
+        }
+
+        public CloudDescribeImportRequestBuilder jobId(String jobId) {
+            this.jobId = jobId;
+            return this;
+        }
+
+        public CloudDescribeImportRequest build() {
+            return new CloudDescribeImportRequest(this);
+        }
+    }
 }

+ 48 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/describe/MilvusDescribeImportRequest.java

@@ -19,16 +19,55 @@
 
 package io.milvus.bulkwriter.request.describe;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 public class MilvusDescribeImportRequest extends BaseDescribeImportRequest {
     private static final long serialVersionUID = 6123645882882199210L;
     private String jobId;
+
+    public MilvusDescribeImportRequest() {
+    }
+
+    public MilvusDescribeImportRequest(String jobId) {
+        this.jobId = jobId;
+    }
+
+    protected MilvusDescribeImportRequest(MilvusDescribeImportRequestBuilder builder) {
+        super(builder);
+        this.jobId = builder.jobId;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    @Override
+    public String toString() {
+        return "MilvusDescribeImportRequest{" +
+                ", jobId='" + jobId + '\'' +
+                '}';
+    }
+
+    public static MilvusDescribeImportRequestBuilder builder() {
+        return new MilvusDescribeImportRequestBuilder();
+    }
+
+    public static class MilvusDescribeImportRequestBuilder extends BaseDescribeImportRequestBuilder<MilvusDescribeImportRequestBuilder> {
+        private String jobId;
+
+        private MilvusDescribeImportRequestBuilder() {
+            this.jobId = "";
+        }
+
+        public MilvusDescribeImportRequestBuilder jobId(String jobId) {
+            this.jobId = jobId;
+            return this;
+        }
+
+        public MilvusDescribeImportRequest build() {
+            return new MilvusDescribeImportRequest(this);
+        }
+    }
 }

+ 66 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/import_/BaseImportRequest.java

@@ -19,18 +19,10 @@
 
 package io.milvus.bulkwriter.request.import_;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
 import java.io.Serializable;
+import java.util.HashMap;
 import java.util.Map;
 
-@Data
-@SuperBuilder(toBuilder = true)
-@AllArgsConstructor
-@NoArgsConstructor
 public class BaseImportRequest implements Serializable {
     private static final long serialVersionUID = 8192049841043084620L;
     /**
@@ -40,4 +32,69 @@ public class BaseImportRequest implements Serializable {
     private String apiKey;
 
     private Map<String, Object> options;
+
+    public BaseImportRequest() {
+    }
+
+    public BaseImportRequest(String apiKey, Map<String, Object> options) {
+        this.apiKey = apiKey;
+        this.options = options;
+    }
+
+    protected BaseImportRequest(BaseImportRequestBuilder<?> builder) {
+        this.apiKey = builder.apiKey;
+        this.options = builder.options;
+    }
+
+    public String getApiKey() {
+        return apiKey;
+    }
+
+    public void setApiKey(String apiKey) {
+        this.apiKey = apiKey;
+    }
+
+    public Map<String, Object> getOptions() {
+        return options;
+    }
+
+    public void setOptions(Map<String, Object> options) {
+        this.options = options;
+    }
+
+    @Override
+    public String toString() {
+        return "BaseImportRequest{" +
+                "apiKey='" + apiKey + '\'' +
+                "options=" + options +
+                '}';
+    }
+
+    public static BaseImportRequestBuilder<?> builder() {
+        return new BaseImportRequestBuilder<>();
+    }
+
+    public static class BaseImportRequestBuilder<T extends BaseImportRequestBuilder<T>> {
+        private String apiKey = "";
+        private Map<String, Object> options;
+
+        protected BaseImportRequestBuilder() {
+            this.apiKey = "";
+            this.options = new HashMap<>();
+        }
+
+        public T apiKey(String apiKey) {
+            this.apiKey = apiKey;
+            return (T) this;
+        }
+
+        public T options(Map<String, Object> options) {
+            this.options = options;
+            return (T) this;
+        }
+
+        public BaseImportRequest build() {
+            return new BaseImportRequest(this);
+        }
+    }
 }

+ 218 - 28
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/import_/CloudImportRequest.java

@@ -19,17 +19,9 @@
 
 package io.milvus.bulkwriter.request.import_;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
+import java.util.ArrayList;
 import java.util.List;
 
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 /*
   If you want to import data into a Zilliz cloud instance and your data is stored in a storage bucket,
   you can use this method to import the data from the bucket.
@@ -47,10 +39,10 @@ public class CloudImportRequest extends BaseImportRequest {
 
     /**
      * If the collection has partitionKey enabled:
-     *     - The partitionName parameter cannot be specified for import.
+     * - The partitionName parameter cannot be specified for import.
      * If the collection does not have partitionKey enabled:
-     *     - You may specify partitionName for the import.
-     *     - Defaults to the "default" partition if not specified.
+     * - You may specify partitionName for the import.
+     * - Defaults to the "default" partition if not specified.
      */
     private String partitionName;
 
@@ -58,21 +50,21 @@ public class CloudImportRequest extends BaseImportRequest {
      * Data import can be configured in multiple ways using `objectUrls`:
      * <p>
      * 1. Multi-path import (multiple folders or files):
-     *    "objectUrls": [
-     *        ["s3://bucket-name/parquet-folder-1/1.parquet"],
-     *        ["s3://bucket-name/parquet-folder-2/1.parquet"],
-     *        ["s3://bucket-name/parquet-folder-3/"]
-     *    ]
+     * "objectUrls": [
+     * ["s3://bucket-name/parquet-folder-1/1.parquet"],
+     * ["s3://bucket-name/parquet-folder-2/1.parquet"],
+     * ["s3://bucket-name/parquet-folder-3/"]
+     * ]
      * <p>
      * 2. Folder import:
-     *    "objectUrls": [
-     *        ["s3://bucket-name/parquet-folder/"]
-     *    ]
+     * "objectUrls": [
+     * ["s3://bucket-name/parquet-folder/"]
+     * ]
      * <p>
      * 3. Single file import:
-     *    "objectUrls": [
-     *        ["s3://bucket-name/parquet-folder/1.parquet"]
-     *    ]
+     * "objectUrls": [
+     * ["s3://bucket-name/parquet-folder/1.parquet"]
+     * ]
      */
     private List<List<String>> objectUrls;
 
@@ -80,20 +72,218 @@ public class CloudImportRequest extends BaseImportRequest {
      * Use `objectUrls` instead for more flexible multi-path configuration.
      * <p>
      * Folder import:
-     *     "objectUrl": "s3://bucket-name/parquet-folder/"
+     * "objectUrl": "s3://bucket-name/parquet-folder/"
      * <p>
      * File import:
-     *     "objectUrl": "s3://bucket-name/parquet-folder/1.parquet"
+     * "objectUrl": "s3://bucket-name/parquet-folder/1.parquet"
      */
     @Deprecated
     private String objectUrl;
 
-    /** Specify `accessKey` and `secretKey`; for short-term credentials, also include `token`. */
+    /**
+     * Specify `accessKey` and `secretKey`; for short-term credentials, also include `token`.
+     */
     private String accessKey;
 
-    /** Specify `accessKey` and `secretKey`; for short-term credentials, also include `token`. */
+    /**
+     * Specify `accessKey` and `secretKey`; for short-term credentials, also include `token`.
+     */
     private String secretKey;
 
-    /** Specify `accessKey` and `secretKey`; for short-term credentials, also include `token`. */
+    /**
+     * Specify `accessKey` and `secretKey`; for short-term credentials, also include `token`.
+     */
     private String token;
+
+    public CloudImportRequest() {
+    }
+
+    public CloudImportRequest(String clusterId, String dbName, String collectionName, String partitionName,
+                              List<List<String>> objectUrls, String accessKey, String secretKey, String token) {
+        this.clusterId = clusterId;
+        this.dbName = dbName;
+        this.collectionName = collectionName;
+        this.partitionName = partitionName;
+        this.objectUrls = objectUrls;
+        this.accessKey = accessKey;
+        this.secretKey = secretKey;
+        this.token = token;
+    }
+
+    protected CloudImportRequest(CloudImportRequestBuilder builder) {
+        super(builder);
+        this.clusterId = builder.clusterId;
+        this.dbName = builder.dbName;
+        this.collectionName = builder.collectionName;
+        this.partitionName = builder.partitionName;
+        this.objectUrls = builder.objectUrls;
+        this.objectUrl = builder.objectUrl;
+        this.accessKey = builder.accessKey;
+        this.secretKey = builder.secretKey;
+        this.token = builder.token;
+    }
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public void setClusterId(String clusterId) {
+        this.clusterId = clusterId;
+    }
+
+    public String getDbName() {
+        return dbName;
+    }
+
+    public void setDbName(String dbName) {
+        this.dbName = dbName;
+    }
+
+    public String getCollectionName() {
+        return collectionName;
+    }
+
+    public void setCollectionName(String collectionName) {
+        this.collectionName = collectionName;
+    }
+
+    public String getPartitionName() {
+        return partitionName;
+    }
+
+    public void setPartitionName(String partitionName) {
+        this.partitionName = partitionName;
+    }
+
+    public List<List<String>> getObjectUrls() {
+        return objectUrls;
+    }
+
+    public void setObjectUrls(List<List<String>> objectUrls) {
+        this.objectUrls = objectUrls;
+    }
+
+    public String getObjectUrl() {
+        return objectUrl;
+    }
+
+    public void setObjectUrl(String objectUrl) {
+        this.objectUrl = objectUrl;
+    }
+
+    public String getAccessKey() {
+        return accessKey;
+    }
+
+    public void setAccessKey(String accessKey) {
+        this.accessKey = accessKey;
+    }
+
+    public String getSecretKey() {
+        return secretKey;
+    }
+
+    public void setSecretKey(String secretKey) {
+        this.secretKey = secretKey;
+    }
+
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(String token) {
+        this.token = token;
+    }
+
+    @Override
+    public String toString() {
+        return "CloudImportRequest{" +
+                "clusterId='" + clusterId + '\'' +
+                ", dbName='" + dbName + '\'' +
+                ", collectionName='" + collectionName + '\'' +
+                ", partitionName='" + partitionName + '\'' +
+                ", objectUrls=" + objectUrls +
+                ", objectUrl='" + objectUrl + '\'' +
+                ", accessKey='" + accessKey + '\'' +
+                ", secretKey='" + secretKey + '\'' +
+                ", token='" + token + '\'' +
+                '}';
+    }
+
+    public static CloudImportRequestBuilder builder() {
+        return new CloudImportRequestBuilder();
+    }
+
+    public static class CloudImportRequestBuilder extends BaseImportRequestBuilder<CloudImportRequestBuilder> {
+        private String clusterId;
+        private String dbName;
+        private String collectionName;
+        private String partitionName;
+        private List<List<String>> objectUrls;
+        private String objectUrl;
+        private String accessKey;
+        private String secretKey;
+        private String token;
+
+        private CloudImportRequestBuilder() {
+            this.clusterId = "";
+            this.dbName = "";
+            this.collectionName = "";
+            this.partitionName = "";
+            this.objectUrls = new ArrayList<>();
+            this.objectUrl = "";
+            this.accessKey = "";
+            this.secretKey = "";
+            this.token = "";
+        }
+
+        public CloudImportRequestBuilder clusterId(String clusterId) {
+            this.clusterId = clusterId;
+            return this;
+        }
+
+        public CloudImportRequestBuilder dbName(String dbName) {
+            this.dbName = dbName;
+            return this;
+        }
+
+        public CloudImportRequestBuilder collectionName(String collectionName) {
+            this.collectionName = collectionName;
+            return this;
+        }
+
+        public CloudImportRequestBuilder partitionName(String partitionName) {
+            this.partitionName = partitionName;
+            return this;
+        }
+
+        public CloudImportRequestBuilder objectUrls(List<List<String>> objectUrls) {
+            this.objectUrls = objectUrls;
+            return this;
+        }
+
+        public CloudImportRequestBuilder objectUrl(String objectUrl) {
+            this.objectUrl = objectUrl;
+            return this;
+        }
+
+        public CloudImportRequestBuilder accessKey(String accessKey) {
+            this.accessKey = accessKey;
+            return this;
+        }
+
+        public CloudImportRequestBuilder secretKey(String secretKey) {
+            this.secretKey = secretKey;
+            return this;
+        }
+
+        public CloudImportRequestBuilder token(String token) {
+            this.token = token;
+            return this;
+        }
+
+        public CloudImportRequest build() {
+            return new CloudImportRequest(this);
+        }
+    }
 }

+ 114 - 20
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/import_/MilvusImportRequest.java

@@ -19,17 +19,9 @@
 
 package io.milvus.bulkwriter.request.import_;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
+import java.util.ArrayList;
 import java.util.List;
 
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 /*
   If you want to import data into open-source Milvus,
   you can use this method to import the data files stored in the bucket where Milvus resides.
@@ -45,10 +37,10 @@ public class MilvusImportRequest extends BaseImportRequest {
 
     /**
      * If the collection has partitionKey enabled:
-     *     - The partitionName parameter cannot be specified for import.
+     * - The partitionName parameter cannot be specified for import.
      * If the collection does not have partitionKey enabled:
-     *     - You may specify partitionName for the import.
-     *     - Defaults to the "default" partition if not specified.
+     * - You may specify partitionName for the import.
+     * - Defaults to the "default" partition if not specified.
      */
     private String partitionName;
 
@@ -56,16 +48,118 @@ public class MilvusImportRequest extends BaseImportRequest {
      * Data import can be configured in multiple ways using `files`:
      * <p>
      * 1. Multi-path import (multiple files):
-     *    "files": [
-     *        ["parquet-folder-1/1.parquet"],
-     *        ["parquet-folder-2/1.parquet"],
-     *        ["parquet-folder-3/1.parquet"]
-     *    ]
+     * "files": [
+     * ["parquet-folder-1/1.parquet"],
+     * ["parquet-folder-2/1.parquet"],
+     * ["parquet-folder-3/1.parquet"]
+     * ]
      * <p>
      * 2. Single file import:
-     *    "files": [
-     *        ["parquet-folder/1.parquet"]
-     *    ]
+     * "files": [
+     * ["parquet-folder/1.parquet"]
+     * ]
      */
     private List<List<String>> files;
+
+    public MilvusImportRequest() {
+    }
+
+    public MilvusImportRequest(String dbName, String collectionName, String partitionName, List<List<String>> files) {
+        this.dbName = dbName;
+        this.collectionName = collectionName;
+        this.partitionName = partitionName;
+        this.files = files;
+    }
+
+    protected MilvusImportRequest(MilvusImportRequestBuilder builder) {
+        super(builder);
+        this.dbName = builder.dbName;
+        this.collectionName = builder.collectionName;
+        this.partitionName = builder.partitionName;
+        this.files = builder.files;
+    }
+
+    public String getDbName() {
+        return dbName;
+    }
+
+    public void setDbName(String dbName) {
+        this.dbName = dbName;
+    }
+
+    public String getCollectionName() {
+        return collectionName;
+    }
+
+    public void setCollectionName(String collectionName) {
+        this.collectionName = collectionName;
+    }
+
+    public String getPartitionName() {
+        return partitionName;
+    }
+
+    public void setPartitionName(String partitionName) {
+        this.partitionName = partitionName;
+    }
+
+    public List<List<String>> getFiles() {
+        return files;
+    }
+
+    public void setFiles(List<List<String>> files) {
+        this.files = files;
+    }
+
+    @Override
+    public String toString() {
+        return "MilvusImportRequest{" +
+                "dbName='" + dbName + '\'' +
+                ", collectionName='" + collectionName + '\'' +
+                ", partitionName='" + partitionName + '\'' +
+                ", files=" + files +
+                '}';
+    }
+
+    public static MilvusImportRequestBuilder builder() {
+        return new MilvusImportRequestBuilder();
+    }
+
+    public static class MilvusImportRequestBuilder extends BaseImportRequestBuilder<MilvusImportRequestBuilder> {
+        private String dbName;
+        private String collectionName;
+        private String partitionName;
+        private List<List<String>> files;
+
+        private MilvusImportRequestBuilder() {
+            this.dbName = "";
+            this.collectionName = "";
+            this.partitionName = "";
+            this.files = new ArrayList<>();
+        }
+
+        public MilvusImportRequestBuilder dbName(String dbName) {
+            this.dbName = dbName;
+            return this;
+        }
+
+        public MilvusImportRequestBuilder collectionName(String collectionName) {
+            this.collectionName = collectionName;
+            return this;
+        }
+
+        public MilvusImportRequestBuilder partitionName(String partitionName) {
+            this.partitionName = partitionName;
+            return this;
+        }
+
+        public MilvusImportRequestBuilder files(List<List<String>> files) {
+            this.files = files;
+            return this;
+        }
+
+        public MilvusImportRequest build() {
+            return new MilvusImportRequest(this);
+        }
+    }
 }

+ 154 - 23
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/import_/StageImportRequest.java

@@ -19,17 +19,9 @@
 
 package io.milvus.bulkwriter.request.import_;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
+import java.util.ArrayList;
 import java.util.List;
 
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 /*
   If you want to import data into a Zilliz cloud instance and your data is stored in a Zilliz stage,
   you can use this method to import the data from the stage.
@@ -46,10 +38,10 @@ public class StageImportRequest extends BaseImportRequest {
 
     /**
      * If the collection has partitionKey enabled:
-     *     - The partitionName parameter cannot be specified for import.
+     * - The partitionName parameter cannot be specified for import.
      * If the collection does not have partitionKey enabled:
-     *     - You may specify partitionName for the import.
-     *     - Defaults to the "default" partition if not specified.
+     * - You may specify partitionName for the import.
+     * - Defaults to the "default" partition if not specified.
      */
     private String partitionName;
 
@@ -59,21 +51,160 @@ public class StageImportRequest extends BaseImportRequest {
      * Data import can be configured in multiple ways using `dataPaths`:
      * <p>
      * 1. Multi-path import (multiple folders or files):
-     *    "dataPaths": [
-     *        ["parquet-folder-1/1.parquet"],
-     *        ["parquet-folder-2/1.parquet"],
-     *        ["parquet-folder-3/"]
-     *    ]
+     * "dataPaths": [
+     * ["parquet-folder-1/1.parquet"],
+     * ["parquet-folder-2/1.parquet"],
+     * ["parquet-folder-3/"]
+     * ]
      * <p>
      * 2. Folder import:
-     *    "dataPaths": [
-     *        ["parquet-folder/"]
-     *    ]
+     * "dataPaths": [
+     * ["parquet-folder/"]
+     * ]
      * <p>
      * 3. Single file import:
-     *    "dataPaths": [
-     *        ["parquet-folder/1.parquet"]
-     *    ]
+     * "dataPaths": [
+     * ["parquet-folder/1.parquet"]
+     * ]
      */
     private List<List<String>> dataPaths;
+
+    public StageImportRequest() {
+    }
+
+    public StageImportRequest(String clusterId, String dbName, String collectionName, String partitionName,
+                              String stageName, List<List<String>> dataPaths) {
+        this.clusterId = clusterId;
+        this.dbName = dbName;
+        this.collectionName = collectionName;
+        this.partitionName = partitionName;
+        this.stageName = stageName;
+        this.dataPaths = dataPaths;
+    }
+
+    protected StageImportRequest(StageImportRequestBuilder builder) {
+        super(builder);
+        this.clusterId = builder.clusterId;
+        this.dbName = builder.dbName;
+        this.collectionName = builder.collectionName;
+        this.partitionName = builder.partitionName;
+        this.stageName = builder.stageName;
+        this.dataPaths = builder.dataPaths;
+    }
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public void setClusterId(String clusterId) {
+        this.clusterId = clusterId;
+    }
+
+    public String getDbName() {
+        return dbName;
+    }
+
+    public void setDbName(String dbName) {
+        this.dbName = dbName;
+    }
+
+    public String getCollectionName() {
+        return collectionName;
+    }
+
+    public void setCollectionName(String collectionName) {
+        this.collectionName = collectionName;
+    }
+
+    public String getPartitionName() {
+        return partitionName;
+    }
+
+    public void setPartitionName(String partitionName) {
+        this.partitionName = partitionName;
+    }
+
+    public String getStageName() {
+        return stageName;
+    }
+
+    public void setStageName(String stageName) {
+        this.stageName = stageName;
+    }
+
+    public List<List<String>> getDataPaths() {
+        return dataPaths;
+    }
+
+    public void setDataPaths(List<List<String>> dataPaths) {
+        this.dataPaths = dataPaths;
+    }
+
+    @Override
+    public String toString() {
+        return "StageImportRequest{" +
+                "clusterId='" + clusterId + '\'' +
+                ", dbName='" + dbName + '\'' +
+                ", collectionName='" + collectionName + '\'' +
+                ", partitionName='" + partitionName + '\'' +
+                ", stageName='" + stageName + '\'' +
+                ", dataPaths=" + dataPaths +
+                '}';
+    }
+
+    public static StageImportRequestBuilder builder() {
+        return new StageImportRequestBuilder();
+    }
+
+    public static class StageImportRequestBuilder extends BaseImportRequestBuilder<StageImportRequestBuilder> {
+        private String clusterId;
+        private String dbName;
+        private String collectionName;
+        private String partitionName;
+        private String stageName;
+        private List<List<String>> dataPaths;
+
+        private StageImportRequestBuilder() {
+            this.clusterId = "";
+            this.dbName = "";
+            this.collectionName = "";
+            this.partitionName = "";
+            this.stageName = "";
+            this.dataPaths = new ArrayList<>();
+        }
+
+        public StageImportRequestBuilder clusterId(String clusterId) {
+            this.clusterId = clusterId;
+            return this;
+        }
+
+        public StageImportRequestBuilder dbName(String dbName) {
+            this.dbName = dbName;
+            return this;
+        }
+
+        public StageImportRequestBuilder collectionName(String collectionName) {
+            this.collectionName = collectionName;
+            return this;
+        }
+
+        public StageImportRequestBuilder partitionName(String partitionName) {
+            this.partitionName = partitionName;
+            return this;
+        }
+
+        public StageImportRequestBuilder stageName(String stageName) {
+            this.stageName = stageName;
+            return this;
+        }
+
+        public StageImportRequestBuilder dataPaths(List<List<String>> dataPaths) {
+            this.dataPaths = dataPaths;
+            return this;
+        }
+
+        public StageImportRequest build() {
+            return new StageImportRequest(this);
+        }
+    }
 }

+ 47 - 10
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/list/BaseListImportJobsRequest.java

@@ -19,18 +19,8 @@
 
 package io.milvus.bulkwriter.request.list;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
 import java.io.Serializable;
 
-
-@Data
-@SuperBuilder(toBuilder = true)
-@AllArgsConstructor
-@NoArgsConstructor
 public class BaseListImportJobsRequest implements Serializable {
     private static final long serialVersionUID = -1890380396466908530L;
     /**
@@ -38,4 +28,51 @@ public class BaseListImportJobsRequest implements Serializable {
      * If you are using Milvus directly, this parameter should be set to your userName:password.
      */
     private String apiKey;
+
+    protected BaseListImportJobsRequest() {
+    }
+
+    protected BaseListImportJobsRequest(String apiKey) {
+        this.apiKey = apiKey;
+    }
+
+    protected BaseListImportJobsRequest(BaseListImportJobsRequestBuilder<?> builder) {
+        this.apiKey = builder.apiKey;
+    }
+
+    public String getApiKey() {
+        return apiKey;
+    }
+
+    public void setApiKey(String apiKey) {
+        this.apiKey = apiKey;
+    }
+
+    @Override
+    public String toString() {
+        return "BaseListImportJobsRequest{" +
+                "apiKey='" + apiKey + '\'' +
+                '}';
+    }
+
+    public static BaseListImportJobsRequestBuilder<?> builder() {
+        return new BaseListImportJobsRequestBuilder<>();
+    }
+
+    public static class BaseListImportJobsRequestBuilder<T extends BaseListImportJobsRequestBuilder<T>> {
+        private String apiKey = "";
+
+        protected BaseListImportJobsRequestBuilder() {
+            this.apiKey = "";
+        }
+
+        public T apiKey(String apiKey) {
+            this.apiKey = apiKey;
+            return (T) this;
+        }
+
+        public BaseListImportJobsRequest build() {
+            return new BaseListImportJobsRequest(this);
+        }
+    }
 }

+ 84 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/list/CloudListImportJobsRequest.java

@@ -19,18 +19,93 @@
 
 package io.milvus.bulkwriter.request.list;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 public class CloudListImportJobsRequest extends BaseListImportJobsRequest {
     private static final long serialVersionUID = -3380786382584854649L;
     private String clusterId;
     private Integer pageSize;
     private Integer currentPage;
+
+    protected CloudListImportJobsRequest() {
+    }
+
+    protected CloudListImportJobsRequest(String clusterId, Integer pageSize, Integer currentPage) {
+        this.clusterId = clusterId;
+        this.pageSize = pageSize;
+        this.currentPage = currentPage;
+    }
+
+    protected CloudListImportJobsRequest(CloudListImportJobsRequestBuilder builder) {
+        super(builder);
+        this.clusterId = builder.clusterId;
+        this.pageSize = builder.pageSize;
+        this.currentPage = builder.currentPage;
+    }
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public void setClusterId(String clusterId) {
+        this.clusterId = clusterId;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public Integer getCurrentPage() {
+        return currentPage;
+    }
+
+    public void setCurrentPage(Integer currentPage) {
+        this.currentPage = currentPage;
+    }
+
+    @Override
+    public String toString() {
+        return "CloudListImportJobsRequest{" +
+                "clusterId='" + clusterId + '\'' +
+                "pageSize=" + pageSize +
+                "currentPage=" + currentPage +
+                '}';
+    }
+
+    public static CloudListImportJobsRequestBuilder builder() {
+        return new CloudListImportJobsRequestBuilder();
+    }
+
+    public static class CloudListImportJobsRequestBuilder extends BaseListImportJobsRequestBuilder<CloudListImportJobsRequestBuilder> {
+        private String clusterId;
+        private Integer pageSize;
+        private Integer currentPage;
+
+        private CloudListImportJobsRequestBuilder() {
+            this.clusterId = "";
+            this.pageSize = 0;
+            this.currentPage = 0;
+        }
+
+        public CloudListImportJobsRequestBuilder clusterId(String clusterId) {
+            this.clusterId = clusterId;
+            return this;
+        }
+
+        public CloudListImportJobsRequestBuilder pageSize(Integer pageSize) {
+            this.pageSize = pageSize;
+            return this;
+        }
+
+        public CloudListImportJobsRequestBuilder currentPage(Integer currentPage) {
+            this.currentPage = currentPage;
+            return this;
+        }
+
+        public CloudListImportJobsRequest build() {
+            return new CloudListImportJobsRequest(this);
+        }
+    }
 }

+ 48 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/list/MilvusListImportJobsRequest.java

@@ -19,16 +19,55 @@
 
 package io.milvus.bulkwriter.request.list;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 public class MilvusListImportJobsRequest extends BaseListImportJobsRequest {
     private static final long serialVersionUID = 8957739122547766268L;
     private String collectionName;
+
+    protected MilvusListImportJobsRequest() {
+    }
+
+    protected MilvusListImportJobsRequest(String collectionName) {
+        this.collectionName = collectionName;
+    }
+
+    protected MilvusListImportJobsRequest(MilvusListImportJobsRequestBuilder builder) {
+        super(builder);
+        this.collectionName = builder.collectionName;
+    }
+
+    public String getCollectionName() {
+        return collectionName;
+    }
+
+    public void setCollectionName(String collectionName) {
+        this.collectionName = collectionName;
+    }
+
+    @Override
+    public String toString() {
+        return "MilvusListImportJobsRequest{" +
+                "collectionName='" + collectionName + '\'' +
+                '}';
+    }
+
+    public static MilvusListImportJobsRequestBuilder builder() {
+        return new MilvusListImportJobsRequestBuilder();
+    }
+
+    public static class MilvusListImportJobsRequestBuilder extends BaseListImportJobsRequestBuilder<MilvusListImportJobsRequestBuilder> {
+        private String collectionName;
+
+        private MilvusListImportJobsRequestBuilder() {
+            this.collectionName = "";
+        }
+
+        public MilvusListImportJobsRequestBuilder collectionName(String collectionName) {
+            this.collectionName = collectionName;
+            return this;
+        }
+
+        public MilvusListImportJobsRequest build() {
+            return new MilvusListImportJobsRequest(this);
+        }
+    }
 }

+ 66 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/ApplyStageRequest.java

@@ -19,16 +19,73 @@
 
 package io.milvus.bulkwriter.request.stage;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 public class ApplyStageRequest extends BaseStageRequest {
     private String stageName;
     private String path;
+
+    protected ApplyStageRequest() {
+    }
+
+    protected ApplyStageRequest(String stageName, String path) {
+        this.stageName = stageName;
+        this.path = path;
+    }
+
+    protected ApplyStageRequest(ApplyStageRequestBuilder builder) {
+        super(builder);
+        this.stageName = builder.stageName;
+        this.path = builder.path;
+    }
+
+    public String getStageName() {
+        return stageName;
+    }
+
+    public void setStageName(String stageName) {
+        this.stageName = stageName;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    @Override
+    public String toString() {
+        return "ApplyStageRequest{" +
+                "stageName='" + stageName + '\'' +
+                ", path='" + path + '\'' +
+                '}';
+    }
+
+    public static ApplyStageRequestBuilder builder() {
+        return new ApplyStageRequestBuilder();
+    }
+
+    public static class ApplyStageRequestBuilder extends BaseStageRequestBuilder<ApplyStageRequestBuilder> {
+        private String stageName;
+        private String path;
+
+        private ApplyStageRequestBuilder() {
+            this.stageName = "";
+            this.path = "";
+        }
+
+        public ApplyStageRequestBuilder stageName(String stageName) {
+            this.stageName = stageName;
+            return this;
+        }
+
+        public ApplyStageRequestBuilder path(String path) {
+            this.path = path;
+            return this;
+        }
+
+        public ApplyStageRequest build() {
+            return new ApplyStageRequest(this);
+        }
+    }
 }

+ 66 - 10
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/BaseStageRequest.java

@@ -19,24 +19,80 @@
 
 package io.milvus.bulkwriter.request.stage;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
 import java.io.Serializable;
+import java.util.HashMap;
 import java.util.Map;
 
-@Data
-@SuperBuilder(toBuilder = true)
-@AllArgsConstructor
-@NoArgsConstructor
 public class BaseStageRequest implements Serializable {
     private static final long serialVersionUID = 8192049841043084620L;
     /**
      * If you are calling the cloud API, this parameter needs to be filled in; otherwise, you can ignore it.
      */
     private String apiKey;
-
     private Map<String, Object> options;
+
+    protected BaseStageRequest() {
+    }
+
+    protected BaseStageRequest(String apiKey, Map<String, Object> options) {
+        this.apiKey = apiKey;
+        this.options = options;
+    }
+
+    protected BaseStageRequest(BaseStageRequestBuilder<?> builder) {
+        this.apiKey = builder.apiKey;
+        this.options = builder.options;
+    }
+
+    public String getApiKey() {
+        return apiKey;
+    }
+
+    public void setApiKey(String apiKey) {
+        this.apiKey = apiKey;
+    }
+
+    public Map<String, Object> getOptions() {
+        return options;
+    }
+
+    public void setOptions(Map<String, Object> options) {
+        this.options = options;
+    }
+
+    @Override
+    public String toString() {
+        return "BaseStageRequest{" +
+                "apiKey='" + apiKey + '\'' +
+                "options=" + options +
+                '}';
+    }
+
+    public static BaseStageRequestBuilder<?> builder() {
+        return new BaseStageRequestBuilder<>();
+    }
+
+    public static class BaseStageRequestBuilder<T extends BaseStageRequestBuilder<T>> {
+        private String apiKey;
+        private Map<String, Object> options;
+
+        protected BaseStageRequestBuilder() {
+            this.apiKey = "";
+            this.options = new HashMap<>();
+        }
+
+        public T apiKey(String apiKey) {
+            this.apiKey = apiKey;
+            return (T) this;
+        }
+
+        public T options(Map<String, Object> options) {
+            this.options = options;
+            return (T) this;
+        }
+
+        public BaseStageRequest build() {
+            return new BaseStageRequest(this);
+        }
+    }
 }

+ 83 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/CreateStageRequest.java

@@ -19,17 +19,91 @@
 
 package io.milvus.bulkwriter.request.stage;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 public class CreateStageRequest {
     private String projectId;
     private String regionId;
     private String stageName;
+
+    public CreateStageRequest() {
+    }
+
+    public CreateStageRequest(String projectId, String regionId, String stageName) {
+        this.projectId = projectId;
+        this.regionId = regionId;
+        this.stageName = stageName;
+    }
+
+    protected CreateStageRequest(CreateStageRequestBuilder builder) {
+        this.projectId = builder.projectId;
+        this.regionId = builder.regionId;
+        this.stageName = builder.stageName;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getRegionId() {
+        return regionId;
+    }
+
+    public void setRegionId(String regionId) {
+        this.regionId = regionId;
+    }
+
+    public String getStageName() {
+        return stageName;
+    }
+
+    public void setStageName(String stageName) {
+        this.stageName = stageName;
+    }
+
+    @Override
+    public String toString() {
+        return "CreateStageRequest{" +
+                "projectId='" + projectId + '\'' +
+                ", regionId='" + regionId + '\'' +
+                ", stageName='" + stageName + '\'' +
+                '}';
+    }
+
+    public static CreateStageRequestBuilder builder() {
+        return new CreateStageRequestBuilder();
+    }
+
+    public static class CreateStageRequestBuilder {
+        private String projectId;
+        private String regionId;
+        private String stageName;
+
+        private CreateStageRequestBuilder() {
+            this.projectId = "";
+            this.regionId = "";
+            this.stageName = "";
+        }
+
+        public CreateStageRequestBuilder projectId(String projectId) {
+            this.projectId = projectId;
+            return this;
+        }
+
+        public CreateStageRequestBuilder regionId(String regionId) {
+            this.regionId = regionId;
+            return this;
+        }
+
+        public CreateStageRequestBuilder stageName(String stageName) {
+            this.stageName = stageName;
+            return this;
+        }
+
+        public CreateStageRequest build() {
+            return new CreateStageRequest(this);
+        }
+    }
 }

+ 47 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/DeleteStageRequest.java

@@ -19,15 +19,53 @@
 
 package io.milvus.bulkwriter.request.stage;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 public class DeleteStageRequest {
     private String stageName;
+
+    public DeleteStageRequest() {
+    }
+
+    public DeleteStageRequest(String stageName) {
+        this.stageName = stageName;
+    }
+
+    protected DeleteStageRequest(DeleteStageRequestBuilder builder) {
+        this.stageName = builder.stageName;
+    }
+
+    public String getStageName() {
+        return stageName;
+    }
+
+    public void setStageName(String stageName) {
+        this.stageName = stageName;
+    }
+
+    @Override
+    public String toString() {
+        return "DeleteStageRequest{" +
+                "stageName='" + stageName + '\'' +
+                '}';
+    }
+
+    public static DeleteStageRequestBuilder builder() {
+        return new DeleteStageRequestBuilder();
+    }
+
+    public static class DeleteStageRequestBuilder {
+        private String stageName;
+
+        private DeleteStageRequestBuilder() {
+            this.stageName = "";
+        }
+
+        public DeleteStageRequestBuilder stageName(String stageName) {
+            this.stageName = stageName;
+            return this;
+        }
+
+        public DeleteStageRequest build() {
+            return new DeleteStageRequest(this);
+        }
+    }
 }

+ 84 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/ListStagesRequest.java

@@ -19,17 +19,92 @@
 
 package io.milvus.bulkwriter.request.stage;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
+
 public class ListStagesRequest {
     private String projectId;
     private Integer pageSize;
     private Integer currentPage;
+
+    public ListStagesRequest() {
+    }
+
+    public ListStagesRequest(String projectId, Integer pageSize, Integer currentPage) {
+        this.projectId = projectId;
+        this.pageSize = pageSize;
+        this.currentPage = currentPage;
+    }
+
+    protected ListStagesRequest(ListStagesRequestBuilder builder) {
+        this.projectId = builder.projectId;
+        this.pageSize = builder.pageSize;
+        this.currentPage = builder.currentPage;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public Integer getCurrentPage() {
+        return currentPage;
+    }
+
+    public void setCurrentPage(Integer currentPage) {
+        this.currentPage = currentPage;
+    }
+
+    @Override
+    public String toString() {
+        return "ListStagesRequest{" +
+                "projectId='" + projectId + '\'' +
+                ", pageSize=" + pageSize +
+                ", currentPage=" + currentPage +
+                '}';
+    }
+
+    public static ListStagesRequestBuilder builder() {
+        return new ListStagesRequestBuilder();
+    }
+
+    public static class ListStagesRequestBuilder {
+        private String projectId;
+        private Integer pageSize;
+        private Integer currentPage;
+
+        private ListStagesRequestBuilder() {
+            this.projectId = "";
+            this.pageSize = 0;
+            this.currentPage = 0;
+        }
+
+        public ListStagesRequestBuilder projectId(String projectId) {
+            this.projectId = projectId;
+            return this;
+        }
+
+        public ListStagesRequestBuilder pageSize(Integer pageSize) {
+            this.pageSize = pageSize;
+            return this;
+        }
+
+        public ListStagesRequestBuilder currentPage(Integer currentPage) {
+            this.currentPage = currentPage;
+            return this;
+        }
+
+        public ListStagesRequest build() {
+            return new ListStagesRequest(this);
+        }
+    }
 }

+ 65 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/request/stage/UploadFilesRequest.java

@@ -19,15 +19,6 @@
 
 package io.milvus.bulkwriter.request.stage;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 public class UploadFilesRequest {
     /**
      * The full path of a local file or directory:
@@ -42,4 +33,69 @@ public class UploadFilesRequest {
      * To upload to a specific folder, end the path with a /, e.g., data/
      */
     private String targetStagePath;
+
+    public UploadFilesRequest() {
+    }
+
+    public UploadFilesRequest(String sourceFilePath, String targetStagePath) {
+        this.sourceFilePath = sourceFilePath;
+        this.targetStagePath = targetStagePath;
+    }
+
+    protected UploadFilesRequest(UploadFilesRequestBuilder builder) {
+        this.sourceFilePath = builder.sourceFilePath;
+        this.targetStagePath = builder.targetStagePath;
+    }
+
+    public String getSourceFilePath() {
+        return sourceFilePath;
+    }
+
+    public void setSourceFilePath(String sourceFilePath) {
+        this.sourceFilePath = sourceFilePath;
+    }
+
+    public String getTargetStagePath() {
+        return targetStagePath;
+    }
+
+    public void setTargetStagePath(String targetStagePath) {
+        this.targetStagePath = targetStagePath;
+    }
+
+    @Override
+    public String toString() {
+        return "UploadFilesRequest{" +
+                "sourceFilePath='" + sourceFilePath + '\'' +
+                ", targetStagePath='" + targetStagePath + '\'' +
+                '}';
+    }
+
+    public static UploadFilesRequestBuilder builder() {
+        return new UploadFilesRequestBuilder();
+    }
+
+    public static class UploadFilesRequestBuilder {
+        private String sourceFilePath;
+        private String targetStagePath;
+
+        private UploadFilesRequestBuilder() {
+            this.sourceFilePath = "";
+            this.targetStagePath = "";
+        }
+
+        public UploadFilesRequestBuilder sourceFilePath(String sourceFilePath) {
+            this.sourceFilePath = sourceFilePath;
+            return this;
+        }
+
+        public UploadFilesRequestBuilder targetStagePath(String targetStagePath) {
+            this.targetStagePath = targetStagePath;
+            return this;
+        }
+
+        public UploadFilesRequest build() {
+            return new UploadFilesRequest(this);
+        }
+    }
 }

+ 338 - 26
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/ApplyStageResponse.java

@@ -1,55 +1,367 @@
 package io.milvus.bulkwriter.response;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
 import java.io.Serializable;
 
 
-@Data
-@SuperBuilder
-@AllArgsConstructor
-@NoArgsConstructor
 public class ApplyStageResponse implements Serializable {
     private String endpoint;
-
     private String cloud;
-
     private String region;
-
     private String bucketName;
-
     private String uploadPath;
-
     private Credentials credentials;
-
     private Condition condition;
-
     private String stageName;
-
     private String stagePrefix;
 
-    @AllArgsConstructor
-    @NoArgsConstructor
-    @Data
-    @Builder
+    public ApplyStageResponse() {
+    }
+
+    public ApplyStageResponse(String endpoint, String cloud, String region, String bucketName, String uploadPath,
+                              Credentials credentials, Condition condition, String stageName, String stagePrefix) {
+        this.endpoint = endpoint;
+        this.cloud = cloud;
+        this.region = region;
+        this.bucketName = bucketName;
+        this.uploadPath = uploadPath;
+        this.credentials = credentials;
+        this.condition = condition;
+        this.stageName = stageName;
+        this.stagePrefix = stagePrefix;
+    }
+
+    private ApplyStageResponse(ApplyStageResponseBuilder builder) {
+        this.endpoint = builder.endpoint;
+        this.cloud = builder.cloud;
+        this.region = builder.region;
+        this.bucketName = builder.bucketName;
+        this.uploadPath = builder.uploadPath;
+        this.credentials = builder.credentials;
+        this.condition = builder.condition;
+        this.stageName = builder.stageName;
+        this.stagePrefix = builder.stagePrefix;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public void setEndpoint(String endpoint) {
+        this.endpoint = endpoint;
+    }
+
+    public String getCloud() {
+        return cloud;
+    }
+
+    public void setCloud(String cloud) {
+        this.cloud = cloud;
+    }
+
+    public String getRegion() {
+        return region;
+    }
+
+    public void setRegion(String region) {
+        this.region = region;
+    }
+
+    public String getBucketName() {
+        return bucketName;
+    }
+
+    public void setBucketName(String bucketName) {
+        this.bucketName = bucketName;
+    }
+
+    public String getUploadPath() {
+        return uploadPath;
+    }
+
+    public void setUploadPath(String uploadPath) {
+        this.uploadPath = uploadPath;
+    }
+
+    public Credentials getCredentials() {
+        return credentials;
+    }
+
+    public void setCredentials(Credentials credentials) {
+        this.credentials = credentials;
+    }
+
+    public Condition getCondition() {
+        return condition;
+    }
+
+    public void setCondition(Condition condition) {
+        this.condition = condition;
+    }
+
+    public String getStageName() {
+        return stageName;
+    }
+
+    public void setStageName(String stageName) {
+        this.stageName = stageName;
+    }
+
+    public String getStagePrefix() {
+        return stagePrefix;
+    }
+
+    public void setStagePrefix(String stagePrefix) {
+        this.stagePrefix = stagePrefix;
+    }
+
+    @Override
+    public String toString() {
+        return "ApplyStageResponse{" +
+                ", endpoint='" + endpoint + '\'' +
+                ", cloud='" + cloud + '\'' +
+                ", region='" + region + '\'' +
+                ", bucketName='" + bucketName + '\'' +
+                ", uploadPath='" + uploadPath + '\'' +
+                ", credentials=" + credentials +
+                ", condition=" + condition +
+                ", stageName='" + stageName + '\'' +
+                ", stagePrefix='" + stagePrefix + '\'' +
+                '}';
+    }
+
+    public static ApplyStageResponseBuilder builder() {
+        return new ApplyStageResponseBuilder();
+    }
+
+    public static class ApplyStageResponseBuilder {
+        private String endpoint;
+        private String cloud;
+        private String region;
+        private String bucketName;
+        private String uploadPath;
+        private Credentials credentials;
+        private Condition condition;
+        private String stageName;
+        private String stagePrefix;
+
+        private ApplyStageResponseBuilder() {
+            this.endpoint = "";
+            this.cloud = "";
+            this.region = "";
+            this.bucketName = "";
+            this.uploadPath = "";
+            this.credentials = new Credentials();
+            this.condition = new Condition();
+            this.stageName = "";
+            this.stagePrefix = "";
+        }
+
+        public ApplyStageResponseBuilder endpoint(String endpoint) {
+            this.endpoint = endpoint;
+            return this;
+        }
+
+        public ApplyStageResponseBuilder cloud(String cloud) {
+            this.cloud = cloud;
+            return this;
+        }
+
+        public ApplyStageResponseBuilder region(String region) {
+            this.region = region;
+            return this;
+        }
+
+        public ApplyStageResponseBuilder bucketName(String bucketName) {
+            this.bucketName = bucketName;
+            return this;
+        }
+
+        public ApplyStageResponseBuilder uploadPath(String uploadPath) {
+            this.uploadPath = uploadPath;
+            return this;
+        }
+
+        public ApplyStageResponseBuilder credentials(Credentials credentials) {
+            this.credentials = credentials;
+            return this;
+        }
+
+        public ApplyStageResponseBuilder condition(Condition condition) {
+            this.condition = condition;
+            return this;
+        }
+
+        public ApplyStageResponseBuilder stageName(String stageName) {
+            this.stageName = stageName;
+            return this;
+        }
+
+        public ApplyStageResponseBuilder stagePrefix(String stagePrefix) {
+            this.stagePrefix = stagePrefix;
+            return this;
+        }
+
+        public ApplyStageResponse build() {
+            return new ApplyStageResponse(this);
+        }
+    }
+
     public static class Credentials implements Serializable {
         private static final long serialVersionUID = 623702599895113789L;
         private String tmpAK;
         private String tmpSK;
         private String sessionToken;
         private String expireTime;
+
+        public Credentials() {
+        }
+
+        public Credentials(String tmpAK, String tmpSK, String sessionToken, String expireTime) {
+            this.tmpAK = tmpAK;
+            this.tmpSK = tmpSK;
+            this.sessionToken = sessionToken;
+            this.expireTime = expireTime;
+        }
+
+        private Credentials(CredentialsBuilder builder) {
+            this.tmpAK = builder.tmpAK;
+            this.tmpSK = builder.tmpSK;
+            this.sessionToken = builder.sessionToken;
+            this.expireTime = builder.expireTime;
+        }
+
+        public String getTmpAK() {
+            return tmpAK;
+        }
+
+        public void setTmpAK(String tmpAK) {
+            this.tmpAK = tmpAK;
+        }
+
+        public String getTmpSK() {
+            return tmpSK;
+        }
+
+        public void setTmpSK(String tmpSK) {
+            this.tmpSK = tmpSK;
+        }
+
+        public String getSessionToken() {
+            return sessionToken;
+        }
+
+        public void setSessionToken(String sessionToken) {
+            this.sessionToken = sessionToken;
+        }
+
+        public String getExpireTime() {
+            return expireTime;
+        }
+
+        public void setExpireTime(String expireTime) {
+            this.expireTime = expireTime;
+        }
+
+        @Override
+        public String toString() {
+            return "Credentials{" +
+                    ", tmpAK='" + tmpAK + '\'' +
+                    ", expireTime='" + expireTime + '\'' +
+                    '}';
+        }
+
+        public static CredentialsBuilder builder() {
+            return new CredentialsBuilder();
+        }
+
+        public static class CredentialsBuilder {
+            private String tmpAK;
+            private String tmpSK;
+            private String sessionToken;
+            private String expireTime;
+
+            private CredentialsBuilder() {
+                this.tmpAK = "";
+                this.tmpSK = "";
+                this.sessionToken = "";
+                this.expireTime = "";
+            }
+
+            public CredentialsBuilder tmpAK(String tmpAK) {
+                this.tmpAK = tmpAK;
+                return this;
+            }
+
+            public CredentialsBuilder tmpSK(String tmpSK) {
+                this.tmpSK = tmpSK;
+                return this;
+            }
+
+            public CredentialsBuilder sessionToken(String sessionToken) {
+                this.sessionToken = sessionToken;
+                return this;
+            }
+
+            public CredentialsBuilder expireTime(String expireTime) {
+                this.expireTime = expireTime;
+                return this;
+            }
+
+            public Credentials build() {
+                return new Credentials(this);
+            }
+        }
     }
 
-    @AllArgsConstructor
-    @NoArgsConstructor
-    @Data
-    @Builder
     public static class Condition implements Serializable {
         private static final long serialVersionUID = -2613029991242322109L;
         private Long maxContentLength;
+
+        public Condition() {
+        }
+
+        public Condition(Long maxContentLength) {
+            this.maxContentLength = maxContentLength;
+        }
+
+        private Condition(ConditionBuilder builder) {
+            this.maxContentLength = builder.maxContentLength;
+        }
+
+        public Long getMaxContentLength() {
+            return maxContentLength;
+        }
+
+        public void setMaxContentLength(Long maxContentLength) {
+            this.maxContentLength = maxContentLength;
+        }
+
+        @Override
+        public String toString() {
+            return "Condition{" +
+                    ", maxContentLength=" + maxContentLength +
+                    '}';
+        }
+
+        public static ConditionBuilder builder() {
+            return new ConditionBuilder();
+        }
+
+        public static class ConditionBuilder {
+            private Long maxContentLength;
+
+            private ConditionBuilder() {
+                this.maxContentLength = 0L;
+            }
+
+            public ConditionBuilder maxContentLength(Long maxContentLength) {
+                this.maxContentLength = maxContentLength;
+                return this;
+            }
+
+            public Condition build() {
+                return new Condition(this);
+            }
+        }
     }
 }

+ 47 - 10
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/BulkImportResponse.java

@@ -19,19 +19,56 @@
 
 package io.milvus.bulkwriter.response;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
 import java.io.Serializable;
 
-@Data
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
 public class BulkImportResponse implements Serializable {
     private static final long serialVersionUID = -7162743560382861611L;
-
     private String jobId;
+
+    public BulkImportResponse() {
+    }
+
+    public BulkImportResponse(String jobId) {
+        this.jobId = jobId;
+    }
+
+    private BulkImportResponse(BulkImportResponseBuilder builder) {
+        this.jobId = builder.jobId;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    @Override
+    public String toString() {
+        return "BulkImportResponse{" +
+                "jobId='" + jobId + '\'' +
+                '}';
+    }
+
+    public static BulkImportResponseBuilder builder() {
+        return new BulkImportResponseBuilder();
+    }
+
+    public static class BulkImportResponseBuilder {
+        private String jobId;
+
+        private BulkImportResponseBuilder() {
+            this.jobId = "";
+        }
+
+        public BulkImportResponseBuilder jobId(String jobId) {
+            this.jobId = jobId;
+            return this;
+        }
+
+        public BulkImportResponse build() {
+            return new BulkImportResponse(this);
+        }
+    }
 }

+ 350 - 25
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/GetImportProgressResponse.java

@@ -19,52 +19,377 @@
 
 package io.milvus.bulkwriter.response;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.List;
 
-@Data
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
 public class GetImportProgressResponse implements Serializable {
-
     private static final long serialVersionUID = -2302203037749197132L;
-
     private String jobId;
-
     private String collectionName;
-
     private String fileName;
-
     private Integer fileSize;
-
     private String state;
-
     private Integer progress;
-
     private String completeTime;
-
     private String reason;
-
     private Integer totalRows;
-
     private List<Detail> details;
 
-    @Data
-    @Builder
-    @AllArgsConstructor
-    @NoArgsConstructor
-    private static class Detail {
+    public GetImportProgressResponse() {
+    }
+
+    public GetImportProgressResponse(String jobId, String collectionName, String fileName, Integer fileSize,
+                                     String state, Integer progress, String completeTime, String reason,
+                                     Integer totalRows, List<Detail> details) {
+        this.jobId = jobId;
+        this.collectionName = collectionName;
+        this.fileName = fileName;
+        this.fileSize = fileSize;
+        this.state = state;
+        this.progress = progress;
+        this.completeTime = completeTime;
+        this.reason = reason;
+        this.totalRows = totalRows;
+        this.details = details;
+    }
+
+    private GetImportProgressResponse(GetImportProgressResponseBuilder builder) {
+        this.jobId = builder.jobId;
+        this.collectionName = builder.collectionName;
+        this.fileName = builder.fileName;
+        this.fileSize = builder.fileSize;
+        this.state = builder.state;
+        this.progress = builder.progress;
+        this.completeTime = builder.completeTime;
+        this.reason = builder.reason;
+        this.totalRows = builder.totalRows;
+        this.details = builder.details;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public String getCollectionName() {
+        return collectionName;
+    }
+
+    public void setCollectionName(String collectionName) {
+        this.collectionName = collectionName;
+    }
+
+    public String getFileName() {
+        return fileName;
+    }
+
+    public void setFileName(String fileName) {
+        this.fileName = fileName;
+    }
+
+    public Integer getFileSize() {
+        return fileSize;
+    }
+
+    public void setFileSize(Integer fileSize) {
+        this.fileSize = fileSize;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public Integer getProgress() {
+        return progress;
+    }
+
+    public void setProgress(Integer progress) {
+        this.progress = progress;
+    }
+
+    public String getCompleteTime() {
+        return completeTime;
+    }
+
+    public void setCompleteTime(String completeTime) {
+        this.completeTime = completeTime;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    public Integer getTotalRows() {
+        return totalRows;
+    }
+
+    public void setTotalRows(Integer totalRows) {
+        this.totalRows = totalRows;
+    }
+
+    public List<Detail> getDetails() {
+        return details;
+    }
+
+    public void setDetails(List<Detail> details) {
+        this.details = details;
+    }
+
+    @Override
+    public String toString() {
+        return "GetImportProgressResponse{" +
+                "jobId='" + jobId + '\'' +
+                ", collectionName='" + collectionName + '\'' +
+                ", fileName='" + fileName + '\'' +
+                ", fileSize=" + fileSize +
+                ", state='" + state + '\'' +
+                ", progress=" + progress +
+                ", completeTime='" + completeTime + '\'' +
+                ", reason='" + reason + '\'' +
+                ", totalRows=" + totalRows +
+                ", details=" + details +
+                '}';
+    }
+
+    public static Detail.DetailBuilder builder() {
+        return new Detail.DetailBuilder();
+    }
+
+    public static class GetImportProgressResponseBuilder {
+        private String jobId;
+        private String collectionName;
+        private String fileName;
+        private Integer fileSize;
+        private String state;
+        private Integer progress;
+        private String completeTime;
+        private String reason;
+        private Integer totalRows;
+        private List<Detail> details;
+
+        private GetImportProgressResponseBuilder() {
+            this.jobId = "";
+            this.collectionName = "";
+            this.fileName = "";
+            this.fileSize = 0;
+            this.state = "";
+            this.progress = 0;
+            this.completeTime = "";
+            this.reason = "";
+            this.totalRows = 0;
+            this.details = new ArrayList<>();
+        }
+
+        public GetImportProgressResponseBuilder jobId(String jobId) {
+            this.jobId = jobId;
+            return this;
+        }
+
+        public GetImportProgressResponseBuilder collectionName(String collectionName) {
+            this.collectionName = collectionName;
+            return this;
+        }
+
+        public GetImportProgressResponseBuilder fileName(String fileName) {
+            this.fileName = fileName;
+            return this;
+        }
+
+        public GetImportProgressResponseBuilder fileSize(Integer fileSize) {
+            this.fileSize = fileSize;
+            return this;
+        }
+
+        public GetImportProgressResponseBuilder state(String state) {
+            this.state = state;
+            return this;
+        }
+
+        public GetImportProgressResponseBuilder progress(Integer progress) {
+            this.progress = progress;
+            return this;
+        }
+
+        public GetImportProgressResponseBuilder completeTime(String completeTime) {
+            this.completeTime = completeTime;
+            return this;
+        }
+
+        public GetImportProgressResponseBuilder reason(String reason) {
+            this.reason = reason;
+            return this;
+        }
+
+        public GetImportProgressResponseBuilder totalRows(Integer totalRows) {
+            this.totalRows = totalRows;
+            return this;
+        }
+
+        public GetImportProgressResponseBuilder details(List<Detail> details) {
+            this.details = details;
+            return this;
+        }
+
+        public GetImportProgressResponse build() {
+            return new GetImportProgressResponse(this);
+        }
+    }
+
+    public static class Detail {
         private String fileName;
         private Integer fileSize;
         private String state;
         private Integer progress;
         private String completeTime;
         private String reason;
+
+        public Detail() {
+        }
+
+        public Detail(String fileName, Integer fileSize, String state, Integer progress, String completeTime, String reason) {
+            this.fileName = fileName;
+            this.fileSize = fileSize;
+            this.state = state;
+            this.progress = progress;
+            this.completeTime = completeTime;
+            this.reason = reason;
+        }
+
+        private Detail(DetailBuilder builder) {
+            this.fileName = builder.fileName;
+            this.fileSize = builder.fileSize;
+            this.state = builder.state;
+            this.progress = builder.progress;
+            this.completeTime = builder.completeTime;
+            this.reason = builder.reason;
+        }
+
+        public String getFileName() {
+            return fileName;
+        }
+
+        public void setFileName(String fileName) {
+            this.fileName = fileName;
+        }
+
+        public Integer getFileSize() {
+            return fileSize;
+        }
+
+        public void setFileSize(Integer fileSize) {
+            this.fileSize = fileSize;
+        }
+
+        public String getState() {
+            return state;
+        }
+
+        public void setState(String state) {
+            this.state = state;
+        }
+
+        public Integer getProgress() {
+            return progress;
+        }
+
+        public void setProgress(Integer progress) {
+            this.progress = progress;
+        }
+
+        public String getCompleteTime() {
+            return completeTime;
+        }
+
+        public void setCompleteTime(String completeTime) {
+            this.completeTime = completeTime;
+        }
+
+        public String getReason() {
+            return reason;
+        }
+
+        public void setReason(String reason) {
+            this.reason = reason;
+        }
+
+        @Override
+        public String toString() {
+            return "Detail{" +
+                    "fileName='" + fileName + '\'' +
+                    ", fileSize=" + fileSize +
+                    ", state='" + state + '\'' +
+                    ", progress=" + progress +
+                    ", completeTime='" + completeTime + '\'' +
+                    ", reason='" + reason + '\'' +
+                    '}';
+        }
+
+        public static DetailBuilder builder() {
+            return new DetailBuilder();
+        }
+
+        public static class DetailBuilder {
+            private String fileName;
+            private Integer fileSize;
+            private String state;
+            private Integer progress;
+            private String completeTime;
+            private String reason;
+
+            private DetailBuilder() {
+                this.fileName = "";
+                this.fileSize = 0;
+                this.state = "";
+                this.progress = 0;
+                this.completeTime = "";
+                this.reason = "";
+            }
+
+            public DetailBuilder fileName(String fileName) {
+                this.fileName = fileName;
+                return this;
+            }
+
+            public DetailBuilder fileSize(Integer fileSize) {
+                this.fileSize = fileSize;
+                return this;
+            }
+
+            public DetailBuilder state(String state) {
+                this.state = state;
+                return this;
+            }
+
+            public DetailBuilder progress(Integer progress) {
+                this.progress = progress;
+                return this;
+            }
+
+            public DetailBuilder completeTime(String completeTime) {
+                this.completeTime = completeTime;
+                return this;
+            }
+
+            public DetailBuilder reason(String reason) {
+                this.reason = reason;
+                return this;
+            }
+
+            public Detail build() {
+                return new Detail(this);
+            }
+        }
     }
 }

+ 101 - 14
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/ListImportJobsResponse.java

@@ -19,27 +19,114 @@
 
 package io.milvus.bulkwriter.response;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.List;
 
-@Data
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
 public class ListImportJobsResponse implements Serializable {
-
     private static final long serialVersionUID = -8400893490624599225L;
-
     private Integer count;
-
     private Integer currentPage;
-
     private Integer pageSize;
-
     private List<Record> records;
+
+    public ListImportJobsResponse() {
+    }
+
+    public ListImportJobsResponse(Integer count, Integer currentPage, Integer pageSize, List<Record> records) {
+        this.count = count;
+        this.currentPage = currentPage;
+        this.pageSize = pageSize;
+        this.records = records;
+    }
+
+    private ListImportJobsResponse(ListImportJobsResponseBuilder builder) {
+        this.count = builder.count;
+        this.currentPage = builder.currentPage;
+        this.pageSize = builder.pageSize;
+        this.records = builder.records;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    public Integer getCurrentPage() {
+        return currentPage;
+    }
+
+    public void setCurrentPage(Integer currentPage) {
+        this.currentPage = currentPage;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public List<Record> getRecords() {
+        return records;
+    }
+
+    public void setRecords(List<Record> records) {
+        this.records = records;
+    }
+
+    @Override
+    public String toString() {
+        return "ListImportJobsResponse{" +
+                ", count=" + count +
+                ", currentPage=" + currentPage +
+                ", pageSize=" + pageSize +
+                '}';
+    }
+
+    public static ListImportJobsResponseBuilder builder() {
+        return new ListImportJobsResponseBuilder();
+    }
+
+    public static class ListImportJobsResponseBuilder {
+        private Integer count;
+        private Integer currentPage;
+        private Integer pageSize;
+        private List<Record> records;
+
+        private ListImportJobsResponseBuilder() {
+            this.count = 0;
+            this.currentPage = 0;
+            this.pageSize = 0;
+            this.records = new ArrayList<>();
+        }
+
+        public ListImportJobsResponseBuilder count(Integer count) {
+            this.count = count;
+            return this;
+        }
+
+        public ListImportJobsResponseBuilder currentPage(Integer currentPage) {
+            this.currentPage = currentPage;
+            return this;
+        }
+
+        public ListImportJobsResponseBuilder pageSize(Integer pageSize) {
+            this.pageSize = pageSize;
+            return this;
+        }
+
+        public ListImportJobsResponseBuilder records(List<Record> records) {
+            this.records = records;
+            return this;
+        }
+
+        public ListImportJobsResponse build() {
+            return new ListImportJobsResponse(this);
+        }
+    }
 }

+ 83 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/Record.java

@@ -1,16 +1,90 @@
 package io.milvus.bulkwriter.response;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
 public class Record {
     private String collectionName;
     private String jobId;
     private String state;
+
+    public Record() {
+    }
+
+    public Record(String collectionName, String jobId, String state) {
+        this.collectionName = collectionName;
+        this.jobId = jobId;
+        this.state = state;
+    }
+
+    private Record(RecordBuilder builder) {
+        this.collectionName = builder.collectionName;
+        this.jobId = builder.jobId;
+        this.state = builder.state;
+    }
+
+    public String getCollectionName() {
+        return collectionName;
+    }
+
+    public void setCollectionName(String collectionName) {
+        this.collectionName = collectionName;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    @Override
+    public String toString() {
+        return "Record{" +
+                "collectionName='" + collectionName + '\'' +
+                ", jobId='" + jobId + '\'' +
+                ", state='" + state + '\'' +
+                '}';
+    }
+
+    public static RecordBuilder builder() {
+        return new RecordBuilder();
+    }
+
+    public static class RecordBuilder {
+        private String collectionName;
+        private String jobId;
+        private String state;
+
+        private RecordBuilder() {
+            this.collectionName = "";
+            this.jobId = "";
+            this.state = "";
+        }
+
+        public RecordBuilder collectionName(String collectionName) {
+            this.collectionName = collectionName;
+            return this;
+        }
+
+        public RecordBuilder jobId(String jobId) {
+            this.jobId = jobId;
+            return this;
+        }
+
+        public RecordBuilder state(String state) {
+            this.state = state;
+            return this;
+        }
+
+        public Record build() {
+            return new Record(this);
+        }
+    }
 }

+ 82 - 12
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/RestfulResponse.java

@@ -19,23 +19,93 @@
 
 package io.milvus.bulkwriter.response;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
 import java.io.Serializable;
 
-@Data
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
 public class RestfulResponse<T> implements Serializable {
     private static final long serialVersionUID = -7162743560382861611L;
-
     private int code;
-
     private String message;
-
     private T data;
+
+    public RestfulResponse() {
+    }
+
+    public RestfulResponse(int code, String message, T data) {
+        this.code = code;
+        this.message = message;
+        this.data = data;
+    }
+
+    private RestfulResponse(RestfulResponseBuilder<T> builder) {
+        this.code = builder.code;
+        this.message = builder.message;
+        this.data = builder.data;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    @Override
+    public String toString() {
+        return "RestfulResponse{" +
+                "code=" + code +
+                ", message='" + message + '\'' +
+                '}';
+    }
+
+    public static RestfulResponseBuilder<?> builder() {
+        return new RestfulResponseBuilder<>();
+    }
+
+    public static class RestfulResponseBuilder<T> {
+        private int code;
+        private String message;
+        private T data;
+
+        private RestfulResponseBuilder() {
+            this.code = 0;
+            this.message = "";
+            this.data = null;
+        }
+
+        public RestfulResponseBuilder<T> code(int code) {
+            this.code = code;
+            return this;
+        }
+
+        public RestfulResponseBuilder<T> message(String message) {
+            this.message = message;
+            return this;
+        }
+
+        public RestfulResponseBuilder<T> data(T data) {
+            this.data = data;
+            return this;
+        }
+
+        public RestfulResponse<T> build() {
+            return new RestfulResponse<>(this);
+        }
+    }
 }

+ 101 - 13
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/stage/ListStagesResponse.java

@@ -19,24 +19,112 @@
 
 package io.milvus.bulkwriter.response.stage;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
+import java.util.ArrayList;
 import java.util.List;
 
-@Data
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
 public class ListStagesResponse {
-
     private Integer count;
-
     private Integer currentPage;
-
     private Integer pageSize;
-
     private List<StageInfo> stages;
+
+    public ListStagesResponse() {
+    }
+
+    public ListStagesResponse(Integer count, Integer currentPage, Integer pageSize, List<StageInfo> stages) {
+        this.count = count;
+        this.currentPage = currentPage;
+        this.pageSize = pageSize;
+        this.stages = stages;
+    }
+
+    private ListStagesResponse(ListStagesResponseBuilder builder) {
+        this.count = builder.count;
+        this.currentPage = builder.currentPage;
+        this.pageSize = builder.pageSize;
+        this.stages = builder.stages;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    public Integer getCurrentPage() {
+        return currentPage;
+    }
+
+    public void setCurrentPage(Integer currentPage) {
+        this.currentPage = currentPage;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public List<StageInfo> getStages() {
+        return stages;
+    }
+
+    public void setStages(List<StageInfo> stages) {
+        this.stages = stages;
+    }
+
+    @Override
+    public String toString() {
+        return "ListStagesResponse{" +
+                ", count=" + count +
+                ", currentPage=" + currentPage +
+                ", pageSize=" + pageSize +
+                '}';
+    }
+
+    public static ListStagesResponseBuilder builder() {
+        return new ListStagesResponseBuilder();
+    }
+
+    public static class ListStagesResponseBuilder {
+        private Integer count;
+        private Integer currentPage;
+        private Integer pageSize;
+        private List<StageInfo> stages;
+
+        private ListStagesResponseBuilder() {
+            this.count = 0;
+            this.currentPage = 0;
+            this.pageSize = 0;
+            this.stages = new ArrayList<>();
+        }
+
+        public ListStagesResponseBuilder count(Integer count) {
+            this.count = count;
+            return this;
+        }
+
+        public ListStagesResponseBuilder currentPage(Integer currentPage) {
+            this.currentPage = currentPage;
+            return this;
+        }
+
+        public ListStagesResponseBuilder pageSize(Integer pageSize) {
+            this.pageSize = pageSize;
+            return this;
+        }
+
+        public ListStagesResponseBuilder stages(List<StageInfo> stages) {
+            this.stages = stages;
+            return this;
+        }
+
+        public ListStagesResponse build() {
+            return new ListStagesResponse(this);
+        }
+    }
 }

+ 47 - 9
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/response/stage/StageInfo.java

@@ -1,14 +1,52 @@
 package io.milvus.bulkwriter.response.stage;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
 public class StageInfo {
     private String stageName;
+
+    public StageInfo() {
+    }
+
+    public StageInfo(String stageName) {
+        this.stageName = stageName;
+    }
+
+    private StageInfo(StageInfoBuilder builder) {
+        this.stageName = builder.stageName;
+    }
+
+    public String getStageName() {
+        return stageName;
+    }
+
+    public void setStageName(String stageName) {
+        this.stageName = stageName;
+    }
+
+    @Override
+    public String toString() {
+        return "StageInfo{" +
+                "stageName='" + stageName + '\'' +
+                '}';
+    }
+
+    public static StageInfoBuilder builder() {
+        return new StageInfoBuilder();
+    }
+
+    public static class StageInfoBuilder {
+        private String stageName;
+
+        private StageInfoBuilder() {
+            this.stageName = "";
+        }
+
+        public StageInfoBuilder stageName(String stageName) {
+            this.stageName = stageName;
+            return this;
+        }
+
+        public StageInfo build() {
+            return new StageInfo(this);
+        }
+    }
 }

+ 12 - 6
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/restful/BulkImportUtils.java

@@ -33,9 +33,11 @@ public class BulkImportUtils extends BaseRestful {
     public static String bulkImport(String url, BaseImportRequest request) {
         String requestURL = url + "/v2/vectordb/jobs/import/create";
 
-        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {}.getType());
+        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {
+        }.getType());
         String body = postRequest(requestURL, request.getApiKey(), params, 60 * 1000);
-        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>(){}.getType());
+        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>() {
+        }.getType());
         handleResponse(requestURL, response);
         return body;
     }
@@ -43,9 +45,11 @@ public class BulkImportUtils extends BaseRestful {
     public static String getImportProgress(String url, BaseDescribeImportRequest request) {
         String requestURL = url + "/v2/vectordb/jobs/import/describe";
 
-        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {}.getType());
+        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {
+        }.getType());
         String body = postRequest(requestURL, request.getApiKey(), params, 60 * 1000);
-        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>(){}.getType());
+        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>() {
+        }.getType());
         handleResponse(requestURL, response);
         return body;
     }
@@ -53,9 +57,11 @@ public class BulkImportUtils extends BaseRestful {
     public static String listImportJobs(String url, BaseListImportJobsRequest request) {
         String requestURL = url + "/v2/vectordb/jobs/import/list";
 
-        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {}.getType());
+        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {
+        }.getType());
         String body = postRequest(requestURL, request.getApiKey(), params, 60 * 1000);
-        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>(){}.getType());
+        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>() {
+        }.getType());
         handleResponse(requestURL, response);
         return body;
     }

+ 16 - 8
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/restful/DataStageUtils.java

@@ -34,9 +34,11 @@ public class DataStageUtils extends BaseRestful {
     public static String applyStage(String url, BaseStageRequest request) {
         String requestURL = url + "/v2/stages/apply";
 
-        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {}.getType());
+        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {
+        }.getType());
         String body = postRequest(requestURL, request.getApiKey(), params, 60 * 1000);
-        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>(){}.getType());
+        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>() {
+        }.getType());
         handleResponse(requestURL, response);
         return new Gson().toJson(response.getData());
     }
@@ -44,9 +46,11 @@ public class DataStageUtils extends BaseRestful {
     public static String listStages(String url, String apiKey, ListStagesRequest request) {
         String requestURL = url + "/v2/stages";
 
-        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {}.getType());
+        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {
+        }.getType());
         String body = getRequest(requestURL, apiKey, params, 60 * 1000);
-        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>(){}.getType());
+        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>() {
+        }.getType());
         handleResponse(requestURL, response);
         return new Gson().toJson(response.getData());
     }
@@ -54,18 +58,22 @@ public class DataStageUtils extends BaseRestful {
     public static void createStage(String url, String apiKey, CreateStageRequest request) {
         String requestURL = url + "/v2/stages/create";
 
-        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {}.getType());
+        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {
+        }.getType());
         String body = postRequest(requestURL, apiKey, params, 60 * 1000);
-        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>(){}.getType());
+        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>() {
+        }.getType());
         handleResponse(requestURL, response);
     }
 
     public static void deleteStage(String url, String apiKey, DeleteStageRequest request) {
         String requestURL = url + "/v2/stages/" + request.getStageName();
 
-        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {}.getType());
+        Map<String, Object> params = JsonUtils.fromJson(JsonUtils.toJson(request), new TypeToken<Map<String, Object>>() {
+        }.getType());
         String body = deleteRequest(requestURL, apiKey, params, 60 * 1000);
-        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>(){}.getType());
+        RestfulResponse<Object> response = JsonUtils.fromJson(body, new TypeToken<RestfulResponse<Object>>() {
+        }.getType());
         handleResponse(requestURL, response);
     }
 }

+ 2 - 0
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/storage/StorageClient.java

@@ -24,6 +24,8 @@ import java.io.File;
 
 public interface StorageClient {
     Long getObjectEntity(String bucketName, String objectKey) throws Exception;
+
     boolean checkBucketExist(String bucketName) throws Exception;
+
     void putObject(File file, String bucketName, String objectKey) throws Exception;
 }

+ 1 - 8
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/storage/client/MinioStorageClient.java

@@ -23,14 +23,7 @@ import com.google.common.collect.Multimap;
 import io.milvus.bulkwriter.common.clientenum.CloudStorage;
 import io.milvus.bulkwriter.model.CompleteMultipartUploadOutputModel;
 import io.milvus.bulkwriter.storage.StorageClient;
-import io.minio.BucketExistsArgs;
-import io.minio.MinioAsyncClient;
-import io.minio.ObjectWriteResponse;
-import io.minio.PutObjectArgs;
-import io.minio.S3Base;
-import io.minio.StatObjectArgs;
-import io.minio.StatObjectResponse;
-import io.minio.Xml;
+import io.minio.*;
 import io.minio.credentials.StaticProvider;
 import io.minio.errors.ErrorResponseException;
 import io.minio.errors.InsufficientDataException;

+ 3 - 3
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/writer/CSVFileWriter.java

@@ -33,7 +33,7 @@ public class CSVFileWriter implements FormatFileWriter {
     }
 
     private void initFilePath(String filePathPrefix) {
-        this.filePath = filePathPrefix +  ".csv";
+        this.filePath = filePathPrefix + ".csv";
     }
 
     private void initWriter() throws IOException {
@@ -48,8 +48,8 @@ public class CSVFileWriter implements FormatFileWriter {
         List<String> fieldNameList = Lists.newArrayList(rowValues.keySet());
 
         try {
-            String separator = (String)config.getOrDefault("sep", ",");
-            String nullKey = (String)config.getOrDefault("nullkey", "");
+            String separator = (String) config.getOrDefault("sep", ",");
+            String nullKey = (String) config.getOrDefault("nullkey", "");
 
             if (firstWrite) {
                 writer.write(String.join(separator, fieldNameList));

+ 2 - 2
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/writer/JSONFileWriter.java

@@ -27,7 +27,7 @@ public class JSONFileWriter implements FormatFileWriter {
     }
 
     private void initFilePath(String filePathPrefix) {
-        this.filePath = filePathPrefix +  ".json";
+        this.filePath = filePathPrefix + ".json";
     }
 
     private void initWriter() throws IOException {
@@ -38,7 +38,7 @@ public class JSONFileWriter implements FormatFileWriter {
     public void appendRow(Map<String, Object> rowValues, boolean firstWrite) throws IOException {
         Gson gson = new GsonBuilder().serializeNulls().create();
         rowValues.keySet().removeIf(key -> key.equals(DYNAMIC_FIELD_NAME) && !this.collectionSchema.isEnableDynamicField());
-        rowValues.replaceAll((key, value) -> value instanceof ByteBuffer ? ((ByteBuffer)value).array() : value);
+        rowValues.replaceAll((key, value) -> value instanceof ByteBuffer ? ((ByteBuffer) value).array() : value);
 
         try {
             if (firstWrite) {

+ 8 - 8
sdk-bulkwriter/src/main/java/io/milvus/bulkwriter/writer/ParquetFileWriter.java

@@ -41,7 +41,7 @@ public class ParquetFileWriter implements FormatFileWriter {
     }
 
     private void initFilePath(String filePathPrefix) {
-        this.filePath = filePathPrefix +  ".parquet";
+        this.filePath = filePathPrefix + ".parquet";
     }
 
     private void initMessageType() {
@@ -116,29 +116,29 @@ public class ParquetFileWriter implements FormatFileWriter {
         switch (dataType) {
             case Int8:
             case Int16:
-                group.append(paramName, (Short)value);
+                group.append(paramName, (Short) value);
                 break;
             case Int32:
-                group.append(paramName, (Integer)value);
+                group.append(paramName, (Integer) value);
                 break;
             case Int64:
-                group.append(paramName, (Long)value);
+                group.append(paramName, (Long) value);
                 break;
             case Float:
-                group.append(paramName, (Float)value);
+                group.append(paramName, (Float) value);
                 break;
             case Double:
-                group.append(paramName, (Double)value);
+                group.append(paramName, (Double) value);
                 break;
             case Bool:
-                group.append(paramName, (Boolean)value);
+                group.append(paramName, (Boolean) value);
                 break;
             case VarChar:
             case String:
             case Geometry:
             case Timestamptz:
             case JSON:
-                group.append(paramName, (String)value);
+                group.append(paramName, (String) value);
                 break;
             case FloatVector:
                 addFloatArray(group, paramName, (List<Float>) value);

Some files were not shown because too many files changed in this diff