[ML] Correctly pass job_id from job task to logger

Original commit: elastic/x-pack-elasticsearch@1c73bccaec
This commit is contained in:
Dimitrios Athanasiou 2017-04-27 20:02:15 +01:00
parent 485be502f4
commit f341b336a5
1 changed files with 4 additions and 4 deletions

View File

@ -334,17 +334,17 @@ public class AutodetectProcessManager extends AbstractComponent {
* @param reason The reason for closing the job
*/
public void closeJob(JobTask jobTask, boolean restart, String reason) {
logger.debug("Attempting to close job [{}], because [{}]", jobTask, reason);
logger.debug("Attempting to close job [{}], because [{}]", jobTask.getJobId(), reason);
AutodetectCommunicator communicator = autoDetectCommunicatorByJob.remove(jobTask.getAllocationId());
if (communicator == null) {
logger.debug("Cannot close: no active autodetect process for job {}", jobTask);
logger.debug("Cannot close: no active autodetect process for job {}", jobTask.getJobId());
return;
}
if (reason == null) {
logger.info("Closing job [{}]", jobTask);
logger.info("Closing job [{}]", jobTask.getJobId());
} else {
logger.info("Closing job [{}], because [{}]", jobTask, reason);
logger.info("Closing job [{}], because [{}]", jobTask.getJobId(), reason);
}
try {