public class BackPressureStatsTrackerImpl extends Object implements BackPressureStatsTracker
BackPressureSampleService
for more details about how back pressure ratio of a task is calculated.Constructor and Description |
---|
BackPressureStatsTrackerImpl(BackPressureRequestCoordinator coordinator,
int cleanUpInterval,
int refreshInterval)
Creates a back pressure statistics tracker.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanUpOperatorStatsCache()
Cleans up the operator stats cache if it contains timed out entries.
|
Optional<OperatorBackPressureStats> |
getOperatorBackPressureStats(ExecutionJobVertex vertex)
Returns back pressure statistics for a operator.
|
void |
shutDown()
Shuts down the stats tracker.
|
public BackPressureStatsTrackerImpl(BackPressureRequestCoordinator coordinator, int cleanUpInterval, int refreshInterval)
coordinator
- Coordinator for back pressure stats request.cleanUpInterval
- Clean up interval for completed stats.refreshInterval
- Time interval after which the available back pressure
stats are deprecated and need to be refreshed.public Optional<OperatorBackPressureStats> getOperatorBackPressureStats(ExecutionJobVertex vertex)
getOperatorBackPressureStats
in interface BackPressureStatsTracker
vertex
- Operator to get the stats for.public void cleanUpOperatorStatsCache()
The Guava cache only evicts as maintenance during normal operations. If this handler is inactive, it will never be cleaned.
cleanUpOperatorStatsCache
in interface BackPressureStatsTracker
public void shutDown()
Invalidates the cache and clears all pending stats.
shutDown
in interface BackPressureStatsTracker
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.