public class MaxSizeSplitHintSpec extends Object implements SplitHintSpec
maxSplitSize
.
If there are two or more files in the split, their total size cannot be larger than maxSplitSize
.Constructor and Description |
---|
MaxSizeSplitHintSpec(HumanReadableBytes maxSplitSize,
Integer maxNumFiles) |
MaxSizeSplitHintSpec(long maxSplitSize,
Integer maxNumFiles) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getMaxNumFiles() |
HumanReadableBytes |
getMaxSplitSize() |
int |
hashCode() |
<T> Iterator<List<T>> |
split(Iterator<T> inputIterator,
Function<T,InputFileAttribute> inputAttributeExtractor)
Returns an iterator of splits.
|
public static final String TYPE
public MaxSizeSplitHintSpec(@Nullable HumanReadableBytes maxSplitSize, @Nullable Integer maxNumFiles)
public HumanReadableBytes getMaxSplitSize()
public int getMaxNumFiles()
public <T> Iterator<List<T>> split(Iterator<T> inputIterator, Function<T,InputFileAttribute> inputAttributeExtractor)
SplitHintSpec
T
.split
in interface SplitHintSpec
inputIterator
- that returns input files.inputAttributeExtractor
- to create InputFileAttribute
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.Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.