Browse Source

HUE-2061 [jb] Task logs are not retrieved if containers not on the same host

Logs not available for attempt_1396484319227_0013_m_000000_0. Could be caused by the rentention policy

YARN does not provide an API to get the log() and guessing the URL from log() from Job Attempt needs some extra logic for Task Attempt.
Romain Rigaux 11 years ago
parent
commit
4f60306152
1 changed files with 1 additions and 0 deletions
  1. 1 0
      apps/jobbrowser/src/jobbrowser/yarn_models.py

+ 1 - 0
apps/jobbrowser/src/jobbrowser/yarn_models.py

@@ -223,6 +223,7 @@ class Attempt:
     log_link = attempt['logsLink']
     # Get MR task logs
     log_link = log_link.replace(attempt['containerId'], self.assignedContainerId)
+    log_link = log_link.replace(attempt['nodeHttpAddress'].split(':')[0], self.nodeHttpAddress.split(':')[0])
 
     for name in ('stdout', 'stderr', 'syslog'):
       link = '/%s/' % name