Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A263D200B85 for ; Thu, 1 Sep 2016 04:59:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9C673160ABA; Thu, 1 Sep 2016 02:59:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DADB6160AB4 for ; Thu, 1 Sep 2016 04:59:34 +0200 (CEST) Received: (qmail 58930 invoked by uid 500); 1 Sep 2016 02:59:34 -0000 Mailing-List: contact dev-help@storm.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@storm.apache.org Delivered-To: mailing list dev@storm.apache.org Received: (qmail 58919 invoked by uid 99); 1 Sep 2016 02:59:33 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2016 02:59:33 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 71865DFD7B; Thu, 1 Sep 2016 02:59:33 +0000 (UTC) From: vesense To: dev@storm.apache.org Reply-To: dev@storm.apache.org References: In-Reply-To: Subject: [GitHub] storm pull request #1665: STORM-2074: fix storm-kafka-monitor NPE bug Content-Type: text/plain Message-Id: <20160901025933.71865DFD7B@git1-us-west.apache.org> Date: Thu, 1 Sep 2016 02:59:33 +0000 (UTC) archived-at: Thu, 01 Sep 2016 02:59:45 -0000 Github user vesense commented on a diff in the pull request: https://github.com/apache/storm/pull/1665#discussion_r77107687 --- 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 -- I think it is better to check the variable before use it. and the zkPath must not ends with `/`. the `printUsageAndExit` method needs argument `Options` which is not available in `getOldConsumerOffsetsFromZk`. so I use `exit` directly. --- 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---