/** * Simply forward this notification */ void notifyStateTransition(Execution execution, ExecutionState newState, Throwable error) { // only forward this notification if the execution is still the current execution // otherwise we have an outdated execution if (currentExecution == execution) { getExecutionGraph().notifyExecutionChange(execution, newState, error); } }
/** * Simply forward this notification. */ void notifyStateTransition(Execution execution, ExecutionState newState, Throwable error) { // only forward this notification if the execution is still the current execution // otherwise we have an outdated execution if (currentExecution == execution) { getExecutionGraph().notifyExecutionChange(execution, newState, error); } }
/** * Simply forward this notification. */ void notifyStateTransition(Execution execution, ExecutionState newState, Throwable error) { // only forward this notification if the execution is still the current execution // otherwise we have an outdated execution if (currentExecution == execution) { getExecutionGraph().notifyExecutionChange(execution, newState, error); } }
/** * Simply forward this notification. */ void notifyStateTransition(Execution execution, ExecutionState newState, Throwable error) { // only forward this notification if the execution is still the current execution // otherwise we have an outdated execution if (currentExecution == execution) { getExecutionGraph().notifyExecutionChange(execution, newState, error); } }
void executionFinished(Execution execution) { getExecutionGraph().vertexFinished(); }
void executionFinished(Execution execution) { getExecutionGraph().vertexFinished(); }
void executionFinished(Execution execution) { getExecutionGraph().vertexFinished(); }
void executionFinished(Execution execution) { getExecutionGraph().vertexFinished(); }
void sendPartitionInfoAsync() { if (reconcileFuture != null && !reconcileFuture.isDone()) { return; } synchronized (updatePartitionLock) { if (updatePartitionFuture == null) { updatePartitionFuture = getVertex().getExecutionGraph().getFutureExecutorService().schedule( () -> { sendPartitionInfos(); }, vertex.getExecutionGraph().getUpdatePartitionInfoSendInterval(), TimeUnit.MILLISECONDS); } } }
@Override public Void call() throws Exception { try { consumerVertex.scheduleForExecution( consumerVertex.getExecutionGraph().getSlotProvider(), consumerVertex.getExecutionGraph().isQueuedSchedulingAllowed()); } catch (Throwable t) { consumerVertex.fail(new IllegalStateException("Could not schedule consumer " + "vertex " + consumerVertex, t)); } return null; } }, executor);
public boolean scheduleForExecution() { SlotProvider resourceProvider = getVertex().getExecutionGraph().getSlotProvider(); boolean allowQueued = getVertex().getExecutionGraph().isQueuedSchedulingAllowed(); return scheduleForExecution(resourceProvider, allowQueued); }
public CompletableFuture<Void> scheduleForExecution() { final ExecutionGraph executionGraph = getVertex().getExecutionGraph(); final SlotProvider resourceProvider = executionGraph.getSlotProvider(); final boolean allowQueued = executionGraph.isQueuedSchedulingAllowed(); return scheduleForExecution( resourceProvider, allowQueued, LocationPreferenceConstraint.ANY, Collections.emptySet()); }
public CompletableFuture<Void> scheduleForExecution() { final ExecutionGraph executionGraph = getVertex().getExecutionGraph(); final SlotProvider resourceProvider = executionGraph.getSlotProvider(); final boolean allowQueued = executionGraph.isQueuedSchedulingAllowed(); return scheduleForExecution( resourceProvider, allowQueued, LocationPreferenceConstraint.ANY, Collections.emptySet()); }
void sendPartitionInfos() { if (vertex.getExecutionGraph().getGraphManager().isReplaying()) { return; } synchronized (updatePartitionLock) { updatePartitionFuture = null; } // check if the ExecutionVertex has already been archived and thus cleared the // partial partition infos queue if (partialInputChannelDeploymentDescriptors != null && !partialInputChannelDeploymentDescriptors.isEmpty()) { PartialInputChannelDeploymentDescriptor partialInputChannelDeploymentDescriptor; List<PartitionInfo> partitionInfos = new ArrayList<>(partialInputChannelDeploymentDescriptors.size()); while ((partialInputChannelDeploymentDescriptor = partialInputChannelDeploymentDescriptors.poll()) != null) { partitionInfos.add( new PartitionInfo( partialInputChannelDeploymentDescriptor.getResultId(), partialInputChannelDeploymentDescriptor.createInputChannelDeploymentDescriptor( this, getVertex().getExecutionGraph().getResultPartitionLocationTrackerProxy()))); } sendUpdatePartitionInfoRpcCall(partitionInfos); } }
public CompletableFuture<Void> scheduleForExecution() { final ExecutionGraph executionGraph = getVertex().getExecutionGraph(); final SlotProvider resourceProvider = executionGraph.getSlotProvider(); final boolean allowQueued = executionGraph.isQueuedSchedulingAllowed(); return scheduleForExecution( resourceProvider, allowQueued, LocationPreferenceConstraint.ANY); }
protected void notifyAndUpdateConsumers(IntermediateResultPartition partition) { getExecutionGraph().getGraphManager().notifyResultPartitionConsumable( getExecutionVertexID(), partition.getIntermediateResult().getId(), partition.getPartitionNumber(), getCurrentAssignedResourceLocation()); getExecutionGraph().getFutureExecutor().execute(() -> { currentExecution.updateConsumers(partition.getConsumers()); }); }
/** * Let the execution begins to reconcile. */ public CompletableFuture<ExecutionAttemptID> reconcile() { checkState(reconcileFuture == null); reconcileFuture = new CompletableFuture<>(); reconcileFuture.whenComplete( (value, throwable) -> { if (throwable == null && value == null) { sendPartitionInfoAsync(); } }); if (ExecutionState.CREATED.equals(state) || ExecutionState.FINISHED.equals(state)) { reconcileFuture.complete(null); } else { getVertex().getExecutionGraph().getFutureExecutorService().schedule( () -> { if (!reconcileFuture.isDone()) { reconcileFuture.complete(getAttemptId()); } }, getVertex().getExecutionGraph().getJobConfiguration().getLong(JobManagerOptions.JOB_RECONCILE_TIMEOUT), TimeUnit.SECONDS); } return reconcileFuture; }
releaseAssignedResource(new FlinkException("Execution " + this + " was cancelled.")); vertex.getExecutionGraph().deregisterExecution(this); String message = String.format("Asynchronous race: Found %s in state %s after successful cancel call.", vertex.getTaskNameWithSubtaskIndex(), state); LOG.error(message); vertex.getExecutionGraph().failGlobal(new Exception(message));
releaseAssignedResource(new FlinkException("Execution " + this + " was cancelled.")); vertex.getExecutionGraph().deregisterExecution(this); String message = String.format("Asynchronous race: Found %s in state %s after successful cancel call.", vertex.getTaskNameWithSubtaskIndex(), state); LOG.error(message); vertex.getExecutionGraph().failGlobal(new Exception(message));
releaseAssignedResource(new FlinkException("Execution " + this + " was cancelled.")); vertex.getExecutionGraph().deregisterExecution(this); String message = String.format("Asynchronous race: Found %s in state %s after successful cancel call.", vertex.getTaskNameWithSubtaskIndex(), state); LOG.error(message); vertex.getExecutionGraph().failGlobal(new Exception(message));