T - the data type wrapped in ElementWithRandom as input.@Internal public class SampleInCoordinator<T> extends Object implements org.apache.flink.api.common.functions.GroupReduceFunction<IntermediateSampleData<T>,T>
| Constructor and Description |
|---|
SampleInCoordinator(boolean withReplacement,
int numSample,
long seed)
Create a function instance of SampleInCoordinator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
reduce(Iterable<IntermediateSampleData<T>> values,
org.apache.flink.util.Collector<T> out) |
public SampleInCoordinator(boolean withReplacement,
int numSample,
long seed)
withReplacement - Whether element can be selected more than once.numSample - Fixed sample size.seed - Random generator seed.public void reduce(Iterable<IntermediateSampleData<T>> values, org.apache.flink.util.Collector<T> out) throws Exception
reduce in interface org.apache.flink.api.common.functions.GroupReduceFunction<IntermediateSampleData<T>,T>ExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.