Package io.milvus.bulkwriter
Class BulkWriter
- java.lang.Object
-
- io.milvus.bulkwriter.BulkWriter
-
- Direct Known Subclasses:
LocalBulkWriter
public abstract class BulkWriter extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Bufferbufferprotected ReentrantLockbufferLockprotected intbufferRowCountprotected intbufferSizeprotected intchunkSizeprotected CollectionSchemaParamcollectionSchemaprotected BulkFileTypefileTypeprotected inttotalRowCount
-
Constructor Summary
Constructors Modifier Constructor Description protectedBulkWriter(CollectionSchemaParam collectionSchema, int chunkSize, BulkFileType fileType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendRow(com.alibaba.fastjson.JSONObject row)protected voidcommit(boolean async)IntegergetBufferRowCount()protected IntegergetBufferSize()protected IntegergetChunkSize()protected StringgetDataPath()IntegergetTotalRowCount()protected BuffernewBuffer()
-
-
-
Field Detail
-
collectionSchema
protected CollectionSchemaParam collectionSchema
-
chunkSize
protected int chunkSize
-
fileType
protected BulkFileType fileType
-
bufferSize
protected int bufferSize
-
bufferRowCount
protected int bufferRowCount
-
totalRowCount
protected int totalRowCount
-
buffer
protected Buffer buffer
-
bufferLock
protected ReentrantLock bufferLock
-
-
Constructor Detail
-
BulkWriter
protected BulkWriter(CollectionSchemaParam collectionSchema, int chunkSize, BulkFileType fileType)
-
-
Method Detail
-
getBufferSize
protected Integer getBufferSize()
-
getBufferRowCount
public Integer getBufferRowCount()
-
getTotalRowCount
public Integer getTotalRowCount()
-
getChunkSize
protected Integer getChunkSize()
-
newBuffer
protected Buffer newBuffer()
-
appendRow
public void appendRow(com.alibaba.fastjson.JSONObject row) throws IOException, InterruptedException- Throws:
IOExceptionInterruptedException
-
commit
protected void commit(boolean async) throws InterruptedException- Throws:
InterruptedException
-
getDataPath
protected String getDataPath()
-
-