public class BackPressureStatsTracker extends Object
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 |
---|
BackPressureStatsTracker(StackTraceSampleCoordinator coordinator,
int cleanUpInterval,
int numSamples,
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.
|
scala.Option<OperatorBackPressureStats> |
getOperatorBackPressureStats(ExecutionJobVertex vertex)
Returns back pressure statistics for a operator.
|
void |
shutDown()
Shuts down the stats tracker.
|
boolean |
triggerStackTraceSample(ExecutionJobVertex vertex)
Triggers a stack trace sample for a operator to gather the back pressure
statistics.
|
public BackPressureStatsTracker(StackTraceSampleCoordinator coordinator, int cleanUpInterval, int numSamples, 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 scala.Option<OperatorBackPressureStats> getOperatorBackPressureStats(ExecutionJobVertex vertex)
vertex
- Operator to get the stats for.public boolean triggerStackTraceSample(ExecutionJobVertex vertex)
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.
public void shutDown()
Invalidates the cache and clears all pending stats.
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.