Class DefaultInputSplitAssigner

    • Constructor Detail

      • DefaultInputSplitAssigner

        public DefaultInputSplitAssigner​(InputSplit[] splits)
      • DefaultInputSplitAssigner

        public DefaultInputSplitAssigner​(Collection<? extends InputSplit> splits)
    • Method Detail

      • getNextInputSplit

        public InputSplit getNextInputSplit​(String host,
                                            int taskId)
        Description copied from interface: InputSplitAssigner
        Returns the next input split that shall be consumed. The consumer's host is passed as a parameter to allow localized assignments.
        Specified by:
        getNextInputSplit in interface InputSplitAssigner
        Parameters:
        host - The host address of split requesting task.
        taskId - The id of the split requesting task.
        Returns:
        the next input split to be consumed, or null if no more splits remain.
      • returnInputSplit

        public void returnInputSplit​(List<InputSplit> splits,
                                     int taskId)
        Description copied from interface: InputSplitAssigner
        Return the splits to assigner if the task failed to process it.
        Specified by:
        returnInputSplit in interface InputSplitAssigner
        Parameters:
        splits - The list of input splits to be returned.
        taskId - The id of the task that failed to process the input splits.