Github user priyank5485 commented on a diff in the pull request: https://github.com/apache/storm/pull/1665#discussion_r77241785 --- Diff: external/storm-kafka-monitor/src/main/java/org/apache/storm/kafka/monitor/KafkaOffsetLagUtil.java --- @@ -373,16 +377,20 @@ private static Options buildOptions () { curatorFramework.start(); String partitionPrefix = "partition_"; String zkPath = oldKafkaSpoutOffsetQuery.getZkPath(); - if (!zkPath.endsWith("/")) { - zkPath += "/"; + if (zkPath.endsWith("/")) { --- End diff -- This is called from TopologySpoutLag using ShellUtils to display the results in UI. It is expected that KafkaOffsetLagUtil will always exit with code 0, unless there is a command line options error. TopologySpout guarantees that it will never call with wrong command line arguments. For any other runtime errors it will still exit with code 0, printing out the error condition on System.out. Reason is we want the error message to be displayed in UI. That is why there is a catch all block in the main method. If exit code is not 0, ShellUtils will throw an exception and there will be no meaningful message printed on storm UI. Instead of exiting here, can you throw an exception with a message like "zk node does not exist" and let the main method catch it. If you want to test out what I mentioned you can build a quick topology with kafka spout and look at storm ui.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---