Package org.apache.druid.data.input
Class SegmentsSplitHintSpec
java.lang.Object
org.apache.druid.data.input.SegmentsSplitHintSpec
- All Implemented Interfaces:
SplitHintSpec
SplitHintSpec for DruidInputSource.
In DruidInputSource, this spec is converted into MaxSizeSplitHintSpec. As a result, its split(java.util.Iterator<T>, java.util.function.Function<T, org.apache.druid.data.input.InputFileAttribute>)
method is never called. This doesn't necessarily mean this class is deprecated in favor of the MaxSizeSplitHintSpec.
We may want to create more optimized splits in the future. For example, segments can be split to maximize the rollup
ratio if the segments have different sets of columns or even different value ranges of columns.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSegmentsSplitHintSpec(HumanReadableBytes maxInputSegmentBytesPerTask, Integer maxNumSegments) -
Method Summary
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
SegmentsSplitHintSpec
public SegmentsSplitHintSpec(@Nullable HumanReadableBytes maxInputSegmentBytesPerTask, @Nullable Integer maxNumSegments)
-
-
Method Details
-
getMaxInputSegmentBytesPerTask
-
getMaxNumSegments
public int getMaxNumSegments() -
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() -
toString
-