try {
Utils.checkNamespaceDoesNotExist(instance, newName, namespaceId, TableOperation.RENAME);
final String tap = ZooUtil.getRoot(instance) + Constants.ZNAMESPACES + "/" + namespaceId + Constants.ZNAMESPACE_NAME;
zoo.mutate(tap, null, null, new Mutator() {
@Override
public byte[] mutate(byte[] current) throws Exception {
final String currentName = new String(current);
if (currentName.equals(newName))
return null; // assume in this case the operation is running again, so we are done