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 WritableRowContainers by column partition in order to enable write batching.
  • 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

      public void add​(WritableRowContainer<BinaryRowV2> row) throws IOException
      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

      public ByteBuffer[] 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

      public void setPartitionValue​(String partitionValue)
    • getPartitionValue

      public String getPartitionValue()