Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

I think that speculative execution means that multiple executions in a ExecutionVertex running at the same time, and failover means that two executions running at two different time.

Multiple 第一个要改的地方:Multiple executions of a upstream ExecutionVertex will produce Multiple ResultPartitions. When all upstream ExecutionVertexs run finished, the inputChannel of down stream executions will be updated to consume the fastest finished execution of upstream. So add a member-variable named fastestFinishedExecution in ExecutionVertex used for create PartitionInfo which used for update down stream executions' inputChannels. 

Code Block
languagejava
titleDefaultExecutionGraph
public class ExecutionVertex
        implements AccessExecutionVertex, Archiveable<ArchivedExecutionVertex> {
	private Execution fastestFinishedExecution = null;
	private volatile boolean vertexFinished = false;
}


第二个要改的地方:Some code should be modifyed to avoid cause problems when multiple executions in one ExecutionVertex finished at the same time. 

A member-variable named vertexFinished was added in ExecutionVertex used for indicates whether this ExecutionVertex run finished and double checked locking pattern in ExecutionVertex.executionFinished().  

finishPartitionsAndUpdateConsumers() in Execution.markFinished() should be moved to ExecutionVertex.executionFinished() and be called after double checked locking pattern in ExecutionVertex.executionFinished()


第三个要改的地方:When all upstream ExecutionVertexs run finished, Execution.updatePartitionConsumers() will be called.这里要更新下游所有execution.

consumerVertex.cachePartitionInfo(partitionInfo);将被修改为consumer.cachePartitionInfo(partitionInfo);并且ExecutionVertex里面的cachePartitionInfo()函数将被remove.以前可以这样做是因为默认一ExecutionVertex只会有一个execution,但是现在不同了,所以 可以这样改。



这里要重点想想怎么说了:

when the down stream execution meet DataConsumptionException. It will restart with the upstream execution that has been finished.

...