T
- public class SampleWithFraction<T>
extends org.apache.flink.api.common.functions.RichMapPartitionFunction<T,T>
Constructor and Description |
---|
SampleWithFraction(boolean withReplacement,
double fraction,
long seed)
Create a function instance of SampleWithFraction.
|
Modifier and Type | Method and Description |
---|---|
void |
mapPartition(Iterable<T> values,
org.apache.flink.util.Collector<T> out) |
public SampleWithFraction(boolean withReplacement, double fraction, long seed)
withReplacement
- Whether element can be selected more than once.fraction
- Probability that each element is selected.seed
- random number generator seed.Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.