Package com.illumon.iris.binarystore
Class BinaryStoreWriterV2.DeferrableRowPartition
java.lang.Object
com.illumon.iris.binarystore.BinaryStoreWriterV2.DeferrableRowPartition
- Enclosing class:
- BinaryStoreWriterV2
protected static class BinaryStoreWriterV2.DeferrableRowPartition extends Object
A container for binning
WritableRowContainer
s by column partition in order to enable write batching.-
Method Summary
Modifier and Type Method Description void
add(WritableRowContainer<BinaryRowV2> row)
Add a row to the deferred queue.ByteBuffer[]
getBuffers()
int
getEnqueuedBytes()
String
getPartitionValue()
int
getRowCount()
boolean
isEmpty()
void
release()
Release this partition and clear, and return all deferred rows to the row pool.void
sanitize()
Release all rows, but also clear the partitionValue.void
setPartitionValue(String partitionValue)
-
Method Details
-
release
public void release()Release this partition and clear, and return all deferred rows to the row pool. Note that this does not clear the partition because we want to be able to leave the collection in the list for reuse. -
sanitize
public void sanitize()Release all rows, but also clear the partitionValue. -
add
Add a row to the deferred queue.- Parameters:
row
- The row to defer- Throws:
IOException
- if there is an error while writing the row to a buffer.
-
getRowCount
public int getRowCount()- Returns:
- the total number of deferred rows in this partition.
-
getEnqueuedBytes
public int getEnqueuedBytes()- Returns:
- the total number of bytes in all currently deferred rows.
-
isEmpty
public boolean isEmpty()- Returns:
- true if this partition is empty
-
getBuffers
- Returns:
- the internal array of ByteBuffers.
- ImplNote:
- Note that this array will probably be larger than the actual number
of populated buffers, and should be used in conjunction with
getRowCount()
to determine the actual buffer count.
-
setPartitionValue
-
getPartitionValue
-