File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/impl/pb Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -1181,6 +1181,8 @@ Release 2.7.3 - UNRELEASED
1181
1181
YARN-4422. Generic AHS sometimes doesn't show started, node, or logs on App page
1182
1182
(Eric Payne via jeagles)
1183
1183
1184
+ YARN-4439. Clarify NMContainerStatus#toString method. (Jian He via xgong)
1185
+
1184
1186
Release 2.7.2 - UNRELEASED
1185
1187
1186
1188
INCOMPATIBLE CHANGES
Original file line number Diff line number Diff line change 35
35
import org .apache .hadoop .yarn .proto .YarnServerCommonServiceProtos .NMContainerStatusProtoOrBuilder ;
36
36
import org .apache .hadoop .yarn .server .api .protocolrecords .NMContainerStatus ;
37
37
38
- import com .google .protobuf .TextFormat ;
39
-
40
38
public class NMContainerStatusPBImpl extends NMContainerStatus {
41
39
42
40
NMContainerStatusProto proto = NMContainerStatusProto
@@ -82,7 +80,17 @@ public boolean equals(Object other) {
82
80
83
81
@ Override
84
82
public String toString () {
85
- return TextFormat .shortDebugString (getProto ());
83
+ StringBuilder sb = new StringBuilder ();
84
+ sb .append ("[" ).append (getContainerId ()).append (", " )
85
+ .append ("CreateTime: " ).append (getCreationTime ()).append (", " )
86
+ .append ("State: " ).append (getContainerState ()).append (", " )
87
+ .append ("Capability: " ).append (getAllocatedResource ()).append (", " )
88
+ .append ("Diagnostics: " ).append (getDiagnostics ()).append (", " )
89
+ .append ("ExitStatus: " ).append (getContainerExitStatus ()).append (", " )
90
+ .append ("NodeLabelExpression: " ).append (getNodeLabelExpression ())
91
+ .append ("Priority: " ).append (getPriority ())
92
+ .append ("]" );
93
+ return sb .toString ();
86
94
}
87
95
88
96
@ Override
You can’t perform that action at this time.
0 commit comments