public class ShuffleUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T,SD extends ShuffleDescriptor> |
applyWithShuffleTypeCheck(Class<SD> shuffleDescriptorClass,
ShuffleDescriptor shuffleDescriptor,
Function<UnknownShuffleDescriptor,T> functionOfUnknownDescriptor,
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, Function<UnknownShuffleDescriptor,T> functionOfUnknownDescriptor, 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–2024 The Apache Software Foundation. All rights reserved.