You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sn...@apache.org on 2020/02/24 20:27:40 UTC

[hadoop] branch branch-3.2 updated: YARN-10143. YARN-10101 broke Yarn logs CLI. Contributed by Adam Antal

This is an automated email from the ASF dual-hosted git repository.

snemeth pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
     new 92ad3bd  YARN-10143. YARN-10101 broke Yarn logs CLI. Contributed by Adam Antal
92ad3bd is described below

commit 92ad3bd0998a9d1ad8b9edf2afe7aea491bb6d4d
Author: Szilard Nemeth <sn...@apache.org>
AuthorDate: Mon Feb 24 21:27:31 2020 +0100

    YARN-10143. YARN-10101 broke Yarn logs CLI. Contributed by Adam Antal
---
 .../filecontroller/ifile/LogAggregationIndexedFileController.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
index 0073961..2173616 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
@@ -592,8 +592,8 @@ public class LogAggregationIndexedFileController
     ApplicationId appId = logRequest.getAppId();
     String appOwner = logRequest.getAppOwner();
     ApplicationAttemptId appAttemptId = logRequest.getAppAttemptId();
-    boolean getAllContainers = ((containerIdStr == null ||
-        containerIdStr.isEmpty()) && appAttemptId != null);
+    boolean getAllContainers = (containerIdStr == null ||
+        containerIdStr.isEmpty());
     String nodeIdStr = (nodeId == null || nodeId.isEmpty()) ? null
         : LogAggregationUtils.getNodeString(nodeId);
     RemoteIterator<FileStatus> nodeFiles = LogAggregationUtils
@@ -638,7 +638,8 @@ public class LogAggregationIndexedFileController
           for (Entry<String, List<IndexedFileLogMeta>> log : logMeta
               .getLogMetas().entrySet()) {
             String currentContainerIdStr = log.getKey();
-            if (!belongsToAppAttempt(appAttemptId, currentContainerIdStr)) {
+            if (appAttemptId != null &&
+                !belongsToAppAttempt(appAttemptId, currentContainerIdStr)) {
               continue;
             }
             ContainerLogMeta meta = new ContainerLogMeta(


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org