public static ZooKeeperOperation create(final String path, final Descriptor data, final int version) { return create(path, data.toJsonBytes(), version); }
public static ZooKeeperOperation create(final String path, final Descriptor data) { return create(path, data.toJsonBytes()); }
final List<ZooKeeperOperation> operations = Lists.newArrayList( check(jobPath), create(portNodes), create(Paths.configJobHost(id, host))); checkForPortConflicts(client, host, port, id); operations.add(create(taskPath, task)); operations.add(create(taskCreationPath)); } catch (KeeperException e) { throw new HeliosRuntimeException("reading existing task description failed", e);
client.ensurePath(Paths.statusDeploymentGroups()); client.transaction( create(Paths.configDeploymentGroup(deploymentGroup.getName()), deploymentGroup), create(Paths.statusDeploymentGroup(deploymentGroup.getName())), create(Paths.statusDeploymentGroupHosts(deploymentGroup.getName()), Json.asBytesUnchecked(emptyList())), create(Paths.statusDeploymentGroupRemovedHosts(deploymentGroup.getName()), Json.asBytesUnchecked(emptyList())) );
operations.add(create(tasksPath)); operations.add(delete(tasksPath));
ops.add(create(Paths.statusDeploymentGroupTasks(deploymentGroup.getName())));
operations.add(create(path));
final List<ZooKeeperOperation> operations = Lists.newArrayList( check(jobPath), create(portNodes), create(Paths.configJobHost(id, host))); operations.add(create(taskPath, task)); operations.add(create(taskCreationPath)); } catch (KeeperException e) { throw new HeliosRuntimeException("reading existing task description failed", e);
public static ZooKeeperOperation create(final String path, final Descriptor data) { return create(path, data.toJsonBytes()); }
public static ZooKeeperOperation create(final String path, final Descriptor data, final int version) { return create(path, data.toJsonBytes(), version); }
@Override public void addDeploymentGroup(final DeploymentGroup deploymentGroup) throws DeploymentGroupExistsException { log.info("adding deployment-group: {}", deploymentGroup); final ZooKeeperClient client = provider.get("addDeploymentGroup"); try { try { client.ensurePath(Paths.configDeploymentGroups()); client.ensurePath(Paths.statusDeploymentGroups()); client.transaction( create(Paths.configDeploymentGroup(deploymentGroup.getName()), deploymentGroup), create(Paths.statusDeploymentGroup(deploymentGroup.getName())), create(Paths.statusDeploymentGroupHosts(deploymentGroup.getName())) ); } catch (final NodeExistsException e) { throw new DeploymentGroupExistsException(deploymentGroup.getName()); } } catch (final KeeperException e) { throw new HeliosRuntimeException("adding deployment-group " + deploymentGroup + " failed", e); } }
final List<ZooKeeperOperation> operations = Lists.newArrayList( check(jobPath), create(portNodes), create(Paths.configJobHost(id, host))); operations.add(create(taskPath, task)); operations.add(create(taskCreationPath)); } catch (KeeperException e) { throw new HeliosRuntimeException("reading existing task description failed", e);
final List<ZooKeeperOperation> operations = Lists.newArrayList( check(jobPath), create(portNodes), create(Paths.configJobHost(id, host))); operations.add(create(taskPath, task)); operations.add(create(taskCreationPath)); } catch (KeeperException e) { throw new HeliosRuntimeException("reading existing task description failed", e);