Zookeeper报KeeperErrorCode = MarshallingError 错误的说明
今天在用zookeeper创建节点时报org.apache.zookeeper.KeeperException$MarshallingErrorException: KeeperErrorCode = MarshallingError for /xxx创建语句如下:String path = zooKeeper.create(dir, null, null, CreateMode.PERS
·
今天在用zookeeper创建节点时报org.apache.zookeeper.KeeperException$MarshallingErrorException: KeeperErrorCode = MarshallingError for /xxx
创建语句如下:
String path = zooKeeper.create(dir, null, null, CreateMode.PERSISTENT);
是因为没有指定创建节点对应的ACL
改成如下即可:
String path = zooKeeper.create(dir, null, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
更多推荐
已为社区贡献2条内容
所有评论(0)