T - The type of input data@Internal public class SampleInPartition<T> extends org.apache.flink.api.common.functions.RichMapPartitionFunction<T,IntermediateSampleData<T>>
| 构造器和说明 |
|---|
SampleInPartition(boolean withReplacement,
int numSample,
long seed)
Create a function instance of SampleInPartition.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
mapPartition(Iterable<T> values,
org.apache.flink.util.Collector<IntermediateSampleData<T>> out) |
public SampleInPartition(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 mapPartition(Iterable<T> values, org.apache.flink.util.Collector<IntermediateSampleData<T>> out) throws Exception
mapPartition 在接口中 org.apache.flink.api.common.functions.MapPartitionFunction<T,IntermediateSampleData<T>>mapPartition 在类中 org.apache.flink.api.common.functions.RichMapPartitionFunction<T,IntermediateSampleData<T>>ExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.