Skip to content

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

Description

@zspmaomao

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions