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 Buffer
buffer
protected ReentrantLock
bufferLock
protected int
bufferRowCount
protected int
bufferSize
protected int
chunkSize
protected CollectionSchemaParam
collectionSchema
protected BulkFileType
fileType
protected int
totalRowCount
-
Constructor Summary
Constructors Modifier Constructor Description protected
BulkWriter(CollectionSchemaParam collectionSchema, int chunkSize, BulkFileType fileType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendRow(com.alibaba.fastjson.JSONObject row)
protected void
commit(boolean async)
Integer
getBufferRowCount()
protected Integer
getBufferSize()
protected Integer
getChunkSize()
protected String
getDataPath()
Integer
getTotalRowCount()
protected Buffer
newBuffer()
-
-
-
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:
IOException
InterruptedException
-
commit
protected void commit(boolean async) throws InterruptedException
- Throws:
InterruptedException
-
getDataPath
protected String getDataPath()
-
-