T
- the type of input and output elementIdT
- the type of representative values used to deduppublic static class Distinct.WithRepresentativeValues<T,IdT> extends PTransform<PCollection<T>,PCollection<T>>
Distinct
PTransform
that uses a SerializableFunction
to
obtain a representative value for each input element.
Construct via Distinct.withRepresentativeValueFn(SerializableFunction)
.
name
Modifier and Type | Method and Description |
---|---|
PCollection<T> |
expand(PCollection<T> in)
Applies this
PTransform on the given InputT , and returns its
Output . |
Distinct.WithRepresentativeValues<T,IdT> |
withRepresentativeType(TypeDescriptor<IdT> type)
Return a
WithRepresentativeValues PTransform that is like this one, but with
the specified output type descriptor. |
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validate
public PCollection<T> expand(PCollection<T> in)
PTransform
PTransform
on the given InputT
, and returns its
Output
.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand
in class PTransform<PCollection<T>,PCollection<T>>
public Distinct.WithRepresentativeValues<T,IdT> withRepresentativeType(TypeDescriptor<IdT> type)
WithRepresentativeValues
PTransform
that is like this one, but with
the specified output type descriptor.
Required for use of
Distinct.withRepresentativeValueFn(SerializableFunction)
in Java 8 with a lambda as the fn.
type
- a TypeDescriptor
describing the representative type of this
WithRepresentativeValues
WithRepresentativeValues
PTransform
that is like this one, but with
the specified output type descriptor.