public class FileCopyTaskInputFormat extends Object implements InputFormat<FileCopyTask,FileCopyTaskInputSplit>
FileCopyTask
to the mappers
that have finished previously assigned tasks.Constructor and Description |
---|
FileCopyTaskInputFormat(List<FileCopyTask> tasks) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Method that marks the end of the life-cycle of an input split.
|
void |
configure(Configuration parameters)
Configures this input format.
|
FileCopyTaskInputSplit[] |
createInputSplits(int minNumSplits)
Computes the input splits.
|
InputSplitAssigner |
getInputSplitAssigner(FileCopyTaskInputSplit[] inputSplits)
Returns the assigner for the input splits.
|
BaseStatistics |
getStatistics(BaseStatistics cachedStatistics)
Gets the basic statistics from the input described by this format.
|
FileCopyTask |
nextRecord(FileCopyTask reuse)
Reads the next record from the input.
|
void |
open(FileCopyTaskInputSplit split)
Opens a parallel instance of the input format to work on a split.
|
boolean |
reachedEnd()
Method used to check if the end of the input is reached.
|
public FileCopyTaskInputFormat(List<FileCopyTask> tasks)
public void configure(Configuration parameters)
InputFormat
This method is always called first on a newly instantiated input format.
configure
in interface InputFormat<FileCopyTask,FileCopyTaskInputSplit>
parameters
- The configuration with all parameters (note: not the Flink config but the
TaskConfig).public BaseStatistics getStatistics(BaseStatistics cachedStatistics) throws IOException
InputFormat
When this method is called, the input format is guaranteed to be configured.
getStatistics
in interface InputFormat<FileCopyTask,FileCopyTaskInputSplit>
cachedStatistics
- The statistics that were cached. May be null.IOException
public FileCopyTaskInputSplit[] createInputSplits(int minNumSplits) throws IOException
InputSplitSource
createInputSplits
in interface InputFormat<FileCopyTask,FileCopyTaskInputSplit>
createInputSplits
in interface InputSplitSource<FileCopyTaskInputSplit>
minNumSplits
- Number of minimal input splits, as a hint.IOException
public InputSplitAssigner getInputSplitAssigner(FileCopyTaskInputSplit[] inputSplits)
InputSplitSource
getInputSplitAssigner
in interface InputFormat<FileCopyTask,FileCopyTaskInputSplit>
getInputSplitAssigner
in interface InputSplitSource<FileCopyTaskInputSplit>
public void open(FileCopyTaskInputSplit split) throws IOException
InputFormat
When this method is called, the input format it guaranteed to be configured.
open
in interface InputFormat<FileCopyTask,FileCopyTaskInputSplit>
split
- The split to be opened.IOException
- Thrown, if the spit could not be opened due to an I/O problem.public boolean reachedEnd() throws IOException
InputFormat
When this method is called, the input format it guaranteed to be opened.
reachedEnd
in interface InputFormat<FileCopyTask,FileCopyTaskInputSplit>
IOException
- Thrown, if an I/O error occurred.public FileCopyTask nextRecord(FileCopyTask reuse) throws IOException
InputFormat
When this method is called, the input format it guaranteed to be opened.
nextRecord
in interface InputFormat<FileCopyTask,FileCopyTaskInputSplit>
reuse
- Object that may be reused.IOException
- Thrown, if an I/O error occurred.public void close() throws IOException
InputFormat
When this method is called, the input format it guaranteed to be opened.
close
in interface InputFormat<FileCopyTask,FileCopyTaskInputSplit>
IOException
- Thrown, if the input could not be closed properly.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.