|
@@ -621,8 +621,8 @@ public class LogAggregationIndexedFileController
|
|
ApplicationId appId = logRequest.getAppId();
|
|
ApplicationId appId = logRequest.getAppId();
|
|
String appOwner = logRequest.getAppOwner();
|
|
String appOwner = logRequest.getAppOwner();
|
|
ApplicationAttemptId appAttemptId = logRequest.getAppAttemptId();
|
|
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
|
|
String nodeIdStr = (nodeId == null || nodeId.isEmpty()) ? null
|
|
: LogAggregationUtils.getNodeString(nodeId);
|
|
: LogAggregationUtils.getNodeString(nodeId);
|
|
RemoteIterator<FileStatus> nodeFiles = LogAggregationUtils
|
|
RemoteIterator<FileStatus> nodeFiles = LogAggregationUtils
|
|
@@ -667,7 +667,8 @@ public class LogAggregationIndexedFileController
|
|
for (Entry<String, List<IndexedFileLogMeta>> log : logMeta
|
|
for (Entry<String, List<IndexedFileLogMeta>> log : logMeta
|
|
.getLogMetas().entrySet()) {
|
|
.getLogMetas().entrySet()) {
|
|
String currentContainerIdStr = log.getKey();
|
|
String currentContainerIdStr = log.getKey();
|
|
- if (!belongsToAppAttempt(appAttemptId, currentContainerIdStr)) {
|
|
|
|
|
|
+ if (appAttemptId != null &&
|
|
|
|
+ !belongsToAppAttempt(appAttemptId, currentContainerIdStr)) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
ContainerLogMeta meta = new ContainerLogMeta(
|
|
ContainerLogMeta meta = new ContainerLogMeta(
|