@Override public void notifyNewVertices(List<ExecutionJobVertex> newJobVerticesTopological) { // we validate here that the vertices are in fact not connected to // any other vertices for (ExecutionJobVertex ejv : newJobVerticesTopological) { List<IntermediateResult> inputs = ejv.getInputs(); IntermediateResult[] outputs = ejv.getProducedDataSets(); if ((inputs != null && inputs.size() > 0) || (outputs != null && outputs.length > 0)) { throw new FlinkRuntimeException("Incompatible failover strategy - strategy '" + getStrategyName() + "' can only handle jobs with only disconnected tasks."); } } }
@Override public void notifyNewVertices(List<ExecutionJobVertex> newJobVerticesTopological) { // we validate here that the vertices are in fact not connected to // any other vertices for (ExecutionJobVertex ejv : newJobVerticesTopological) { List<IntermediateResult> inputs = ejv.getInputs(); IntermediateResult[] outputs = ejv.getProducedDataSets(); if ((inputs != null && inputs.size() > 0) || (outputs != null && outputs.length > 0)) { throw new FlinkRuntimeException("Incompatible failover strategy - strategy '" + getStrategyName() + "' can only handle jobs with only disconnected tasks."); } } }
@Override public void notifyNewVertices(List<ExecutionJobVertex> newJobVerticesTopological) { // we validate here that the vertices are in fact not connected to // any other vertices for (ExecutionJobVertex ejv : newJobVerticesTopological) { List<IntermediateResult> inputs = ejv.getInputs(); IntermediateResult[] outputs = ejv.getProducedDataSets(); if ((inputs != null && inputs.size() > 0) || (outputs != null && outputs.length > 0)) { throw new FlinkRuntimeException("Incompatible failover strategy - strategy '" + getStrategyName() + "' can only handle jobs with only disconnected tasks."); } } }
@Override public void notifyNewVertices(List<ExecutionJobVertex> newJobVerticesTopological) { // we validate here that the vertices are in fact not connected to // any other vertices for (ExecutionJobVertex ejv : newJobVerticesTopological) { List<IntermediateResult> inputs = ejv.getInputs(); IntermediateResult[] outputs = ejv.getProducedDataSets(); if ((inputs != null && inputs.size() > 0) || (outputs != null && outputs.length > 0)) { throw new FlinkRuntimeException("Incompatible failover strategy - strategy '" + getStrategyName() + "' can only handle jobs with only disconnected tasks."); } } }
public void attachJobGraph(List<JobVertex> topologicallySorted) throws JobException { LOG.debug("Attaching {} topologically sorted vertices to existing job graph with {} " + "vertices and {} intermediate results.", topologicallySorted.size(), tasks.size(), intermediateResults.size()); final ArrayList<ExecutionJobVertex> newExecJobVertices = new ArrayList<>(topologicallySorted.size()); createExecutionJobVertex(topologicallySorted); for (JobVertex jobVertex : topologicallySorted) { if (jobVertex.isInputVertex() && !jobVertex.isStoppable()) { this.isStoppable = false; } ExecutionJobVertex ejv = tasks.get(jobVertex.getID()); ejv.connectToPredecessors(this.intermediateResults); for (IntermediateResult res : ejv.getProducedDataSets()) { IntermediateResult previousDataSet = this.intermediateResults.putIfAbsent(res.getId(), res); if (previousDataSet != null) { throw new JobException(String.format("Encountered two intermediate data set with ID %s : previous=[%s] / new=[%s]", res.getId(), res, previousDataSet)); } } this.verticesInCreationOrder.add(ejv); this.numVerticesTotal += ejv.getParallelism(); newExecJobVertices.add(ejv); } terminationFuture = new CompletableFuture<>(); failoverStrategy.notifyNewVertices(newExecJobVertices); }
for (IntermediateResult res : ejv.getProducedDataSets()) { IntermediateResult previousDataSet = this.intermediateResults.putIfAbsent(res.getId(), res); if (previousDataSet != null) {
for (IntermediateResult res : ejv.getProducedDataSets()) { IntermediateResult previousDataSet = this.intermediateResults.putIfAbsent(res.getId(), res); if (previousDataSet != null) {
for (IntermediateResult res : ejv.getProducedDataSets()) { IntermediateResult previousDataSet = this.intermediateResults.putIfAbsent(res.getId(), res); if (previousDataSet != null) {