hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xg...@apache.org
Subject hadoop git commit: YARN-4439. Clarify NMContainerStatus#toString method. Contributed by Jian He
Date Tue, 15 Dec 2015 01:16:18 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 4bc1aab49 -> f22d0046d


YARN-4439. Clarify NMContainerStatus#toString method. Contributed by
Jian He

(cherry picked from commit d8a45425eba372cdebef3be50436b6ddf1c4e192)
(cherry picked from commit 992f65dd8b53ee31b6b7347e2cfe59a78d031268)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f22d0046
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f22d0046
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f22d0046

Branch: refs/heads/branch-2.8
Commit: f22d0046deca6f23b979cca9b81eb04684eda44f
Parents: 4bc1aab
Author: Xuan <xgong@apache.org>
Authored: Mon Dec 14 15:41:28 2015 -0800
Committer: Xuan <xgong@apache.org>
Committed: Mon Dec 14 17:16:07 2015 -0800

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                       |  2 ++
 .../impl/pb/NMContainerStatusPBImpl.java              | 14 +++++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f22d0046/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 5a6d3e4..e747522 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -1083,6 +1083,8 @@ Release 2.7.3 - UNRELEASED
     YARN-4380. TestResourceLocalizationService.testDownloadingResourcesOnContainerKill
     fails intermittently. (Varun Saxena via ozawa)
 
+    YARN-4439. Clarify NMContainerStatus#toString method. (Jian He via xgong)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f22d0046/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/NMContainerStatusPBImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/NMContainerStatusPBImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/NMContainerStatusPBImpl.java
index 624b89b..921c9d9 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/NMContainerStatusPBImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb/NMContainerStatusPBImpl.java
@@ -35,8 +35,6 @@ import org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NMContainerSta
 import org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NMContainerStatusProtoOrBuilder;
 import org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus;
 
-import com.google.protobuf.TextFormat;
-
 public class NMContainerStatusPBImpl extends NMContainerStatus {
 
   NMContainerStatusProto proto = NMContainerStatusProto
@@ -82,7 +80,17 @@ public class NMContainerStatusPBImpl extends NMContainerStatus {
 
   @Override
   public String toString() {
-    return TextFormat.shortDebugString(getProto());
+    StringBuilder sb = new StringBuilder();
+    sb.append("[").append(getContainerId()).append(", ")
+        .append("CreateTime: ").append(getCreationTime()).append(", ")
+        .append("State: ").append(getContainerState()).append(", ")
+        .append("Capability: ").append(getAllocatedResource()).append(", ")
+        .append("Diagnostics: ").append(getDiagnostics()).append(", ")
+        .append("ExitStatus: ").append(getContainerExitStatus()).append(", ")
+        .append("NodeLabelExpression: ").append(getNodeLabelExpression())
+        .append("Priority: ").append(getPriority())
+        .append("]");
+    return sb.toString();
   }
 
   @Override


Mime
View raw message