public static boolean setTableProperty(ZooReaderWriter zoo, String zkRoot, Table.ID tableId, String property, String value) throws KeeperException, InterruptedException { if (!isPropertyValid(property, value)) return false; // create the zk node for per-table properties for this table if it doesn't already exist String zkTablePath = getTablePath(zkRoot, tableId); zoo.putPersistentData(zkTablePath, new byte[0], NodeExistsPolicy.SKIP); // create the zk node for this property and set it's data to the specified value String zPath = zkTablePath + "/" + property; zoo.putPersistentData(zPath, value.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE); return true; }
public static void removeTableProperty(ServerContext context, Table.ID tableId, String property) throws InterruptedException, KeeperException { String zPath = getTablePath(context.getZooKeeperRoot(), tableId) + "/" + property; context.getZooReaderWriter().recursiveDelete(zPath, NodeMissingPolicy.SKIP); }
public static void removeTableProperty(String tableId, String property) throws InterruptedException, KeeperException { String zPath = getTablePath(tableId) + "/" + property; ZooReaderWriter.getInstance().recursiveDelete(zPath, NodeMissingPolicy.SKIP); }
public static void removeTableProperty(String tableId, String property) throws InterruptedException, KeeperException { String zPath = getTablePath(tableId) + "/" + property; ZooReaderWriter.getInstance().recursiveDelete(zPath, NodeMissingPolicy.SKIP); }
public static boolean setTableProperty(String tableId, String property, String value) throws KeeperException, InterruptedException { if (!isPropertyValid(property, value)) return false; // create the zk node for per-table properties for this table if it doesn't already exist String zkTablePath = getTablePath(tableId); ZooReaderWriter.getInstance().putPersistentData(zkTablePath, new byte[0], NodeExistsPolicy.SKIP); // create the zk node for this property and set it's data to the specified value String zPath = zkTablePath + "/" + property; ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE); return true; }
public static boolean setTableProperty(String tableId, String property, String value) throws KeeperException, InterruptedException { if (!isPropertyValid(property, value)) return false; // create the zk node for per-table properties for this table if it doesn't already exist String zkTablePath = getTablePath(tableId); ZooReaderWriter.getInstance().putPersistentData(zkTablePath, new byte[0], NodeExistsPolicy.SKIP); // create the zk node for this property and set it's data to the specified value String zPath = zkTablePath + "/" + property; ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE); return true; }