Package io.milvus.bulkwriter
Class LocalBulkWriter
java.lang.Object
io.milvus.bulkwriter.BulkWriter
io.milvus.bulkwriter.LocalBulkWriter
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
RemoteBulkWriter
-
Field Summary
Fields inherited from class io.milvus.bulkwriter.BulkWriter
appendLock, chunkSize, collectionSchema, config, fileType, fileWriteLock, fileWriter, firstWrite, flushCount, localPath, totalRowCount, totalSize, uuid -
Constructor Summary
ConstructorsModifierConstructorDescriptionLocalBulkWriter(LocalBulkWriterParam bulkWriterParam) protectedLocalBulkWriter(CreateCollectionReq.CollectionSchema collectionSchema, long chunkSize, BulkFileType fileType, String localPath, Map<String, Object> config) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendRow(com.google.gson.JsonObject rowData) protected voidprotected voidcallBackIfCommitReady(List<String> filePaths) voidclose()voidcommit(boolean async) commitIfFileReady(boolean createNewFile) protected voidexit()protected Stringprotected StringgetUUID()Methods inherited from class io.milvus.bulkwriter.BulkWriter
commit, getChunkSize, getFileWriter, getTotalRowCount, getTotalSize, newFileWriter, verifyRow
-
Constructor Details
-
LocalBulkWriter
- Throws:
IOException
-
LocalBulkWriter
protected LocalBulkWriter(CreateCollectionReq.CollectionSchema collectionSchema, long chunkSize, BulkFileType fileType, String localPath, Map<String, Object> config) throws IOException- Throws:
IOException
-
-
Method Details
-
appendRow
- Overrides:
appendRowin classBulkWriter- Throws:
IOExceptionInterruptedException
-
callBackIfCommitReady
- Specified by:
callBackIfCommitReadyin classBulkWriter- Throws:
InterruptedException
-
commit
- Throws:
InterruptedException
-
commitIfFileReady
- Specified by:
commitIfFileReadyin classBulkWriter
-
callBack
-
getDataPath
- Overrides:
getDataPathin classBulkWriter
-
getBatchFiles
-
exit
- Throws:
InterruptedException
-
getUUID
-
close
- Throws:
Exception
-