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 aJsonSubTypesinSplitHintSpec, 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 FilePerSplitHintSpecINSTANCE
-
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:SplitHintSpecReturns an iterator of splits. A split has a list of files of the typeSplitHintSpec.- Specified by:
splitin interfaceSplitHintSpec- Parameters:
inputIterator- that returns input files.inputAttributeExtractor- to createInputFileAttributefor each input file. This may involve a network call, so implementations of SplitHintSpec should use it only if needed, and reuse results if appropriate.
-
-