소스 검색

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 년 전
부모
커밋
4f60306152
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