From 02021eb7240f627fe284bb304dfdf19bd6c17487 Mon Sep 17 00:00:00 2001 From: nichunen Date: Mon, 19 Sep 2016 09:24:10 +0800 Subject: [PATCH] KYLIN-2027, fix the issue of error "connection timed out" occurs when zookeeper's port is set in hbase.zookeeper.quorum. --- .../java/org/apache/kylin/storage/hbase/util/ZookeeperJobLock.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperJobLock.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperJobLock.java index bdd3981..29d19af 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperJobLock.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperJobLock.java @@ -93,7 +93,11 @@ public class ZookeeperJobLock implements JobLock { @Nullable @Override public String apply(String input) { - return input + ":" + port; + if(input.endsWith(":" + port)) { + return input; + } else { + return input + ":" + port; + } } }), ","); } -- 2.5.4 (Apple Git-61)