Interface DataBatchIngestor


public interface DataBatchIngestor
Interface for ingesting a batch of TPC-DS data into a specific table of storage.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Appends an item to be inserted as part of this batch.
    Commits the operation.
    boolean
    Returns true if this ingestor batch is full (number of appended item reached maxBatchSize()).
    int
    Returns the maximum size of the batch.
  • Method Details

    • maxBatchSize

      int maxBatchSize()
      Returns the maximum size of the batch.

      Allows the user of the interface to get a hint of how much items can be added to this ingestor.

      Returns:
      The maximum size of the batch.
    • isFull

      boolean isFull()
      Returns true if this ingestor batch is full (number of appended item reached maxBatchSize()).

      When returns true that means further attempts to add more elements into this batch may fail and are undesirable.

      Returns:
      true if this ingestor batch is full, false otherwise.
    • appendItemToBatch

      void appendItemToBatch(Tuple item)
      Appends an item to be inserted as part of this batch. The item must be a Tuple containing fields that match the schema of the table being ingested.
      Parameters:
      item - a single row of data to be ingested.
    • commit

      Commits the operation. Should only be called once. This method must be called to complete the batch insertion. Calling this method is mandatory to guarantee that the data is inserted into the database.
      Returns:
      future that completes when all data of this batch was ingested.