Class AbstractTransformStep
java.lang.Object
com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.AbstractTransformStep
- All Implemented Interfaces:
ProcessSummaryProviderInterface
- Direct Known Subclasses:
AbstractMergeDuplicatesTransformStep,AbstractTableSyncTransformStep,BulkDeleteTransformStep,BulkEditTransformStep,BulkInsertTransformStep,GarbageCollectorTransformStep,NoopTransformStep
public abstract class AbstractTransformStep
extends Object
implements ProcessSummaryProviderInterface
Base class for the Transform logic of Streamed ETL processes.
Records are to be read out of the input object's Records field, and after storing,
should be written to the output object's Records, noting that when running
as a streamed-ETL process, those input invalid input: '&' output objects will be instances of
the StreamedBackendStep{Input,Output} classes, that will be associated with
a page of records flowing through a pipe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOverrideRecordPipeCapacity(RunBackendStepInput runBackendStepInput) Allow this transform step to specify the capacity of the pipe being used by the process.Getter for transactionvoidpostRun(BackendStepPostRunInput runBackendStepInput, BackendStepPostRunOutput runBackendStepOutput) Allow subclasses to do an action after the run is complete - after the last page of records is passed in.voidpreRun(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) Allow subclasses to do an action before any pages of records are processed.abstract voidrunOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) Do the transform logic for one page of recordsvoidsetTransaction(Optional<QBackendTransaction> transaction) Setter for transactionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.ProcessSummaryProviderInterface
doGetProcessSummary, getProcessSummary
-
Constructor Details
-
AbstractTransformStep
public AbstractTransformStep()
-
-
Method Details
-
runOnePage
public abstract void runOnePage(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException Do the transform logic for one page of records- Throws:
QException
-
preRun
public void preRun(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException Allow subclasses to do an action before any pages of records are processed.- Throws:
QException
-
postRun
public void postRun(BackendStepPostRunInput runBackendStepInput, BackendStepPostRunOutput runBackendStepOutput) throws QException Allow subclasses to do an action after the run is complete - after the last page of records is passed in.- Throws:
QException
-
setTransaction
Setter for transaction -
getTransaction
Getter for transaction -
getOverrideRecordPipeCapacity
Allow this transform step to specify the capacity of the pipe being used by the process. The specific use-case for which this is being added is, in the case of a process with many records being extracted, if the transform job is too slow, then the pipe can get filled, and the extractor (who puts records into the pipe) can time out waiting for capacity in the pipe to open up, while a slow loader is consuming the records. In other words, for a slow transformer, setting a lower pipe capacity can help prevent time-out errors ("Giving up adding record to pipe...")
-