Package org.gridgain.tpcds
Interface DataBatchIngestor
public interface DataBatchIngestor
Interface for ingesting a batch of TPC-DS data into a specific table of storage.
-
Method Summary
Modifier and TypeMethodDescriptionvoidappendItemToBatch(Tuple item) Appends an item to be inserted as part of this batch.commit()Commits the operation.booleanisFull()Returnstrueif this ingestor batch is full (number of appended item reachedmaxBatchSize()).intReturns 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()Returnstrueif this ingestor batch is full (number of appended item reachedmaxBatchSize()).When returns
truethat 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
Appends an item to be inserted as part of this batch. The item must be aTuplecontaining fields that match the schema of the table being ingested.- Parameters:
item- a single row of data to be ingested.
-
commit
CompletableFuture<Void> 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.
-