Package org.apache.druid.data.input
Class MaxSizeSplitHintSpec
java.lang.Object
org.apache.druid.data.input.MaxSizeSplitHintSpec
- All Implemented Interfaces:
SplitHintSpec
A SplitHintSpec that can create splits of multiple files.
A split created by this class can have one or more input files.
If there is only one file in the split, its size can be larger than
maxSplitSize.
If there are two or more files in the split, their total size cannot be larger than maxSplitSize.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMaxSizeSplitHintSpec(long maxSplitSize, Integer maxNumFiles) MaxSizeSplitHintSpec(HumanReadableBytes maxSplitSize, Integer maxNumFiles) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintinthashCode()split(Iterator<T> inputIterator, Function<T, InputFileAttribute> inputAttributeExtractor) Returns an iterator of splits.
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
MaxSizeSplitHintSpec
public MaxSizeSplitHintSpec(@Nullable HumanReadableBytes maxSplitSize, @Nullable Integer maxNumFiles) -
MaxSizeSplitHintSpec
-
-
Method Details
-
getMaxSplitSize
-
getMaxNumFiles
public int getMaxNumFiles() -
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.
-
equals
-
hashCode
public int hashCode()
-