private void sendRuntimeStatus() { final RuntimeStatusEventImpl.Builder builder = RuntimeStatusEventImpl.newBuilder() .setName("LOCAL") .setState(State.RUNNING) .setOutstandingContainerRequests(this.requestQueue.getNumberOfOutstandingRequests()); for (final String containerAllocation : this.theContainers.getAllocatedContainerIDs()) { builder.addContainerAllocation(containerAllocation); } final RuntimeStatusEvent msg = builder.build(); LOG.log(Level.INFO, "Allocated: {0}, Outstanding requests: {1}", new Object[]{msg.getContainerAllocationList().size(), msg.getOutstandingContainerRequests()}); this.runtimeStatusHandlerEventHandler.onNext(msg); } }
/** * Update the driver with my current status. */ private void updateRuntimeStatus() { final RuntimeStatusEventImpl.Builder builder = RuntimeStatusEventImpl.newBuilder() .setName(RUNTIME_NAME) .setState(State.RUNNING) .setOutstandingContainerRequests(this.containerRequestCounter.get()); for (final String allocatedContainerId : this.containers.getContainerIds()) { builder.addContainerAllocation(allocatedContainerId); } this.reefEventHandlers.onRuntimeStatus(builder.build()); }
private synchronized void updateRuntimeStatus() { final RuntimeStatusEventImpl.Builder builder = RuntimeStatusEventImpl.newBuilder() .setName(RUNTIME_NAME) .setState(State.RUNNING) .setOutstandingContainerRequests(this.outstandingRequestCounter); for (final String executorId : this.executors.getExecutorIds()) { builder.addContainerAllocation(executorId); } this.reefEventHandlers.onRuntimeStatus(builder.build()); }