public class RampupThrottlingFn<T> extends DoFn<T,T> implements java.io.Serializable
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 and Description |
---|
RampupThrottlingFn(int numWorkers) |
Modifier and Type | Method and Description |
---|---|
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
void |
processElement(DoFn.ProcessContext c)
Emit only as many elements as the exponentially increasing budget allows.
|
void |
setup() |
getAllowedTimestampSkew, getInputTypeDescriptor, getOutputTypeDescriptor, prepareForProcessing
@DoFn.Setup public void setup()
@DoFn.ProcessElement public void processElement(DoFn.ProcessContext c) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public void populateDisplayData(DisplayData.Builder builder)
DoFn
populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData)
. Implementations may call super.populateDisplayData(builder)
in order to register display data in the current namespace,
but should otherwise use subcomponent.populateDisplayData(builder)
to use the namespace
of the subcomponent.
By default, does not register any display data. Implementors may override this method to provide their own display data.
populateDisplayData
in interface HasDisplayData
populateDisplayData
in class DoFn<T,T>
builder
- The builder to populate with display data.HasDisplayData