Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-24203

Improve Kafka service check to check for under-replicated partitions

    XMLWordPrintableJSON

Details

    Description

      During Ambari Rolling Upgrade, we invoke Kafka Service check to ensure that Kafka is healthy. The current implementation only does basic topic creation/deletion. We need to extend the implementation to check for number of under-replicated partitions.

      We have this support in kafka-topics.sh script which is already used in the kafka service check script. We need to extend above script to call below command

      sh kafka-topics.sh --describe --zookeeper localhost:2181 --under-replicated-partitions
      

      If the command output is empty, then there are no under replicated partotions.
      If the output contains "Topic:" string, then there are some under replicated partitions, we can fail the service check.

      sh kafka-topics.sh --describe --zookeeper localhost:2181 --under-replicated-partitions
       Topic: TEST Partition: 0 Leader: 1 Replicas: 1,2 Isr: 1
       Topic: TEST Partition: 1 Leader: 1 Replicas: 2,1 Isr: 1

      Attachments

        Issue Links

          Activity

            People

              YolandaMDavis Yolanda M. Davis
              YolandaMDavis Yolanda M. Davis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h