Class PartitionParserUpdate

java.lang.Object
com.illumon.iris.importers.csv.PartitionParserUpdate

public class PartitionParserUpdate extends Object
Holds the map of partition to its list of chunks (startIndex and size) in one parser chunk which is approximately 262K in size. The TIntArrayList holds the startIndex on even index values(starting with 0, 2, 4...) and size is on odd index values (1, 3, 5...)
  • Constructor Details

    • PartitionParserUpdate

      public PartitionParserUpdate(long destEnd, @NotNull Map<String,gnu.trove.list.array.TIntArrayList> partitionMap)
      Is populated with the map of partition to start-size arraylist as processed in the current chunk in CsvPartitionColumnParser.
      Parameters:
      destEnd - The destEnd for the chunk processed in partition parser
      partitionMap - Map of partition to start-size arraylist
  • Method Details

    • getDestEnd

      public long getDestEnd()
    • getPartitionMap

      public Map<String,gnu.trove.list.array.TIntArrayList> getPartitionMap()
    • processingComplete

      public void processingComplete(boolean awaitAdvance)
      This will decrease the count of waiting parities in phaser reducing the number of processing threads. This should be invoked when processing is complete for the current parser update in a column sink. When all column sinks invoke the method then partition parser updates for the next chunk will be published
      Parameters:
      awaitAdvance - a value of true indicates if we should block in this case until all parties arrive
    • hasMorePartitions

      public boolean hasMorePartitions()
      Returns:
      true if there are more partitions to be processed in the original PartitionParserUpdate published from partition parser