Skip to content

Commit

Permalink
[FLINK-17300] Log the lineage information between ExecutionAttemptID …
Browse files Browse the repository at this point in the history
…and AllocationID

This closes apache#11852.
  • Loading branch information
KarmaGYZ authored and tillrohrmann committed Jun 25, 2020
1 parent 581fabe commit 7e48549
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -728,10 +728,8 @@ public void deploy() throws JobException {
return;
}

if (LOG.isInfoEnabled()) {
LOG.info(String.format("Deploying %s (attempt #%d) to %s", vertex.getTaskNameWithSubtaskIndex(),
attemptNumber, getAssignedResourceLocation()));
}
LOG.info("Deploying {} (attempt #{}) with attempt id {} to {} with allocation id {}", vertex.getTaskNameWithSubtaskIndex(),
attemptNumber, vertex.getCurrentExecutionAttempt().getAttemptId(), getAssignedResourceLocation(), slot.getAllocationId());

final TaskDeploymentDescriptor deployment = TaskDeploymentDescriptorFactory
.fromExecutionVertex(vertex, attemptNumber)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,8 @@ public CompletableFuture<Acknowledge> submitTask(

taskMetricGroup.gauge(MetricNames.IS_BACKPRESSURED, task::isBackPressured);

log.info("Received task {}.", task.getTaskInfo().getTaskNameWithSubtasks());
log.info("Received task {} ({}), deploy into slot with allocation id {}.",
task.getTaskInfo().getTaskNameWithSubtasks(), tdd.getExecutionAttemptId(), tdd.getAllocationId());

boolean taskAdded;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ public boolean accept(File dir, String name) {
String expected = "Starting TaskManagers";
Assert.assertTrue("Expected string '" + expected + "' not found in JobManager log: '" + jobmanagerLog + "'",
content.contains(expected));
expected = " (2/2) (attempt #0) to ";
expected = " (2/2) (attempt #0) with attempt id ";
Assert.assertTrue("Expected string '" + expected + "' not found in JobManager log." +
"This string checks that the job has been started with a parallelism of 2. Log contents: '" + jobmanagerLog + "'",
content.contains(expected));
Expand Down

0 comments on commit 7e48549

Please sign in to comment.