private void logFailedDispatchAttempt(final ExecutionReference reference, final ExecutableFlow exflow, final Executor selectedExecutor, final ExecutorManagerException e) { ExecutorManager.logger.warn(String.format( "Executor %s responded with exception for exec: %d", selectedExecutor, exflow.getExecutionId()), e); ExecutorManager.logger.info(String.format( "Failed dispatch attempt for exec %d with error count %d", exflow.getExecutionId(), reference.getNumErrors())); }
private void handleNoExecutorSelectedCase(final ExecutionReference reference, final ExecutableFlow exflow) throws ExecutorManagerException { ExecutorManager.logger .info(String .format( "Reached handleNoExecutorSelectedCase stage for exec %d with error count %d", exflow.getExecutionId(), reference.getNumErrors())); // TODO: handle scenario where a high priority flow failing to get // schedule can starve all others ExecutorManager.this.queuedFlows.enqueue(exflow, reference); } }
final ExecutionReference ref = pair.getFirst(); ref.setNextCheckTime(DateTime.now().getMillis() + this.errorThreshold); ref.setNumErrors(ref.getNumErrors() + 1); if (ref.getNumErrors() == this.numErrorsBeforeUnresponsiveEmail || ref.getNumErrors() % this.numErrorsBetweenUnresponsiveEmail == 0) {
logFailedDispatchAttempt(reference, exflow, selectedExecutor, e); ExecutorManager.this.commonMetrics.markDispatchFail(); reference.setNumErrors(reference.getNumErrors() + 1); } while (reference.getNumErrors() < this.maxDispatchingErrors); + " (tried " + reference.getNumErrors() + " executors)"; ExecutorManager.logger.error(message); ExecutorManager.this.executionFinalizer.finalizeFlow(exflow, message, lastError);
exflow.getExecutionId(), reference.getNumErrors()));
private String checkGiveUpDispatching(final ExecutionReference reference, final Set<Executor> remainingExecutors) { if (reference.getNumErrors() >= this.maxDispatchingErrors) { return "reached " + ConfigurationKeys.MAX_DISPATCHING_ERRORS_PERMITTED + " (tried " + reference.getNumErrors() + " executors)"; } else if (remainingExecutors.isEmpty()) { return "tried calling all executors (total: " + ExecutorManager.this.activeExecutors.size() + ") but all failed"; } else { return null; } }
private void logFailedDispatchAttempt(final ExecutionReference reference, final ExecutableFlow exflow, final Executor selectedExecutor, final ExecutorManagerException e) { logger.warn(String.format( "Executor %s responded with exception for exec: %d", selectedExecutor, exflow.getExecutionId()), e); logger.info(String.format( "Reached handleDispatchExceptionCase stage for exec %d with error count %d", exflow.getExecutionId(), reference.getNumErrors())); }
private void handleNoExecutorSelectedCase(final ExecutionReference reference, final ExecutableFlow exflow) throws ExecutorManagerException { logger .info(String .format( "Reached handleNoExecutorSelectedCase stage for exec %d with error count %d", exflow.getExecutionId(), reference.getNumErrors())); // TODO: handle scenario where a high priority flow failing to get // schedule can starve all others ExecutorManager.this.queuedFlows.enqueue(exflow, reference); } }
ref.setNumErrors(ref.getNumErrors() + 1); if (ref.getNumErrors() == this.numErrorsBeforeUnresponsiveEmail || ref.getNumErrors() % this.numErrorsBetweenUnresponsiveEmail == 0) {
int numErrors = ref.getNumErrors(); if (ref.getNumErrors() < this.numErrors) { ref.setNextCheckTime(System.currentTimeMillis() + errorThreshold); ref.setNumErrors(++numErrors);
exflow.getExecutionId(), reference.getNumErrors()));
logFailedDispatchAttempt(reference, exflow, selectedExecutor, e); ExecutorManager.this.commonMetrics.markDispatchFail(); reference.setNumErrors(reference.getNumErrors() + 1);