From 8db0f2b26e2aed7860d12704510d35c84a973a44 Mon Sep 17 00:00:00 2001 From: Adam Antal Date: Tue, 18 Feb 2020 10:28:12 +0100 Subject: [PATCH] YARN-10143. YARN-10101 broke Yarn logs CLI --- .../ifile/LogAggregationIndexedFileController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 02c319eed1c..a072bdcc39b 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 @@ -621,8 +621,8 @@ public boolean readAggregatedLogs(ContainerLogsRequest logRequest, 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 nodeFiles = LogAggregationUtils -- 2.21.0