public static String configHostJobCreationParent(final JobId id) { return configJob(id); }
for (final String id : ids) { final JobId jobId = JobId.fromString(id); final String path = Paths.configJob(jobId); try { final byte[] data = client.getData(path);
delete(Paths.configJob(id)),
final String jobPath = Paths.configJob(id); final String taskPath = Paths.configHostJob(host, id); final String taskCreationPath = Paths.configHostJobCreation(host, id, operationId);
try { client.ensurePath(Paths.historyJob(id)); client.transaction(create(Paths.configJob(id), job), create(Paths.configJobRefShort(id), id), create(Paths.configJobHosts(id)),
final String jobPath = Paths.configJob(id);
for (final String id : ids) { final JobId jobId = JobId.fromString(id); final String path = Paths.configJob(jobId); try { final byte[] data = client.getData(path);
private Job getJob(final ZooKeeperClient client, final JobId id) { final String path = Paths.configJob(id); try { final byte[] data = client.getData(path); return Json.read(data, Job.class); } catch (NoNodeException e) { // Return null to indicate that the job does not exist return null; } catch (KeeperException | IOException e) { throw new HeliosRuntimeException("getting job " + id + " failed", e); } }
delete(Paths.configJob(id)),
final String jobPath = Paths.configJob(id); final String taskPath = Paths.configHostJob(host, id); final String taskCreationPath = Paths.configHostJobCreation(host, id, operationId);
private void assertJobExists(final ZooKeeperClient client, final JobId id) throws JobDoesNotExistException { try { final String path = Paths.configJob(id); if (client.stat(path) == null) { throw new JobDoesNotExistException(id); } } catch (KeeperException e) { throw new HeliosRuntimeException("checking job existence failed", e); } }
try { client.ensurePath(Paths.historyJob(id)); client.transaction(create(Paths.configJob(id), job), create(Paths.configJobRefShort(id), id), create(Paths.configJobHosts(id)),
final String jobPath = Paths.configJob(id);
public static String configHostJobCreationParent(final JobId id) { return configJob(id); }
private void assertJobExists(final ZooKeeperClient client, final JobId id) throws JobDoesNotExistException { try { final String path = Paths.configJob(id); if (client.stat(path) == null) { throw new JobDoesNotExistException(id); } } catch (KeeperException e) { throw new HeliosRuntimeException("checking job existence failed", e); } }
private Job getJob(final ZooKeeperClient client, final JobId id) { final String path = Paths.configJob(id); try { final byte[] data = client.getData(path); return Json.read(data, Job.class); } catch (NoNodeException e) { // Return null to indicate that the job does not exist return null; } catch (KeeperException | IOException e) { throw new HeliosRuntimeException("getting job " + id + " failed", e); } }