private void handleContainerError(final ContainerId containerId, final Throwable throwable) { final ResourceStatusProto.Builder resourceStatusBuilder = ResourceStatusProto.newBuilder().setIdentifier(containerId.toString()); resourceStatusBuilder.setState(ReefServiceProtos.State.FAILED); resourceStatusBuilder.setExitCode(1); resourceStatusBuilder.setDiagnostics(throwable.getMessage()); this.reefEventHandlers.onResourceStatus(resourceStatusBuilder.build()); }
private void informAboutConatinerFailureDuringRestart(final String containerId) { LOG.log(Level.WARNING, "Container [" + containerId + "] has failed during driver restart process, FailedEvaluaorHandler will be triggered, but no additional evaluator can be requested due to YARN-2433."); // trigger a failed evaluator event this.reefEventHandlers.onResourceStatus(ResourceStatusProto.newBuilder() .setIdentifier(containerId) .setState(ReefServiceProtos.State.FAILED) .setExitCode(1) .setDiagnostics("Container [" + containerId + "] failed during driver restart process.") .setIsFromPreviousDriver(true) .build()); }
status.setState(ReefServiceProtos.State.FAILED); status.setExitCode(value.getExitStatus());
public Builder mergeFrom(com.microsoft.reef.proto.DriverRuntimeProtocol.ResourceStatusProto other) { if (other == com.microsoft.reef.proto.DriverRuntimeProtocol.ResourceStatusProto.getDefaultInstance()) return this; if (other.hasIdentifier()) { bitField0_ |= 0x00000001; identifier_ = other.identifier_; onChanged(); } if (other.hasState()) { setState(other.getState()); } if (other.hasDiagnostics()) { bitField0_ |= 0x00000004; diagnostics_ = other.diagnostics_; onChanged(); } if (other.hasExitCode()) { setExitCode(other.getExitCode()); } if (other.hasIsFromPreviousDriver()) { setIsFromPreviousDriver(other.getIsFromPreviousDriver()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * Inform REEF of a cleanly exited process. * * @param processId */ private void onCleanExit(final String processId) { this.onResourceStatus( DriverRuntimeProtocol.ResourceStatusProto.newBuilder() .setIdentifier(processId) .setState(ReefServiceProtos.State.DONE) .setExitCode(0) .build() ); }
/** * Inform REEF of an unclean process exit * * @param processId * @param exitCode */ private void onUncleanExit(final String processId, final int exitCode) { this.onResourceStatus( DriverRuntimeProtocol.ResourceStatusProto.newBuilder() .setIdentifier(processId) .setState(ReefServiceProtos.State.FAILED) .setExitCode(exitCode) .build() ); }