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
public class LocalBulkWriter extends BulkWriter implements AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description protected StringlocalPath-
Fields inherited from class io.milvus.bulkwriter.BulkWriter
buffer, bufferLock, bufferRowCount, bufferSize, chunkSize, collectionSchema, fileType, totalRowCount
-
-
Constructor Summary
Constructors Modifier Constructor Description LocalBulkWriter(LocalBulkWriterParam bulkWriterParam)protectedLocalBulkWriter(CollectionSchemaParam collectionSchema, int chunkSize, BulkFileType fileType, String localPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendRow(com.alibaba.fastjson.JSONObject rowData)protected voidcallBack(List<String> fileList)voidclose()voidcommit(boolean async)protected voidexit()List<List<String>>getBatchFiles()protected StringgetDataPath()protected StringgetUUID()-
Methods inherited from class io.milvus.bulkwriter.BulkWriter
getBufferRowCount, getBufferSize, getChunkSize, getTotalRowCount, newBuffer
-
-
-
-
Field Detail
-
localPath
protected String localPath
-
-
Constructor Detail
-
LocalBulkWriter
public LocalBulkWriter(LocalBulkWriterParam bulkWriterParam) throws IOException
- Throws:
IOException
-
LocalBulkWriter
protected LocalBulkWriter(CollectionSchemaParam collectionSchema, int chunkSize, BulkFileType fileType, String localPath) throws IOException
- Throws:
IOException
-
-
Method Detail
-
appendRow
public void appendRow(com.alibaba.fastjson.JSONObject rowData) throws IOException, InterruptedException- Overrides:
appendRowin classBulkWriter- Throws:
IOExceptionInterruptedException
-
commit
public void commit(boolean async) throws InterruptedException- Overrides:
commitin classBulkWriter- Throws:
InterruptedException
-
getDataPath
protected String getDataPath()
- Overrides:
getDataPathin classBulkWriter
-
exit
protected void exit() throws InterruptedException- Throws:
InterruptedException
-
getUUID
protected String getUUID()
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-