Class AbstractFragmentManager
java.lang.Object
org.apache.drill.exec.work.fragment.AbstractFragmentManager
- All Implemented Interfaces:
FragmentManager
- Direct Known Subclasses:
NonRootFragmentManager
,RootFragmentManager
-
Field Summary
Modifier and TypeFieldDescriptionprotected final IncomingBuffers
protected boolean
protected final ExecutorFragmentContext
protected final FragmentExecutor
protected final ExecProtos.FragmentHandle
-
Constructor Summary
ConstructorDescriptionAbstractFragmentManager
(BitControl.PlanFragment fragment, FragmentExecutor executor, FragmentStatusReporter statusReporter) AbstractFragmentManager
(BitControl.PlanFragment fragment, FragmentExecutor executor, FragmentStatusReporter statusReporter, FragmentRoot rootOperator) -
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
abstract void
void
unpause()
If the executor is paused (for testing), this method should unpause the executor.
-
Field Details
-
buffers
-
fragmentExecutor
-
fragmentHandle
-
fragmentContext
-
cancel
protected volatile boolean cancel
-
-
Constructor Details
-
AbstractFragmentManager
public AbstractFragmentManager(BitControl.PlanFragment fragment, FragmentExecutor executor, FragmentStatusReporter statusReporter, FragmentRoot rootOperator) -
AbstractFragmentManager
public AbstractFragmentManager(BitControl.PlanFragment fragment, FragmentExecutor executor, FragmentStatusReporter statusReporter)
-
-
Method Details
-
handle
Description copied from interface:FragmentManager
Handle the next incoming record batch.- Specified by:
handle
in interfaceFragmentManager
- Returns:
- True if the fragment has enough incoming data to be able to be run.
- Throws:
FragmentSetupException
IOException
-
isCancelled
public boolean isCancelled()Description copied from interface:FragmentManager
Find out if the FragmentManager has been cancelled.- Specified by:
isCancelled
in interfaceFragmentManager
- Returns:
- true if the FragmentManager has been cancelled.
-
unpause
public void unpause()Description copied from interface:FragmentManager
If the executor is paused (for testing), this method should unpause the executor. This method should handle multiple calls.- Specified by:
unpause
in interfaceFragmentManager
-
getHandle
- Specified by:
getHandle
in interfaceFragmentManager
-
isWaiting
public boolean isWaiting()- Specified by:
isWaiting
in interfaceFragmentManager
-
getFragmentContext
- Specified by:
getFragmentContext
in interfaceFragmentManager
-
getRunnable
Description copied from interface:FragmentManager
Get the fragment runner for this incoming fragment. Note, this can only be requested once.- Specified by:
getRunnable
in interfaceFragmentManager
- Returns:
-
receivingFragmentFinished
- Specified by:
receivingFragmentFinished
in interfaceFragmentManager
-
cancel
public void cancel()- Specified by:
cancel
in interfaceFragmentManager
-