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 and Description
    --- | ---
    `static class` | `BackPressureTracker.BackpressureState`

  - ### Constructor Summary

    Constructors
    Constructor and 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 and 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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BackPressureTracker

          public BackPressureTracker(String workerId,
                                     Map<Integer,JCQueue> localTasksToQueues,
                                     StormMetricRegistry metricRegistry,
                                     Map<Integer,String> taskToComponent)

  - ### 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)

Copyright © 2021 The Apache Software Foundation. All rights reserved.