private synchronized void onRMDone(final DriverRuntimeProtocol.RuntimeStatusProto runtimeStatusProto) { assert (runtimeStatusProto.getState() == ReefServiceProtos.State.DONE); LOG.log(Level.INFO, "Resource Manager shutdown happened. Triggering Driver shutdown."); this.driverStatusManager.onComplete(); }
hash = (53 * hash) + hashEnum(getState());
public Builder mergeFrom(com.microsoft.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto other) { if (other == com.microsoft.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasState()) { setState(other.getState()); } if (other.hasError()) { mergeError(other.getError()); } if (other.hasOutstandingContainerRequests()) { setOutstandingContainerRequests(other.getOutstandingContainerRequests()); } if (!other.containerAllocation_.isEmpty()) { if (containerAllocation_.isEmpty()) { containerAllocation_ = other.containerAllocation_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureContainerAllocationIsMutable(); containerAllocation_.addAll(other.containerAllocation_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
@Override public synchronized void onNext(final DriverRuntimeProtocol.RuntimeStatusProto runtimeStatusProto) { final ReefServiceProtos.State newState = runtimeStatusProto.getState(); LOG.log(Level.FINEST, "Runtime status " + runtimeStatusProto); this.outstandingContainerRequests = runtimeStatusProto.getOutstandingContainerRequests(); this.containerAllocationCount = runtimeStatusProto.getContainerAllocationCount(); this.setState(runtimeStatusProto.getState()); switch (newState) { case FAILED: this.onRMFailure(runtimeStatusProto); break; case DONE: this.onRMDone(runtimeStatusProto); break; case RUNNING: this.onRMRunning(runtimeStatusProto); break; } }
private synchronized void onRMFailure(final DriverRuntimeProtocol.RuntimeStatusProto runtimeStatusProto) { assert (runtimeStatusProto.getState() == ReefServiceProtos.State.FAILED); this.resourceManagerErrorHandler.onNext(runtimeStatusProto.getError()); }
private synchronized void onRMRunning(final DriverRuntimeProtocol.RuntimeStatusProto runtimeStatusProto) { assert (runtimeStatusProto.getState() == ReefServiceProtos.State.RUNNING); if (this.isIdle()) { this.driverIdleManager.get().onPotentiallyIdle(IDLE_MESSAGE); } }