[ 
https://issues.apache.org/jira/browse/KYLIN-2819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16361864#comment-16361864
 ] 

ASF GitHub Bot commented on KYLIN-2819:
---------------------------------------

yiming187 closed pull request #64: JIRA_ID:KYLIN-2819
URL: https://github.com/apache/kylin/pull/64
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index 0e990df52f..0a62f3d31f 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -226,6 +226,10 @@ public String getHdfsWorkingDirectory() {
         return cachedHdfsWorkingDirectory;
     }
 
+    public String getZkBasePath() {
+        return getOptional("kylin.zk.base.path", "/kylin");
+    }
+
     /**
      * A comma separated list of host:port pairs, each corresponding to a 
ZooKeeper server
      */
diff --git a/core-common/src/main/resources/kylin-defaults.properties 
b/core-common/src/main/resources/kylin-defaults.properties
index 7c421f9fa0..0cd9b9c248 100644
--- a/core-common/src/main/resources/kylin-defaults.properties
+++ b/core-common/src/main/resources/kylin-defaults.properties
@@ -26,6 +26,8 @@ kylin.env.hdfs-working-dir=/kylin
 # DEV|QA|PROD. DEV will turn on some dev features, QA and PROD has no 
difference in terms of functions.
 kylin.env=QA
 
+# kylin zk base path
+kylin.zk.base.path=/kylin
 
 ### SERVER | WEB ###
 
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DistributedScheduler.java
 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DistributedScheduler.java
index e3a5836b97..9902618143 100644
--- 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DistributedScheduler.java
+++ 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DistributedScheduler.java
@@ -82,7 +82,7 @@
     private String serverName;
 
     private final static String SEGMENT_ID = "segmentId";
-    public static final String ZOOKEEPER_LOCK_PATH = "/job_engine/lock"; // 
note ZookeeperDistributedLock will ensure zk path prefix: /kylin/metadata
+    public static final String ZOOKEEPER_LOCK_PATH = "/job_engine/lock"; // 
note ZookeeperDistributedLock will ensure zk path prefix: 
/${kylin.zk.base.path}/metadata
 
     //only for it test
     public static DistributedScheduler getInstance(KylinConfig config) {
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperDistributedLock.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperDistributedLock.java
index 63ffda0a25..27278ffdee 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperDistributedLock.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ZookeeperDistributedLock.java
@@ -102,7 +102,7 @@ public Factory() {
 
         public Factory(KylinConfig config) {
             this.curator = getZKClient(config);
-            this.zkPathBase = fixSlash("/kylin/" + 
KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix());
+            this.zkPathBase = fixSlash(config.getZkBasePath() + 
KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix());
         }
 
         @Override


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add "kylin.env.zookeeper-base-path" for zk path
> -----------------------------------------------
>
>                 Key: KYLIN-2819
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2819
>             Project: Kylin
>          Issue Type: Improvement
>    Affects Versions: v1.5.3
>            Reporter: Shen Yinjie
>            Assignee: Shen Yinjie
>            Priority: Major
>             Fix For: v2.2.0
>
>         Attachments: KYLIN-2819_2.patch, kylin-2819_1.patch
>
>
> currently kylin zkbasepath is hard-coded as "/kylin",we met a scenario to 
> launch more kylin services on YARN, and should make their zkbasepaths 
> flexible and separable .
> Add an attribute "kylin.zk.base.path" in kylin.properties and default value 
> is "/kylin".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to