Package org.apache.storm.daemon.worker
Class BackPressureTracker
- java.lang.Object
-
- org.apache.storm.daemon.worker.BackPressureTracker
-
public class BackPressureTracker extends Object
Tracks the BackPressure status.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BackPressureTracker.BackpressureState
-
Constructor Summary
Constructors Constructor Description BackPressureTracker(String workerId, Map<Integer,JCQueue> localTasksToQueues, StormMetricRegistry metricRegistry, Map<Integer,String> taskToComponent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BackPressureTracker.BackpressureState
getBackpressureState(Integer taskId)
BackPressureStatus
getCurrStatus()
int
getLastOverflowCount(BackPressureTracker.BackpressureState state)
boolean
recordBackPressure(BackPressureTracker.BackpressureState state)
Record BP for a task.boolean
refreshBpTaskList()
void
setLastOverflowCount(BackPressureTracker.BackpressureState state, int value)
-
-
-
Method Detail
-
getBackpressureState
public BackPressureTracker.BackpressureState getBackpressureState(Integer taskId)
-
recordBackPressure
public boolean recordBackPressure(BackPressureTracker.BackpressureState state)
Record BP for a task.This is called by transferLocalBatch() on NettyWorker thread
- Returns:
- true if an update was recorded, false if taskId is already under BP
-
refreshBpTaskList
public boolean refreshBpTaskList()
-
getCurrStatus
public BackPressureStatus getCurrStatus()
-
getLastOverflowCount
public int getLastOverflowCount(BackPressureTracker.BackpressureState state)
-
setLastOverflowCount
public void setLastOverflowCount(BackPressureTracker.BackpressureState state, int value)
-
-