Package org.apache.beam.sdk.transforms
Class View.ToListViewDoFn<T>
java.lang.Object
org.apache.beam.sdk.transforms.DoFn<T,KV<Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>>
org.apache.beam.sdk.transforms.View.ToListViewDoFn<T>
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
View
@Internal
public static class View.ToListViewDoFn<T>
extends DoFn<T,KV<Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>>
Provides an index to value mapping using a random starting index and also provides an offset
range for each window seen. We use random offset ranges to minimize the chance that two ranges
overlap increasing the odds that each "key" represents a single index.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.beam.sdk.transforms.DoFn
DoFn.AlwaysFetched, DoFn.BoundedPerElement, DoFn.BundleFinalizer, DoFn.Element, DoFn.FieldAccess, DoFn.FinishBundle, DoFn.FinishBundleContext, DoFn.GetInitialRestriction, DoFn.GetInitialWatermarkEstimatorState, DoFn.GetRestrictionCoder, DoFn.GetSize, DoFn.GetWatermarkEstimatorStateCoder, DoFn.Key, DoFn.MultiOutputReceiver, DoFn.NewTracker, DoFn.NewWatermarkEstimator, DoFn.OnTimer, DoFn.OnTimerContext, DoFn.OnTimerFamily, DoFn.OnWindowExpiration, DoFn.OnWindowExpirationContext, DoFn.OutputReceiver<T>, DoFn.ProcessContext, DoFn.ProcessContinuation, DoFn.ProcessElement, DoFn.RequiresStableInput, DoFn.RequiresTimeSortedInput, DoFn.Restriction, DoFn.Setup, DoFn.SideInput, DoFn.SplitRestriction, DoFn.StartBundle, DoFn.StartBundleContext, DoFn.StateId, DoFn.Teardown, DoFn.TimerFamily, DoFn.TimerId, DoFn.Timestamp, DoFn.TruncateRestriction, DoFn.UnboundedPerElement, DoFn.WatermarkEstimatorState, DoFn.WindowedContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
finishBundle
(DoFn<T, KV<Long, PCollectionViews.ValueOrMetadata<T, OffsetRange>>>.FinishBundleContext c) void
processElement
(DoFn<T, KV<Long, PCollectionViews.ValueOrMetadata<T, OffsetRange>>>.ProcessContext c, BoundedWindow window) Methods inherited from class org.apache.beam.sdk.transforms.DoFn
getAllowedTimestampSkew, getInputTypeDescriptor, getOutputTypeDescriptor, populateDisplayData, prepareForProcessing
-
Constructor Details
-
ToListViewDoFn
public ToListViewDoFn()
-
-
Method Details
-
processElement
@ProcessElement public void processElement(DoFn<T, KV<Long, PCollectionViews.ValueOrMetadata<T, OffsetRange>>>.ProcessContext c, BoundedWindow window) -
finishBundle
@FinishBundle public void finishBundle(DoFn<T, KV<Long, PCollectionViews.ValueOrMetadata<T, OffsetRange>>>.FinishBundleContext c)
-