You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/02/22 11:16:00 UTC

[jira] [Commented] (KYLIN-3782) ZookeeperDistributedLock can't acquir lock on windows because wrong Path

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

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

Smallhi commented on pull request #477: bug fixed for KYLIN-3782
URL: https://github.com/apache/kylin/pull/477
 
 
   support ZookeeperDistributedLock.java use windonws path to get lock.
 
----------------------------------------------------------------
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:
users@infra.apache.org


> ZookeeperDistributedLock can't acquir lock on windows because wrong Path
> ------------------------------------------------------------------------
>
>                 Key: KYLIN-3782
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3782
>             Project: Kylin
>          Issue Type: Bug
>          Components: Storage - HBase
>    Affects Versions: v2.6.0
>            Reporter: hailin.huang
>            Assignee: hailin.huang
>            Priority: Major
>             Fix For: v2.6.1
>
>
> In my windows env, when I run kylin, Kylin service can't start. In class ZookeeperDistributedLock, I found  kylin use File(path).getCanonicalPath() to norm windows path, however this will get a path like ' C:\kylin\kylin_metadata1\job_engine\global_job_engine_lock', for zookeeper,Path must start with / character.
> {color:red}return new File(path).toURI().getPath(){color}  might be better!!!
> Below is stackTrace:
> Caused by: java.lang.IllegalStateException: Error while 832820@UC-20180829ZLJB trying to lock C:\kylin\kylin_metadata1\job_engine\global_job_engine_lock
> 	at org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.lock(ZookeeperDistributedLock.java:153)
> 	at org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.lock(ZookeeperDistributedLock.java:170)
> 	at org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.lockJobEngine(ZookeeperDistributedLock.java:318)
> 	at org.apache.kylin.storage.hbase.util.ZookeeperJobLock.lockJobEngine(ZookeeperJobLock.java:81)
> 	at org.apache.kylin.job.impl.threadpool.DefaultScheduler.init(DefaultScheduler.java:152)
> 	at org.apache.kylin.rest.service.JobService.afterPropertiesSet(JobService.java:126)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)
> 	... 60 more
> caused by: java.lang.IllegalArgumentException: Path must start with / character
> 	at org.apache.curator.utils.PathUtils.validatePath(PathUtils.java:54)
> 	at org.apache.curator.utils.PathUtils.validatePath(PathUtils.java:37)
> 	at org.apache.curator.utils.ZKPaths.fixForNamespace(ZKPaths.java:63)
> 	at org.apache.curator.framework.imps.NamespaceImpl.fixForNamespace(NamespaceImpl.java:82)
> 	at org.apache.curator.framework.imps.CuratorFrameworkImpl.fixForNamespace(CuratorFrameworkImpl.java:579)
> 	at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:434)
> 	at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:44)
> 	at org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.lock(ZookeeperDistributedLock.java:149)



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