public static interface PTransformRunnerFactory.Context
| Modifier and Type | Method and Description |
|---|---|
void |
addBundleProgressReporter(BundleProgressReporter bundleProgressReporter)
Register a callback whenever progress is being requested.
|
void |
addFinishBundleFunction(org.apache.beam.sdk.function.ThrowingRunnable finishBundleFunction)
Register any
DoFn.FinishBundle methods. |
<T> void |
addIncomingDataEndpoint(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor,
org.apache.beam.sdk.coders.Coder<T> coder,
org.apache.beam.sdk.fn.data.FnDataReceiver<T> receiver) |
<T> void |
addIncomingTimerEndpoint(java.lang.String timerFamilyId,
org.apache.beam.sdk.coders.Coder<org.apache.beam.runners.core.construction.Timer<T>> coder,
org.apache.beam.sdk.fn.data.FnDataReceiver<org.apache.beam.runners.core.construction.Timer<T>> receiver) |
<T> org.apache.beam.sdk.fn.data.FnDataReceiver<T> |
addOutgoingDataEndpoint(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor,
org.apache.beam.sdk.coders.Coder<T> coder)
Registers the outbound data endpoint with given
Endpoints.ApiServiceDescriptor and
Coder, returns the FnDataReceiver responsible for sending the outbound data. |
<T> org.apache.beam.sdk.fn.data.FnDataReceiver<org.apache.beam.runners.core.construction.Timer<T>> |
addOutgoingTimersEndpoint(java.lang.String timerFamilyId,
org.apache.beam.sdk.coders.Coder<org.apache.beam.runners.core.construction.Timer<T>> coder)
Registers the outbound timers endpoint with given timer family id and
Coder, returns
the FnDataReceiver responsible for sending the outbound timers. |
<T> void |
addPCollectionConsumer(java.lang.String pCollectionId,
org.apache.beam.sdk.fn.data.FnDataReceiver<org.apache.beam.sdk.util.WindowedValue<T>> consumer)
Register as a consumer for a given PCollection id.
|
void |
addResetFunction(org.apache.beam.sdk.function.ThrowingRunnable resetFunction)
Register any reset methods.
|
void |
addStartBundleFunction(org.apache.beam.sdk.function.ThrowingRunnable startBundleFunction)
Register any
DoFn.StartBundle methods. |
void |
addTearDownFunction(org.apache.beam.sdk.function.ThrowingRunnable tearDownFunction)
Register a tear down handler.
|
BeamFnDataClient |
getBeamFnDataClient()
A client for handling inbound and outbound data streams.
|
BeamFnStateClient |
getBeamFnStateClient()
A client for handling state requests.
|
java.util.function.Supplier<Cache<?,?>> |
getBundleCacheSupplier()
A cache that is used for each bundle and cleared when the bundle completes.
|
org.apache.beam.sdk.transforms.DoFn.BundleFinalizer |
getBundleFinalizer()
Register callbacks that will be invoked when the runner completes the bundle.
|
java.util.function.Supplier<java.util.List<org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleRequest.CacheToken>> |
getCacheTokensSupplier()
A supplier containing the active cache tokens for this bundle.
|
java.util.Map<java.lang.String,org.apache.beam.model.pipeline.v1.RunnerApi.Coder> |
getCoders()
An immutable mapping from coder id to coder definition.
|
<T> org.apache.beam.sdk.fn.data.FnDataReceiver<T> |
getPCollectionConsumer(java.lang.String pCollectionId)
Returns a
FnDataReceiver to send output to for the specified PCollection id. |
java.util.Map<java.lang.String,org.apache.beam.model.pipeline.v1.RunnerApi.PCollection> |
getPCollections()
An immutable mapping from PCollection id to PCollection definition.
|
org.apache.beam.sdk.options.PipelineOptions |
getPipelineOptions()
Pipeline options.
|
java.util.function.Supplier<java.lang.String> |
getProcessBundleInstructionIdSupplier()
A supplier containing the active process bundle instruction id.
|
Cache<?,?> |
getProcessWideCache()
A cache that is process wide and persists across bundle boundaries.
|
org.apache.beam.model.pipeline.v1.RunnerApi.PTransform |
getPTransform()
The PTransform definition.
|
java.lang.String |
getPTransformId()
The id of the PTransform.
|
java.util.Set<java.lang.String> |
getRunnerCapabilities()
An immutable set of runner capability urns.
|
org.apache.beam.runners.core.metrics.ShortIdMap |
getShortIdMap()
A way to get or create monitoring short ids.
|
BundleSplitListener |
getSplitListener()
A listener to be invoked when the PTransform splits itself.
|
java.util.Map<java.lang.String,org.apache.beam.model.pipeline.v1.RunnerApi.WindowingStrategy> |
getWindowingStrategies()
An immutable mapping from windowing strategy id to windowing strategy definition.
|
org.apache.beam.sdk.options.PipelineOptions getPipelineOptions()
org.apache.beam.runners.core.metrics.ShortIdMap getShortIdMap()
BeamFnDataClient getBeamFnDataClient()
BeamFnStateClient getBeamFnStateClient()
java.lang.String getPTransformId()
org.apache.beam.model.pipeline.v1.RunnerApi.PTransform getPTransform()
java.util.function.Supplier<java.lang.String> getProcessBundleInstructionIdSupplier()
java.util.function.Supplier<java.util.List<org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleRequest.CacheToken>> getCacheTokensSupplier()
java.util.function.Supplier<Cache<?,?>> getBundleCacheSupplier()
Cache<?,?> getProcessWideCache()
java.util.Map<java.lang.String,org.apache.beam.model.pipeline.v1.RunnerApi.PCollection> getPCollections()
java.util.Map<java.lang.String,org.apache.beam.model.pipeline.v1.RunnerApi.Coder> getCoders()
java.util.Map<java.lang.String,org.apache.beam.model.pipeline.v1.RunnerApi.WindowingStrategy> getWindowingStrategies()
java.util.Set<java.lang.String> getRunnerCapabilities()
<T> void addPCollectionConsumer(java.lang.String pCollectionId,
org.apache.beam.sdk.fn.data.FnDataReceiver<org.apache.beam.sdk.util.WindowedValue<T>> consumer)
<T> org.apache.beam.sdk.fn.data.FnDataReceiver<T> getPCollectionConsumer(java.lang.String pCollectionId)
FnDataReceiver to send output to for the specified PCollection id.<T> org.apache.beam.sdk.fn.data.FnDataReceiver<T> addOutgoingDataEndpoint(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor,
org.apache.beam.sdk.coders.Coder<T> coder)
Endpoints.ApiServiceDescriptor and
Coder, returns the FnDataReceiver responsible for sending the outbound data.<T> org.apache.beam.sdk.fn.data.FnDataReceiver<org.apache.beam.runners.core.construction.Timer<T>> addOutgoingTimersEndpoint(java.lang.String timerFamilyId,
org.apache.beam.sdk.coders.Coder<org.apache.beam.runners.core.construction.Timer<T>> coder)
Coder, returns
the FnDataReceiver responsible for sending the outbound timers.void addStartBundleFunction(org.apache.beam.sdk.function.ThrowingRunnable startBundleFunction)
DoFn.StartBundle methods.void addFinishBundleFunction(org.apache.beam.sdk.function.ThrowingRunnable finishBundleFunction)
DoFn.FinishBundle methods.<T> void addIncomingDataEndpoint(org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor,
org.apache.beam.sdk.coders.Coder<T> coder,
org.apache.beam.sdk.fn.data.FnDataReceiver<T> receiver)
<T> void addIncomingTimerEndpoint(java.lang.String timerFamilyId,
org.apache.beam.sdk.coders.Coder<org.apache.beam.runners.core.construction.Timer<T>> coder,
org.apache.beam.sdk.fn.data.FnDataReceiver<org.apache.beam.runners.core.construction.Timer<T>> receiver)
void addResetFunction(org.apache.beam.sdk.function.ThrowingRunnable resetFunction)
addFinishBundleFunction(org.apache.beam.sdk.function.ThrowingRunnable). The reset method is guaranteed to be invoked
after the bundle completes successfully and after T becomes ineligible to receive
requests for monitoring data related to addBundleProgressReporter(org.apache.beam.fn.harness.control.BundleProgressReporter) or getSplitListener().void addTearDownFunction(org.apache.beam.sdk.function.ThrowingRunnable tearDownFunction)
T is eligible to
become garbage collected.void addBundleProgressReporter(BundleProgressReporter bundleProgressReporter)
BundleProgressReporter.updateIntermediateMonitoringData(java.util.Map<java.lang.String, org.apache.beam.vendor.grpc.v1p54p0.com.google.protobuf.ByteString>) will be called by a single
arbitrary thread at a time and will be invoked concurrently to the main bundle processing
thread. BundleProgressReporter.updateFinalMonitoringData(java.util.Map<java.lang.String, org.apache.beam.vendor.grpc.v1p54p0.com.google.protobuf.ByteString>) will be invoked exclusively
by the main bundle processing thread and BundleProgressReporter.updateIntermediateMonitoringData(java.util.Map<java.lang.String, org.apache.beam.vendor.grpc.v1p54p0.com.google.protobuf.ByteString>) will not be invoked until a new
bundle starts processing. See BundleProgressReporter for additional details.
BundleSplitListener getSplitListener()
pCollectionConsumerRegistry, startFunctionRegistry, and finishFunctionRegistry.org.apache.beam.sdk.transforms.DoFn.BundleFinalizer getBundleFinalizer()