Package org.apache.druid.data.input
Class FilePerSplitHintSpec
- java.lang.Object
-
- org.apache.druid.data.input.FilePerSplitHintSpec
-
- All Implemented Interfaces:
SplitHintSpec
public class FilePerSplitHintSpec extends Object implements SplitHintSpec
Assigns each input file to its own split. Not named as aJsonSubTypes
inSplitHintSpec
, because this class is meant for internal use within a server only. It is not serialized for transfer between servers, and is not part of the user-facing API.
-
-
Field Summary
Fields Modifier and Type Field Description static FilePerSplitHintSpec
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Iterator<List<T>>
split(Iterator<T> inputIterator, Function<T,InputFileAttribute> inputAttributeExtractor)
Returns an iterator of splits.
-
-
-
Field Detail
-
INSTANCE
public static final FilePerSplitHintSpec INSTANCE
-
-
Method Detail
-
split
public <T> Iterator<List<T>> split(Iterator<T> inputIterator, Function<T,InputFileAttribute> inputAttributeExtractor)
Description copied from interface:SplitHintSpec
Returns an iterator of splits. A split has a list of files of the typeSplitHintSpec
.- Specified by:
split
in interfaceSplitHintSpec
- Parameters:
inputIterator
- that returns input files.inputAttributeExtractor
- to createInputFileAttribute
for each input file. This may involve a network call, so implementations of SplitHintSpec should use it only if needed, and reuse results if appropriate.
-
-