Github user abellina commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1665#discussion_r77107294
  
    --- 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("/")) {
    +            zkPath = zkPath.substring(0, zkPath.length()-1);
    +        }
    +        if (curatorFramework.checkExists().forPath(zkPath) == null) {
    +           System.out.printf("--zk-node '%s' is not exists.%n", zkPath);
    --- End diff --
    
    %n? You mean.. println? Also small nit: "is not exists" => "does not exist"
    
    This is also using tabs so the indentation is off. Why not use spaces (4 
spaces)?


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

Reply via email to