Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The result of event.getPath() in BackgroundCallback confused me #301

Open
zspmaomao opened this issue Jan 26, 2017 · 0 comments
Open

The result of event.getPath() in BackgroundCallback confused me #301

zspmaomao opened this issue Jan 26, 2017 · 0 comments

Comments

@zspmaomao
Copy link

What I do as follows:
BackgroundCallback bc = new BackgroundCallback() { @Override public void processResult(CuratorFramework client, CuratorEvent event) throws Exception { System.out.println (" type : " + event.getType()+ " ResultCode:"+event.getResultCode()+" path:"+event.getPath()); } }; client.create() .creatingParentContainersIfNeeded() .withProtection() .withMode(CreateMode.EPHEMERAL_SEQUENTIAL) .withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE) .inBackground(bc) .forPath("/ephemeral/ephemeral_sequentialtest", datas.getBytes());
I Then I got :
type : CREATE ResultCode:0 path:/ephemeral/_c_626fca12-0115-45e8-99fa-0a32184e5ab3-ephemeral_sequentialtest
Actually I saw the created path in zookeeper is
/ephemeral/_c_626fca12-0115-45e8-99fa-0a32184e5ab3-ephemeral_sequentialtest0000000000
Then I confused , Program execution is wrong, or am I wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant