Package org.apache.beam.sdk.io.datadog
Class DatadogEventWriter
java.lang.Object
org.apache.beam.sdk.transforms.DoFn<KV<Integer,DatadogEvent>,DatadogWriteError>
org.apache.beam.sdk.io.datadog.DatadogEventWriter
- All Implemented Interfaces:
Serializable,HasDisplayData
A
DoFn to write DatadogEvents to Datadog's Logs API.- 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 -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.beam.sdk.io.datadog.DatadogEventWriter.Builderstatic org.apache.beam.sdk.io.datadog.DatadogEventWriter.BuildernewBuilder(Integer minBatchCount) voidonExpiry(DoFn.OutputReceiver<DatadogWriteError> receiver, BagState<DatadogEvent> bufferState, ValueState<Long> countState, ValueState<Long> bufferSizeState) voidprocessElement(KV<Integer, DatadogEvent> input, DoFn.OutputReceiver<DatadogWriteError> receiver, BoundedWindow window, BagState<DatadogEvent> bufferState, ValueState<Long> countState, ValueState<Long> bufferSizeState, Timer timer) voidsetup()voidtearDown()Methods inherited from class org.apache.beam.sdk.transforms.DoFn
getAllowedTimestampSkew, getInputTypeDescriptor, getOutputTypeDescriptor, populateDisplayData, prepareForProcessing
-
Field Details
-
INVALID_URL_FORMAT_MESSAGE
- See Also:
-
-
Method Details
-
newBuilder
public static org.apache.beam.sdk.io.datadog.DatadogEventWriter.Builder newBuilder() -
newBuilder
-
setup
-
processElement
@ProcessElement public void processElement(@Element KV<Integer, DatadogEvent> input, DoFn.OutputReceiver<DatadogWriteError> receiver, BoundedWindow window, @StateId("buffer") BagState<DatadogEvent> bufferState, @StateId("count") ValueState<Long> countState, @StateId("buffer_size") ValueState<Long> bufferSizeState, @TimerId("expiry") Timer timer) throws IOException- Throws:
IOException
-
onExpiry
@OnTimer("expiry") public void onExpiry(DoFn.OutputReceiver<DatadogWriteError> receiver, @StateId("buffer") BagState<DatadogEvent> bufferState, @StateId("count") ValueState<Long> countState, @StateId("buffer_size") ValueState<Long> bufferSizeState) throws IOException - Throws:
IOException
-
tearDown
-