public class ReadOperation extends Operation
Its start() method iterates through all elements of the source and emits them on its output.
Operation.InitializationState| Modifier and Type | Field and Description |
|---|---|
Reader<?> |
reader
The Reader this operation reads from.
|
finishState, initializationState, initializationStateLock, operationName, processState, receivers, startState, stateSampler| Constructor and Description |
|---|
ReadOperation(String operationName,
Reader<?> reader,
OutputReceiver[] receivers,
String counterPrefix,
CounterSet.AddCounterMutator addCounterMutator,
StateSampler stateSampler) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
bytesCounterName(String counterPrefix,
String operationName) |
Reader.Progress |
getProgress()
Returns a (possibly slightly stale) value of the progress of the task.
|
Reader<?> |
getReader() |
Reader.DynamicSplitResult |
requestDynamicSplit(Reader.DynamicSplitRequest splitRequest)
Relays the split request to
ReaderIterator. |
protected void |
runReadLoop() |
void |
setProgressUpdatePeriodMs(long millis)
Controls the frequency at which progress is updated.
|
void |
start()
Starts this Operation's execution.
|
boolean |
supportsRestart()
Returns true if this Operation can be started again after it is finished.
|
public final Reader<?> reader
public ReadOperation(String operationName, Reader<?> reader, OutputReceiver[] receivers, String counterPrefix, CounterSet.AddCounterMutator addCounterMutator, StateSampler stateSampler)
public void setProgressUpdatePeriodMs(long millis)
public Reader<?> getReader()
public void start()
throws Exception
Operationpublic boolean supportsRestart()
OperationsupportsRestart in class Operationpublic Reader.Progress getProgress()
null if the source iterator has not
been initializedpublic Reader.DynamicSplitResult requestDynamicSplit(Reader.DynamicSplitRequest splitRequest)
ReaderIterator.