You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/09/27 17:19:07 UTC
[GitHub] xndai commented on a change in pull request #6684: [FLINK-10205] Batch Job: InputSplit Fault tolerant for DataSource…
xndai 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_r221002876
##########
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:
nit: When all input splits are exhausted for given vertex (nextInputSplit is null), you can just return null without adding an extra null element at the end of array list.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services