@Override public Void call() { checkState(!tainted, "this object is not designed to be reused: %s", toString()); tainted = true; String originalId = node.get().getId(); try { if (options.shouldBlockUntilRunning()) { pollNodeRunning.apply(node); Statement statement = nodeAndTemplateOptionsToStatement.apply(node.get(), options); if (statement != null) { RunScriptOnNode runner = initScriptRunnerFactory.create(node.get(), statement, options, badNodes).call(); if (runner != null) { ExecResponse exec = runner.call(); customizationResponses.put(node.get(), exec); } } if (options.getPort() > 0) { openSocketFinder.findOpenSocketOnNode(node.get(), options.getPort(), options.getSeconds(), TimeUnit.SECONDS); } } logger.debug("<< customized node(%s)", originalId); goodNodes.add(node.get()); } catch (Exception e) { logger.error(e, "<< problem customizing node(%s): ", originalId, getRootCause(e).getMessage()); badNodes.put(node.get(), e); } return null; }
@Override public Void call() { checkState(!tainted, "this object is not designed to be reused: %s", toString()); tainted = true; String originalId = node.get().getId(); try { if (options.shouldBlockUntilRunning()) { pollNodeRunning.apply(node); if (statement != null) { RunScriptOnNode runner = initScriptRunnerFactory.create(node.get(), statement, options, badNodes).call(); if (runner != null) { ExecResponse exec = runner.call(); customizationResponses.put(node.get(), exec); } } if (options.getPort() > 0) { openSocketFinder.findOpenSocketOnNode(node.get(), options.getPort(), options.getSeconds(), TimeUnit.SECONDS); } } logger.debug("<< customized node(%s)", originalId); goodNodes.add(node.get()); } catch (Exception e) { logger.error(e, "<< problem customizing node(%s): ", originalId, getRootCause(e).getMessage()); badNodes.put(node.get(), e); } return null; }
@Override public Void call() { checkState(!tainted, "this object is not designed to be reused: %s", toString()); tainted = true; String originalId = node.get().getId(); try { if (options.shouldBlockUntilRunning()) { pollNodeRunning.apply(node); Statement statement = nodeAndTemplateOptionsToStatement.apply(node.get(), options); if (statement != null) { RunScriptOnNode runner = initScriptRunnerFactory.create(node.get(), statement, options, badNodes).call(); if (runner != null) { ExecResponse exec = runner.call(); customizationResponses.put(node.get(), exec); } } if (options.getPort() > 0) { openSocketFinder.findOpenSocketOnNode(node.get(), options.getPort(), options.getSeconds(), TimeUnit.SECONDS); } } logger.debug("<< customized node(%s)", originalId); goodNodes.add(node.get()); } catch (Exception e) { logger.error(e, "<< problem customizing node(%s): ", originalId, getRootCause(e).getMessage()); badNodes.put(node.get(), e); } return null; }
@Override public Void call() { checkState(!tainted, "this object is not designed to be reused: %s", toString()); tainted = true; String originalId = node.get().getId(); try { if (options.shouldBlockUntilRunning()) { pollNodeRunning.apply(node); if (statement != null) { RunScriptOnNode runner = initScriptRunnerFactory.create(node.get(), statement, options, badNodes).call(); if (runner != null) { ExecResponse exec = runner.call(); customizationResponses.put(node.get(), exec); } } if (options.getPort() > 0) { openSocketFinder.findOpenSocketOnNode(node.get(), options.getPort(), options.getSeconds(), TimeUnit.SECONDS); } } logger.debug("<< customized node(%s)", originalId); goodNodes.add(node.get()); } catch (Exception e) { logger.error(e, "<< problem customizing node(%s): ", originalId, getRootCause(e).getMessage()); badNodes.put(node.get(), e); } return null; }
@Override public ListenableFuture<RunScriptOnNode> apply(NodeMetadata node) { node = updateNodeWithCredentialsIfPresent(node, options); return userExecutor.submit(initScriptRunnerFactory.create(node, script, options, badNodes)); }
@Override public ListenableFuture<RunScriptOnNode> apply(NodeMetadata node) { node = updateNodeWithCredentialsIfPresent(node, options); return userExecutor.submit(initScriptRunnerFactory.create(node, script, options, badNodes)); }
@Override public ListenableFuture<RunScriptOnNode> apply(NodeMetadata node) { node = updateNodeWithCredentialsIfPresent(node, options); return userExecutor.submit(initScriptRunnerFactory.create(node, script, options, badNodes)); }
@Override public ListenableFuture<RunScriptOnNode> apply(NodeMetadata node) { node = updateNodeWithCredentialsIfPresent(node, options); return userExecutor.submit(initScriptRunnerFactory.create(node, script, options, badNodes)); }