Package org.apache.beam.sdk.transforms
Class Distinct.WithRepresentativeValues<T,IdT>
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<T>,PCollection<T>>
org.apache.beam.sdk.transforms.Distinct.WithRepresentativeValues<T,IdT>
- Type Parameters:
T- the type of input and output elementIdT- the type of representative values used to dedup
- All Implemented Interfaces:
Serializable,HasDisplayData
public static class Distinct.WithRepresentativeValues<T,IdT>
extends PTransform<PCollection<T>,PCollection<T>>
A
Distinct PTransform that uses a SerializableFunction to obtain a
representative value for each input element.
Construct via Distinct.withRepresentativeValueFn(SerializableFunction).
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Method Summary
Modifier and TypeMethodDescriptionexpand(PCollection<T> in) Override this method to specify how thisPTransformshould be expanded on the givenInputT.Return aWithRepresentativeValuesPTransformthat is like this one, but with the specified output type descriptor.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Method Details
-
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.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).
- Specified by:
expandin classPTransform<PCollection<T>,PCollection<T>>
-
withRepresentativeType
Return aWithRepresentativeValuesPTransformthat 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.- Parameters:
type- aTypeDescriptordescribing the representative type of thisWithRepresentativeValues- Returns:
- A
WithRepresentativeValuesPTransformthat is like this one, but with the specified output type descriptor.
-