kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject kylin git commit: fix IT dist lock test
Date Wed, 17 May 2017 05:19:59 GMT
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 <liyang@apache.org>
Authored: Wed May 17 13:19:46 2017 +0800
Committer: Li Yang <liyang@apache.org>
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


Mime
View raw message