public class BackPressureStatsTrackerImpl extends Object implements BackPressureStatsTracker
Back pressure is determined by sampling running tasks. If a task is
slowed down by back pressure it will be stuck in memory requests to a
LocalBufferPool
.
The back pressured stack traces look like this:
java.lang.Object.wait(Native Method) o.a.f.[...].LocalBufferPool.requestBuffer(LocalBufferPool.java:163) o.a.f.[...].LocalBufferPool.requestBufferBlocking(LocalBufferPool.java:133) <--- BLOCKING request [...]
Constructor and Description |
---|
BackPressureStatsTrackerImpl(StackTraceSampleCoordinator coordinator,
int cleanUpInterval,
int numSamples,
int backPressureStatsRefreshInterval,
Time delayBetweenSamples)
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.
|
long |
getCleanUpInterval()
Cleanup interval for completed stats cache.
|
Optional<OperatorBackPressureStats> |
getOperatorBackPressureStats(ExecutionJobVertex vertex)
Returns back pressure statistics for a operator.
|
void |
shutDown()
Shuts down the stats tracker.
|
boolean |
triggerStackTraceSample(ExecutionJobVertex vertex)
Deprecated.
getOperatorBackPressureStats(ExecutionJobVertex) will trigger
stack trace sampling automatically. |
public BackPressureStatsTrackerImpl(StackTraceSampleCoordinator coordinator, int cleanUpInterval, int numSamples, int backPressureStatsRefreshInterval, Time delayBetweenSamples)
cleanUpInterval
- Clean up interval for completed stats.numSamples
- Number of stack trace samples when determining back pressure.delayBetweenSamples
- Delay between samples when determining back pressure.public long getCleanUpInterval()
public Optional<OperatorBackPressureStats> getOperatorBackPressureStats(ExecutionJobVertex vertex)
getOperatorBackPressureStats
in interface BackPressureStatsTracker
vertex
- Operator to get the stats for.@Deprecated public boolean triggerStackTraceSample(ExecutionJobVertex vertex)
getOperatorBackPressureStats(ExecutionJobVertex)
will trigger
stack trace sampling automatically.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.