public class ExecutionStateSampler.ExecutionStateTracker extends java.lang.Object implements BundleProgressReporter
BundleProgressReporter.InMemory, BundleProgressReporter.Registrar| Modifier and Type | Method and Description |
|---|---|
ExecutionStateSampler.ExecutionState |
create(java.lang.String shortId,
java.lang.String ptransformId,
java.lang.String ptransformUniqueName,
java.lang.String stateName)
Returns an
ExecutionStateSampler.ExecutionState bound to this tracker for the specified transform and
processing state. |
@Nullable java.lang.String |
getCurrentThreadsPTransformId()
Returns the ptransform id of the currently executing thread.
|
org.apache.beam.sdk.metrics.MetricsContainer |
getMetricsContainer()
Returns a
MetricsContainer that delegates based upon the current execution state to
the appropriate metrics container that is bound to the current ExecutionStateSampler.ExecutionState or to
the unbound MetricsContainer if no execution state is currently running. |
org.apache.beam.runners.core.metrics.MetricsContainerStepMap |
getMetricsContainerRegistry()
Returns the
MetricsContainerStepMap that is managed by this ExecutionStateSampler.ExecutionStateTracker. |
@Nullable ExecutionStateSampler.ExecutionStateTrackerStatus |
getStatus()
Returns status information related to this tracker or null if not tracking a bundle.
|
void |
reset()
Stops tracking execution states allowing for the
ExecutionStateSampler.ExecutionStateTracker to be re-used
for another bundle. |
void |
start(java.lang.String processBundleId)
Starts tracking execution states for specified
processBundleId. |
void |
updateFinalMonitoringData(java.util.Map<java.lang.String,org.apache.beam.vendor.grpc.v1p60p1.com.google.protobuf.ByteString> monitoringData)
Update the monitoring data for a bundle that has finished processing.
|
void |
updateIntermediateMonitoringData(java.util.Map<java.lang.String,org.apache.beam.vendor.grpc.v1p60p1.com.google.protobuf.ByteString> monitoringData)
Update the monitoring data for a bundle that is currently being processed.
|
public org.apache.beam.runners.core.metrics.MetricsContainerStepMap getMetricsContainerRegistry()
MetricsContainerStepMap that is managed by this ExecutionStateSampler.ExecutionStateTracker. This metrics container registry stores all the user counters
associated for the current bundle execution.public org.apache.beam.sdk.metrics.MetricsContainer getMetricsContainer()
MetricsContainer that delegates based upon the current execution state to
the appropriate metrics container that is bound to the current ExecutionStateSampler.ExecutionState or to
the unbound MetricsContainer if no execution state is currently running.public ExecutionStateSampler.ExecutionState create(java.lang.String shortId, java.lang.String ptransformId, java.lang.String ptransformUniqueName, java.lang.String stateName)
ExecutionStateSampler.ExecutionState bound to this tracker for the specified transform and
processing state.public @Nullable ExecutionStateSampler.ExecutionStateTrackerStatus getStatus()
public @Nullable java.lang.String getCurrentThreadsPTransformId()
public void start(java.lang.String processBundleId)
processBundleId.
Only invoked by the bundle processing thread.
public void updateIntermediateMonitoringData(java.util.Map<java.lang.String,org.apache.beam.vendor.grpc.v1p60p1.com.google.protobuf.ByteString> monitoringData)
BundleProgressReporterMust be invoked while holding the ProcessBundleHandler.BundleProcessor.getProgressRequestLock().
updateIntermediateMonitoringData in interface BundleProgressReporterpublic void updateFinalMonitoringData(java.util.Map<java.lang.String,org.apache.beam.vendor.grpc.v1p60p1.com.google.protobuf.ByteString> monitoringData)
BundleProgressReporterMust be invoked from the main bundle processing thread and while holding the ProcessBundleHandler.BundleProcessor.getProgressRequestLock().
updateFinalMonitoringData in interface BundleProgressReporterpublic void reset()
ExecutionStateSampler.ExecutionStateTracker to be re-used
for another bundle.reset in interface BundleProgressReporter