public abstract class AbstractEvaluatorToPartitionStrategy extends Object implements EvaluatorToPartitionStrategy<org.apache.hadoop.mapred.InputSplit>
EvaluatorToPartitionStrategy
implementations. Contains a template implementation of
EvaluatorToPartitionStrategy.getInputSplit(NodeDescriptor, String)
that call abstract methods implemented by subclasses. If your implementation
does not need this logic, you should just implement the
EvaluatorToPartitionStrategy interface and do not extend this class.| Modifier and Type | Method and Description |
|---|---|
NumberedSplit<org.apache.hadoop.mapred.InputSplit> |
getInputSplit(NodeDescriptor nodeDescriptor,
String evaluatorId)
Get an input split to be assigned to this evaluator.
|
int |
getNumberOfSplits()
Returns the total number of splits computed in this strategy.
|
public NumberedSplit<org.apache.hadoop.mapred.InputSplit> getInputSplit(NodeDescriptor nodeDescriptor, String evaluatorId)
Allocates one if its not already allocated
getInputSplit in interface EvaluatorToPartitionStrategy<org.apache.hadoop.mapred.InputSplit>evaluatorId - nodeDescriptor - the node descriptor where the evaluator is running onRuntimeException - if couldn't find any splitpublic int getNumberOfSplits()
EvaluatorToPartitionStrategygetNumberOfSplits in interface EvaluatorToPartitionStrategy<org.apache.hadoop.mapred.InputSplit>Copyright © 2017 The Apache Software Foundation. All rights reserved.