Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion examples/src/main/java/io/milvus/v1/BulkWriterExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ private void callBulkInsert(CollectionSchemaParam collectionSchema, List<List<St
.collectionName(ALL_TYPES_COLLECTION_NAME)
.partitionName("")
.files(batchFiles)
.apiKey(USER_NAME + ":" + PASSWORD)
.build();
String bulkImportResult = BulkImportUtils.bulkImport(url, milvusImportRequest);
System.out.println(bulkImportResult);
Expand All @@ -508,7 +509,9 @@ private void callBulkInsert(CollectionSchemaParam collectionSchema, List<List<St
System.out.println("Create a bulkInert task, job id: " + jobId);

System.out.println("\n===================== listBulkInsertJobs() ====================");
MilvusListImportJobsRequest listImportJobsRequest = MilvusListImportJobsRequest.builder().collectionName(ALL_TYPES_COLLECTION_NAME).build();
MilvusListImportJobsRequest listImportJobsRequest = MilvusListImportJobsRequest.builder().collectionName(ALL_TYPES_COLLECTION_NAME)
.apiKey(USER_NAME + ":" + PASSWORD)
.build();
String listImportJobsResult = BulkImportUtils.listImportJobs(url, listImportJobsRequest);
System.out.println(listImportJobsResult);
while (true) {
Expand All @@ -518,6 +521,7 @@ private void callBulkInsert(CollectionSchemaParam collectionSchema, List<List<St
System.out.println("\n===================== getBulkInsertState() ====================");
MilvusDescribeImportRequest request = MilvusDescribeImportRequest.builder()
.jobId(jobId)
.apiKey(USER_NAME + ":" + PASSWORD)
.build();
String getImportProgressResult = BulkImportUtils.getImportProgress(url, request);
System.out.println(getImportProgressResult);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ private static void callBulkInsert(List<List<String>> batchFiles) throws Interru
MilvusImportRequest milvusImportRequest = MilvusImportRequest.builder()
.collectionName(ALL_TYPES_COLLECTION_NAME)
.files(batchFiles)
.apiKey(USER_NAME + ":" + PASSWORD)
.options(options)
.build();
String bulkImportResult = BulkImportUtils.bulkImport(url, milvusImportRequest);
Expand All @@ -452,7 +453,9 @@ private static void callBulkInsert(List<List<String>> batchFiles) throws Interru
System.out.println("Create a bulkInert task, job id: " + jobId);

System.out.println("\n===================== listBulkInsertJobs() ====================");
MilvusListImportJobsRequest listImportJobsRequest = MilvusListImportJobsRequest.builder().collectionName(ALL_TYPES_COLLECTION_NAME).build();
MilvusListImportJobsRequest listImportJobsRequest = MilvusListImportJobsRequest.builder().collectionName(ALL_TYPES_COLLECTION_NAME)
.apiKey(USER_NAME + ":" + PASSWORD)
.build();
String listImportJobsResult = BulkImportUtils.listImportJobs(url, listImportJobsRequest);
System.out.println(listImportJobsResult);
while (true) {
Expand All @@ -462,6 +465,7 @@ private static void callBulkInsert(List<List<String>> batchFiles) throws Interru
System.out.println("\n===================== getBulkInsertState() ====================");
MilvusDescribeImportRequest request = MilvusDescribeImportRequest.builder()
.jobId(jobId)
.apiKey(USER_NAME + ":" + PASSWORD)
.build();
String getImportProgressResult = BulkImportUtils.getImportProgress(url, request);
System.out.println(getImportProgressResult);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
public class BaseDescribeImportRequest implements Serializable {
private static final long serialVersionUID = -787626534606813089L;
/**
* If you are calling the cloud API, this parameter needs to be filled in; otherwise, you can ignore it.
* 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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
public class BaseImportRequest 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.
* 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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
public class BaseListImportJobsRequest implements Serializable {
private static final long serialVersionUID = -1890380396466908530L;
/**
* If you are calling the cloud API, this parameter needs to be filled in; otherwise, you can ignore it.
* 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;
}
Loading