flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #4916: [FLINK-7153] Re-introduce preferred locations for ...
Date Wed, 01 Nov 2017 09:39:58 GMT
Github user tillrohrmann commented on a diff in the pull request:

    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
    @@ -878,113 +880,70 @@ private void scheduleEager(SlotProvider slotProvider, final Time
timeout) {
     		// that way we do not have any operation that can fail between allocating the slots
     		// and adding them to the list. If we had a failure in between there, that would
     		// cause the slots to get lost
    -		final ArrayList<ExecutionAndSlot[]> resources = new ArrayList<>(getNumberOfExecutionJobVertices());
     		final boolean queued = allowQueuedScheduling;
    -		// we use this flag to handle failures in a 'finally' clause
    -		// that allows us to not go through clumsy cast-and-rethrow logic
    -		boolean successful = false;
    +		// collecting all the slots may resize and fail in that operation without slots getting
    +		final ArrayList<CompletableFuture<Execution>> allAllocationFutures = new
    -		try {
    -			// collecting all the slots may resize and fail in that operation without slots getting
    -			final ArrayList<CompletableFuture<SimpleSlot>> slotFutures = new ArrayList<>(getNumberOfExecutionJobVertices());
    +		// allocate the slots (obtain all their futures
    +		for (ExecutionJobVertex ejv : getVerticesTopologically()) {
    +			// these calls are not blocking, they only return futures
    --- End diff --
    In that case, it depends a bit on how the scheduler values the state location preference.
If it is implemented that it strictly schedules tasks to its previous state location, then
it could happen that these tasks don't end up in the same slot as other tasks with which they
shared a slot before.


View raw message