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 544AB200C86 for ; Wed, 17 May 2017 07:20:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 52ACB160BC9; Wed, 17 May 2017 05:20:01 +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 99257160BC1 for ; Wed, 17 May 2017 07:20:00 +0200 (CEST) Received: (qmail 83843 invoked by uid 500); 17 May 2017 05:19:59 -0000 Mailing-List: contact commits-help@kylin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kylin.apache.org Delivered-To: mailing list commits@kylin.apache.org Received: (qmail 83834 invoked by uid 99); 17 May 2017 05:19:59 -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; Wed, 17 May 2017 05:19:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3E416DFD43; Wed, 17 May 2017 05:19:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: liyang@apache.org To: commits@kylin.apache.org Message-Id: <82726926eb544378a519ebd59d6c03c0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: kylin git commit: fix IT dist lock test Date: Wed, 17 May 2017 05:19:59 +0000 (UTC) archived-at: Wed, 17 May 2017 05:20:01 -0000 Repository: kylin Updated Branches: refs/heads/KYLIN-2624 ee46797be -> af49d0da4 fix IT dist lock test Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/af49d0da Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/af49d0da Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/af49d0da Branch: refs/heads/KYLIN-2624 Commit: af49d0da45a26a298da57ca29edc61de946738b8 Parents: ee46797 Author: Li Yang Authored: Wed May 17 13:19:46 2017 +0800 Committer: Li Yang Committed: Wed May 17 13:19:46 2017 +0800 ---------------------------------------------------------------------- .../kylin/storage/hbase/util/ZookeeperDistributedJobLock.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/af49d0da/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperDistributedJobLock.java ---------------------------------------------------------------------- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperDistributedJobLock.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperDistributedJobLock.java index 983bfd9..7def5bd 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperDistributedJobLock.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperDistributedJobLock.java @@ -235,11 +235,13 @@ public class ZookeeperDistributedJobLock implements DistributedJobLock { } private String getLockPath(String pathName) { - return ZOOKEEPER_LOCK_PATH + "/" + config.getMetadataUrlPrefix() + "/" + pathName; + String metadataUrlPrefix = config.getMetadataUrlPrefix(); + return ZOOKEEPER_LOCK_PATH + (metadataUrlPrefix.startsWith("/") ? "" : "/") + metadataUrlPrefix + "/" + pathName; } private String getWatchPath() { - return ZOOKEEPER_LOCK_PATH + "/" + config.getMetadataUrlPrefix(); + String metadataUrlPrefix = config.getMetadataUrlPrefix(); + return ZOOKEEPER_LOCK_PATH + (metadataUrlPrefix.startsWith("/") ? "" : "/") + metadataUrlPrefix; } @Override