@Public public final class LocatableInputSplitAssigner extends Object implements InputSplitAssigner
Constructor and Description |
---|
LocatableInputSplitAssigner(Collection<LocatableInputSplit> splits) |
LocatableInputSplitAssigner(LocatableInputSplit[] splits) |
Modifier and Type | Method and Description |
---|---|
LocatableInputSplit |
getNextInputSplit(String host,
int taskId)
Returns the next input split that shall be consumed.
|
int |
getNumberOfLocalAssignments() |
int |
getNumberOfRemoteAssignments() |
void |
returnInputSplit(List<InputSplit> splits,
int taskId)
Return the splits to assigner if the task failed to process it.
|
public LocatableInputSplitAssigner(Collection<LocatableInputSplit> splits)
public LocatableInputSplitAssigner(LocatableInputSplit[] splits)
public LocatableInputSplit getNextInputSplit(String host, int taskId)
InputSplitAssigner
getNextInputSplit
in interface InputSplitAssigner
host
- The host address of split requesting task.taskId
- The id of the split requesting task.null
if no more splits remain.public void returnInputSplit(List<InputSplit> splits, int taskId)
InputSplitAssigner
returnInputSplit
in interface InputSplitAssigner
splits
- The list of input splits to be returned.taskId
- The id of the task that failed to process the input splits.public int getNumberOfLocalAssignments()
public int getNumberOfRemoteAssignments()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.