diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/JobRunner.java b/azkaban-exec-server/src/main/java/azkaban/execapp/JobRunner.java
index 46eeabd..cfc0388 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/JobRunner.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/JobRunner.java
@@ -601,16 +601,21 @@ public class JobRunner extends EventHandler implements Runnable {
finalStatus = changeStatus(Status.KILLED);
}
- final int attemptNo = this.node.getAttempt();
- logInfo("Finishing job " + this.jobId + (this.node.getAttempt() > 0 ? (" retry: " + attemptNo) : "") + " at "
- + this.node.getEndTime() + " with status " + this.node.getStatus());
+ logInfo(
+ "Finishing job " + this.jobId + getNodeRetryLog() + " at " + this.node.getEndTime()
+ + " with status " + this.node.getStatus());
+
fireEvent(Event.create(this, Type.JOB_FINISHED,
new EventData(finalStatus, this.node.getNestedId())), false);
- finalizeLogFile(attemptNo);
+ finalizeLogFile(this.node.getAttempt());
finalizeAttachmentFile();
writeStatus();
}
+ private String getNodeRetryLog() {
+ return this.node.getAttempt() > 0 ? (" retry: " + this.node.getAttempt()) : "";
+ }
+
private void uploadExecutableNode() {
try {
this.loader.uploadExecutableNode(this.node, this.props);
@@ -632,8 +637,7 @@ public class JobRunner extends EventHandler implements Runnable {
return null;
}
- logInfo("Starting job " + this.jobId + (this.node.getAttempt() > 0 ? (" retry: " + this.node.getAttempt()) : "") + " at "
- + this.node.getStartTime());
+ logInfo("Starting job " + this.jobId + getNodeRetryLog() + " at " + this.node.getStartTime());
// If it's an embedded flow, we'll add the nested flow info to the job
// conf