diff --git a/flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/WebFrontendITCase.java b/flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/WebFrontendITCase.java index 1a662d0f1fd8f2..ac7f35e020954c 100644 --- a/flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/WebFrontendITCase.java +++ b/flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/WebFrontendITCase.java @@ -305,7 +305,6 @@ public void testCancel() throws Exception { /** * See FLINK-19518. This test ensures that the /jobs/overview handler shows a duration != 0. - * */ @Test public void testJobOverviewHandler() throws Exception { @@ -318,7 +317,6 @@ public void testJobOverviewHandler() throws Exception { sender.setInvokableClass(BlockingInvokable.class); final JobGraph jobGraph = new JobGraph("Stoppable streaming test job", sender); - final JobID jid = jobGraph.getJobID(); ClusterClient clusterClient = CLUSTER.getClusterClient(); clusterClient.submitJob(jobGraph).get(); @@ -332,7 +330,6 @@ public void testJobOverviewHandler() throws Exception { BlockingInvokable.latch.await(); final Duration testTimeout = Duration.ofMinutes(2); - final LocalTime deadline = LocalTime.now().plus(testTimeout); String json = TestBaseUtils.getFromHTTP("http://localhost:" + getRestPort() + "/jobs/overview"); diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/messages/webmonitor/JobDetails.java b/flink-runtime/src/main/java/org/apache/flink/runtime/messages/webmonitor/JobDetails.java index 83dfe18f078567..702469a761e4d4 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/messages/webmonitor/JobDetails.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/messages/webmonitor/JobDetails.java @@ -114,13 +114,13 @@ public static JobDetails createDetailsForJob(AccessExecutionGraph job) { int numTotalTasks = 0; for (AccessExecutionJobVertex ejv : job.getVerticesTopologically()) { - AccessExecutionVertex[] vertices = ejv.getTaskVertices(); - numTotalTasks += vertices.length; + AccessExecutionVertex[] taskVertices = ejv.getTaskVertices(); + numTotalTasks += taskVertices.length; - for (AccessExecutionVertex vertex : vertices) { - ExecutionState state = vertex.getExecutionState(); + for (AccessExecutionVertex taskVertex : taskVertices) { + ExecutionState state = taskVertex.getExecutionState(); countsPerStatus[state.ordinal()]++; - lastChanged = Math.max(lastChanged, vertex.getStateTimestamp(state)); + lastChanged = Math.max(lastChanged, taskVertex.getStateTimestamp(state)); } }