String path = Paths.build(Paths.CONTAINERS, entity.getName());
try {
Stat stat = client.checkExists().forPath(path);
if (stat == null) {
throw new NoSuchContainerException("Could not find container with id " + entity.getName());
}
client.setData().forPath(path, ZooKeeperUtils.mapToBytes(entity.getAttributes()));
}
catch (Exception e) {
throw ZooKeeperUtils.wrapThrowable(e, e.getMessage());