Package 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
  Description
  `KafkaOffsetLagUtil()`

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### KafkaOffsetLagUtil

    public KafkaOffsetLagUtil()

- ## Method Details

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