浏览代码

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 年之前
父节点
当前提交
4f60306
共有 1 个文件被更改,包括 1 次插入0 次删除
  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