Interface FragmentManager
- All Known Implementing Classes:
AbstractFragmentManager
,NonRootFragmentManager
,RootFragmentManager
public interface FragmentManager
The Fragment Manager is responsible managing incoming data and executing a fragment. Once enough data and resources
are avialable, a fragment manager will start a fragment executor to run the associated fragment.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Get the fragment runner for this incoming fragment.boolean
handle
(IncomingDataBatch batch) Handle the next incoming record batch.boolean
Find out if the FragmentManager has been cancelled.boolean
void
void
unpause()
If the executor is paused (for testing), this method should unpause the executor.
-
Method Details
-
handle
Handle the next incoming record batch.- Parameters:
batch
-- Returns:
- True if the fragment has enough incoming data to be able to be run.
- Throws:
FragmentSetupException
IOException
-
getRunnable
FragmentExecutor getRunnable()Get the fragment runner for this incoming fragment. Note, this can only be requested once.- Returns:
-
cancel
void cancel() -
isCancelled
boolean isCancelled()Find out if the FragmentManager has been cancelled.- Returns:
- true if the FragmentManager has been cancelled.
-
unpause
void unpause()If the executor is paused (for testing), this method should unpause the executor. This method should handle multiple calls. -
isWaiting
boolean isWaiting() -
getHandle
ExecProtos.FragmentHandle getHandle() -
getFragmentContext
FragmentContext getFragmentContext() -
receivingFragmentFinished
-