Class Deduplicate.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
- Enclosing class:
Deduplicate
PTransform that uses a SerializableFunction to obtain a representative value
for each input element used for deduplication.
Construct via Deduplicate.withRepresentativeValueFn(org.apache.beam.sdk.transforms.SerializableFunction<T, IdT>).
- 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> input) Override this method to specify how thisPTransformshould be expanded on the givenInputT.withDuration(Duration duration) Return aWithRepresentativeValuesPTransformthat is like this one, but with the specified deduplication duration.withRepresentativeCoder(Coder<IdT> coder) Return aWithRepresentativeValuesPTransformthat is like this one, but with the specified id type coder.Return aWithRepresentativeValuesPTransformthat is like this one, but with the specified id type descriptor.withTimeDomain(TimeDomain timeDomain) Returns aWithRepresentativeValuesPTransformlike this one but with the specified time domain.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
-
withRepresentativeType
Return aWithRepresentativeValuesPTransformthat is like this one, but with the specified id type descriptor.Either
withRepresentativeCoder(org.apache.beam.sdk.coders.Coder<IdT>)or this method must be invoked if usingDeduplicate.withRepresentativeValueFn(org.apache.beam.sdk.transforms.SerializableFunction<T, IdT>)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 representative value type descriptor. Any previously set representative value coder will be cleared.
-
withRepresentativeCoder
Return aWithRepresentativeValuesPTransformthat is like this one, but with the specified id type coder.Required for use of
Deduplicate.withRepresentativeValueFn(org.apache.beam.sdk.transforms.SerializableFunction<T, IdT>)in Java 8 with a lambda as the fn.- Parameters:
coder- aCodercapable of encoding the representative type of thisWithRepresentativeValues- Returns:
- A
WithRepresentativeValuesPTransformthat is like this one, but with the specified representative value coder. Any previously set representative value type descriptor will be cleared.
-
withTimeDomain
Returns aWithRepresentativeValuesPTransformlike this one but with the specified time domain. -
withDuration
Return aWithRepresentativeValuesPTransformthat is like this one, but with the specified deduplication duration. -
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>>
-