[
https://issues.apache.org/jira/browse/TWILL-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14906170#comment-14906170
]
ASF GitHub Bot commented on TWILL-141:
--------------------------------------
GitHub user chtyim opened a pull request:
https://github.com/apache/incubator-twill/pull/64
(TWILL-141) Fix namespacing of ZKClient
- Not to fail with exception when creating “/“ through the
namespaced ZKClient
- Return the correct path in OperationFuture.getRequestPath() for
futures returned from namespaced ZKClient
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/chtyim/incubator-twill feature/TWILL-141
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-twill/pull/64.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #64
----
commit 1c4196851fd945539d7d7ebe437c58bd9c43e717
Author: Terence Yim <[email protected]>
Date: 2015-09-24T10:22:24Z
(TWILL-141) Fix namespacing of ZKClient
- Not to fail with exception when creating “/“ through the
namespaced ZKClient
- Return the correct path in OperationFuture.getRequestPath() for
futures returned from namespaced ZKClient
----
> ZKClient created through ZKClients.namespace fails in create call
> -----------------------------------------------------------------
>
> Key: TWILL-141
> URL: https://issues.apache.org/jira/browse/TWILL-141
> Project: Apache Twill
> Issue Type: Bug
> Components: zookeeper
> Affects Versions: 0.2.0-incubating, 0.1.0-incubating, 0.3.0-incubating,
> 0.5.0-incubating, 0.4.1-incubating, 0.6.0-incubating
> Reporter: Terence Yim
> Assignee: Terence Yim
> Fix For: 0.7.0-incubating
>
>
> For a {{ZKClient}} created through {{ZKClients.namespace}}, calling create on
> "/" will fail with an exception "java.lang.IllegalArgumentException: Path
> must not end with / character". For non-namespaced {{ZKClient}}, it either
> succeeds or having the `NodeExistsException` exception if the root path
> already exist.
> This is the code snippet for reproducing the issue:
> {code:java}
> ZKClient zk = ZKClients.namespace(zkClient, "/test");
> zk.create("/", null, CreateMode.PERSISTENT).get();
> {code}
> and this is the stacktrace:
> {noformat}
> java.lang.IllegalArgumentException: Path must not end with / character
> at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:58)
> at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:35)
> at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:803)
> at
> org.apache.twill.internal.zookeeper.DefaultZKClientService.doCreate(DefaultZKClientService.java:147)
> at
> org.apache.twill.internal.zookeeper.DefaultZKClientService.create(DefaultZKClientService.java:137)
> at
> org.apache.twill.zookeeper.ForwardingZKClient.create(ForwardingZKClient.java:61)
> at
> org.apache.twill.internal.zookeeper.FailureRetryZKClient.create(FailureRetryZKClient.java:70)
> at
> org.apache.twill.zookeeper.ForwardingZKClient.create(ForwardingZKClient.java:61)
> at
> org.apache.twill.zookeeper.ZKClientServices$1.create(ZKClientServices.java:84)
> at
> org.apache.twill.internal.zookeeper.NamespaceZKClient.create(NamespaceZKClient.java:73)
> at
> org.apache.twill.zookeeper.AbstractZKClient.create(AbstractZKClient.java:42)
> at
> org.apache.twill.zookeeper.AbstractZKClient.create(AbstractZKClient.java:36)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)