public static String createNode(CuratorFramework zk, String path, byte[] data, CreateMode mode, List<ACL> acls) { String ret = null; try { String npath = normalizePath(path); ret = zk.create().creatingParentsIfNeeded().withMode(mode).withACL(acls).forPath(npath, data); } catch (Exception e) { throw Utils.wrapInRuntime(e); } return ret; }
.withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).forPath(BLOBSTORE_MAX_KEY_SEQUENCE_SUBTREE + "/" + key); zkClient.setData().forPath(BLOBSTORE_MAX_KEY_SEQUENCE_SUBTREE + "/" + key, ByteBuffer.allocate(INT_CAPACITY).putInt(INITIAL_SEQUENCE_NUMBER).array());
if (zk.checkExists().forPath(path) == null) { LOG.warn("Creating missing errors location {}", path); zk.create().withACL(getTopoReadWrite(path, topoId, topoToZkCreds, superUserAcl, fixUp)).forPath(path);
public static String createNode(CuratorFramework zk, String path, byte[] data, org.apache.zookeeper.CreateMode mode, List<ACL> acls) { String ret = null; try { String npath = normalizePath(path); ret = zk.create().creatingParentsIfNeeded().withMode(mode).withACL(acls).forPath(npath, data); } catch (Exception e) { throw Utils.wrapInRuntime(e); } return ret; }
.withACL(ZooDefs.Ids.OPEN_ACL_UNSAFE).forPath(BLOBSTORE_MAX_KEY_SEQUENCE_SUBTREE + "/" + key); zkClient.setData().forPath(BLOBSTORE_MAX_KEY_SEQUENCE_SUBTREE + "/" + key, ByteBuffer.allocate(INT_CAPACITY).putInt(INITIAL_SEQUENCE_NUMBER).array());
if (zk.checkExists().forPath(path) == null) { LOG.warn("Creating missing errors location {}", path); zk.create().withACL(getTopoReadWrite(path, topoId, topoToZkCreds, superUserAcl, fixUp)).forPath(path);