org.apache.storm.kafka.monitor

## Class KafkaOffsetLagUtil

- java.lang.Object
- - org.apache.storm.kafka.monitor.KafkaOffsetLagUtil

-     public class KafkaOffsetLagUtil
      extends Object

  Utility class for querying offset lag for kafka spout.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KafkaOffsetLagUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static List<KafkaOffsetLagResult>` | `getOffsetLags(NewKafkaSpoutOffsetQuery newKafkaSpoutOffsetQuery)` Get offset lags.
    `static void` | `main(String[] args)`

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

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

- - ### Constructor Detail

    - #### KafkaOffsetLagUtil

          public KafkaOffsetLagUtil()

  - ### Method Detail

    - #### main

          public static void main(String[] args)

    - #### getOffsetLags

          public static List<KafkaOffsetLagResult> getOffsetLags(NewKafkaSpoutOffsetQuery newKafkaSpoutOffsetQuery)
                                                          throws Exception

      Get offset lags.

      Parameters:
        `newKafkaSpoutOffsetQuery` - represents the information needed to query kafka for log head and spout offsets
      Returns:
        log head offset, spout offset and lag for each partition
      Throws:
        `Exception`

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