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