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; }
if (!TablePropUtil.isPropertyValid(entry.getKey(), entry.getValue())) { throw new ThriftTableOperationException(null, tableName, tableOp, TableOperationExceptionType.OTHER,
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; }
if (!TablePropUtil.isPropertyValid(entry.getKey(), entry.getValue())) { throw new ThriftTableOperationException(null, tableName, TableOperation.CLONE, TableOperationExceptionType.OTHER, "Property or value not valid " + entry.getKey() + "=" + entry.getValue());
if (!TablePropUtil.isPropertyValid(entry.getKey(), entry.getValue())) { throw new ThriftTableOperationException(null, tableName, tableOp, TableOperationExceptionType.OTHER,