isunjin commented on a change in pull request #6684: [FLINK-10205] Batch Job: InputSplit Fault tolerant for DataSource… URL: https://github.com/apache/flink/pull/6684#discussion_r221024426
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java ########## @@ -249,6 +254,19 @@ public CoLocationConstraint getLocationConstraint() { return locationConstraint; } + public InputSplit getNextInputSplit(int index, String host) { + final int taskId = this.getParallelSubtaskIndex(); + synchronized (this.inputSplits) { + if (index < this.inputSplits.size()) { + return this.inputSplits.get(index); + } else { + final InputSplit nextInputSplit = this.jobVertex.getSplitAssigner().getNextInputSplit(host, taskId); Review comment: put null here is to avoid recomputing, otherwise if there is another execution attempt pull getNextSplit we need to recompute. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services