public class ShuffleUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T,SD extends ShuffleDescriptor> |
applyWithShuffleTypeCheck(Class<SD> shuffleDescriptorClass,
ShuffleDescriptor shuffleDescriptor,
java.util.function.Function<UnknownShuffleDescriptor,T> functionOfUnknownDescriptor,
java.util.function.Function<SD,T> functionOfKnownDescriptor)
Apply different functions to known and unknown
ShuffleDescriptor s. |
public static <T,SD extends ShuffleDescriptor> T applyWithShuffleTypeCheck(Class<SD> shuffleDescriptorClass, ShuffleDescriptor shuffleDescriptor, java.util.function.Function<UnknownShuffleDescriptor,T> functionOfUnknownDescriptor, java.util.function.Function<SD,T> functionOfKnownDescriptor)
ShuffleDescriptor
s.
Also casts known ShuffleDescriptor
.
T
- return type of called functionsSD
- concrete type of shuffleDescriptor
to checkshuffleDescriptorClass
- concrete class of shuffleDescriptor
shuffleDescriptor
- concrete shuffle descriptor to checkfunctionOfUnknownDescriptor
- supplier to call in case shuffleDescriptor
is unknownfunctionOfKnownDescriptor
- function to call in case shuffleDescriptor
is knownCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.