byte data[] = writer.getData(lockPath, null);
writer.getZooKeeper().setData(lockPath, data, -1);
// let it propagate
UtilWaitThread.sleep(500);
// kill the master by removing its lock
writer.recursiveDelete(lockPath, NodeMissingPolicy.FAIL);
// ensure the backup becomes the master
getConnector().tableOperations().create(getUniqueNames(1)[0]);
} finally {
backup.destroy();
}