Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger committed Oct 14, 2020
1 parent 22fbad4 commit 5000a17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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();
Expand All @@ -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("https://localhost:" + getRestPort() + "/jobs/overview");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 5000a17

Please sign in to comment.