@Override public void ensurePath(String path) throws KeeperException { reporter.time(tag, "ensurePath", () -> { client.ensurePath(path); return null; }); }
@Override public void createAndSetData(String path, byte[] data) throws KeeperException { reporter.time(tag, "createAndSetData", () -> { client.createAndSetData(path, data); return null; }); }
private UUID getJobCreation(final ZooKeeperClient client, final JobId id) throws KeeperException { final String parent = Paths.configHostJobCreationParent(id); final List<String> children = client.getChildren(parent); for (final String child : children) { if (Paths.isConfigJobCreation(child)) { return Paths.configJobCreationId(child); } } return null; }
public LabelReporter(final String host, final Map<String, String> labels, final NodeUpdaterFactory nodeUpdaterFactory, final CountDownLatch zkRegistrationSignal) { super(zkRegistrationSignal); this.labels = labels; this.nodeUpdater = nodeUpdaterFactory.create(Paths.statusHostLabels(host)); }
public EnvironmentVariableReporter(final String host, final Map<String, String> envVars, final NodeUpdaterFactory nodeUpdaterFactory, final CountDownLatch zkRegistrationSignal) { super(zkRegistrationSignal); this.envVars = envVars; this.nodeUpdater = nodeUpdaterFactory.create(Paths.statusHostEnvVars(host)); }
@Override public Collection<CuratorTransactionResult> transaction(List<ZooKeeperOperation> operations) throws KeeperException { return reporter.time(tag, "transaction", () -> client.transaction(operations)); }
@Override public void createWithMode(String path, CreateMode mode) throws KeeperException { reporter.time(tag, "createWithMode", () -> { client.createWithMode(path, mode); return null; }); }
@Override public void deleteRecursive(String path) throws KeeperException { reporter.time(tag, "deleteRecursive", () -> { client.deleteRecursive(path); return null; }); }
@Override public List<String> getChildren(String path) throws KeeperException { return reporter.time(tag, "getChildren", () -> client.getChildren(path)); }
@Override public void ensurePathAndSetData(String path, byte[] data) throws KeeperException { reporter.time(tag, "ensurePathAndSetData", () -> { client.ensurePathAndSetData(path, data); return null; }); }
@Override public void ensurePath(String path, boolean excludingLast) throws KeeperException { reporter.time(tag, "ensurePath", () -> { client.ensurePath(path, excludingLast); return null; }); }
@Override public Collection<CuratorTransactionResult> transaction(ZooKeeperOperation... operations) throws KeeperException { return reporter.time(tag, "transaction", () -> client.transaction(operations)); }