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 thisPTransform
should be expanded on the givenInputT
.withDuration
(Duration duration) Return aWithRepresentativeValues
PTransform
that is like this one, but with the specified deduplication duration.withRepresentativeCoder
(Coder<IdT> coder) Return aWithRepresentativeValues
PTransform
that is like this one, but with the specified id type coder.Return aWithRepresentativeValues
PTransform
that is like this one, but with the specified id type descriptor.withTimeDomain
(TimeDomain timeDomain) Returns aWithRepresentativeValues
PTransform
like 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 aWithRepresentativeValues
PTransform
that 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
- aTypeDescriptor
describing the representative type of thisWithRepresentativeValues
- Returns:
- A
WithRepresentativeValues
PTransform
that is like this one, but with the specified representative value type descriptor. Any previously set representative value coder will be cleared.
-
withRepresentativeCoder
Return aWithRepresentativeValues
PTransform
that 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
- aCoder
capable of encoding the representative type of thisWithRepresentativeValues
- Returns:
- A
WithRepresentativeValues
PTransform
that is like this one, but with the specified representative value coder. Any previously set representative value type descriptor will be cleared.
-
withTimeDomain
Returns aWithRepresentativeValues
PTransform
like this one but with the specified time domain. -
withDuration
Return aWithRepresentativeValues
PTransform
that is like this one, but with the specified deduplication duration. -
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.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:
expand
in classPTransform<PCollection<T>,
PCollection<T>>
-