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 2019/04/30 13:18:41 UTC

[GitHub] [flink] tillrohrmann commented on a change in pull request #8313: [FLINK-12184][Coordination]HistoryServerArchieFetcher incompatible with old version

tillrohrmann commented on a change in pull request #8313: [FLINK-12184][Coordination]HistoryServerArchieFetcher incompatible with old version
URL: https://github.com/apache/flink/pull/8313#discussion_r279748455
 
 

 ##########
 File path: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
 ##########
 @@ -258,7 +269,13 @@ private static String convertLegacyJobOverview(String legacyOverview) throws IOE
 		int[] tasksPerState = new int[ExecutionState.values().length];
 		// pending is a mix of CREATED/SCHEDULED/DEPLOYING
 		// to maintain the correct number of task states we have to pick one of them
-		tasksPerState[ExecutionState.SCHEDULED.ordinal()] = pending;
+		if (versionLessThan14) {
+			tasksPerState[ExecutionState.SCHEDULED.ordinal()] = pending;
+		} else {
+			tasksPerState[ExecutionState.SCHEDULED.ordinal()] = scheduled;
+			tasksPerState[ExecutionState.CREATED.ordinal()] = created;
+			tasksPerState[ExecutionState.DEPLOYING.ordinal()] = deploying;
+		}
 
 Review comment:
   Do we need the `versionLessThan14` distinction here? We could say that we assign `scheduled = pendingNode.asInt()` in line 257 and get completely rid of `pending`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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