From ff06bd1be83a2a6d2ee39cb002e91499720a7243 Mon Sep 17 00:00:00 2001 From: bibinchundatt Date: Wed, 8 Aug 2018 22:42:52 +0530 Subject: [PATCH] YARN-8601. Print ExecutionType in Container report CLI. Contributed by Bilwa S T. --- .../java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java | 2 ++ .../java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java | 1 + 2 files changed, 3 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java index 14710a4fa78..807938c7f0c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java @@ -881,6 +881,8 @@ public class ApplicationCLI extends YarnCLI { containerReportStr.println(containerReport.getFinishTime()); containerReportStr.print("\tState : "); containerReportStr.println(containerReport.getContainerState()); + containerReportStr.print("\tExecution-Type : "); + containerReportStr.println(containerReport.getExecutionType()); containerReportStr.print("\tLOG-URL : "); containerReportStr.println(containerReport.getLogUrl()); containerReportStr.print("\tHost : "); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java index 6b823b229b8..526adfd3aeb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java @@ -292,6 +292,7 @@ public class TestYarnCLI { pw.println("\tStart-Time : 1234"); pw.println("\tFinish-Time : 5678"); pw.println("\tState : COMPLETE"); + pw.println("\tExecution-Type : GUARANTEED"); pw.println("\tLOG-URL : logURL"); pw.println("\tHost : host:1234"); pw.println("\tNodeHttpAddress : http://host:2345");