This is an automated email from the ASF dual-hosted git repository.

bibinchundatt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 2de1e30  YARN-9547. ContainerStatusPBImpl default execution type is 
not returned. Contributed by Bilwa S T.
2de1e30 is described below

commit 2de1e30658439945edf598b47257142f4730a37d
Author: bibinchundatt <[email protected]>
AuthorDate: Wed May 15 13:21:39 2019 +0530

    YARN-9547. ContainerStatusPBImpl default execution type is not returned. 
Contributed by Bilwa S T.
---
 .../apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java  | 2 +-
 .../hadoop/yarn/server/api/protocolrecords/TestProtocolRecords.java    | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java
index 92b1729..9c2f29d 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java
@@ -184,7 +184,7 @@ public class ContainerStatusPBImpl extends ContainerStatus {
   public synchronized ExecutionType getExecutionType() {
     ContainerStatusProtoOrBuilder p = viaProto ? proto : builder;
     if (!p.hasExecutionType()) {
-      return null;
+      return ExecutionType.GUARANTEED;
     }
     return convertFromProtoFormat(p.getExecutionType());
   }
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/api/protocolrecords/TestProtocolRecords.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/api/protocolrecords/TestProtocolRecords.java
index 473557f..9cfcb28 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/api/protocolrecords/TestProtocolRecords.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/api/protocolrecords/TestProtocolRecords.java
@@ -37,6 +37,7 @@ import org.apache.hadoop.yarn.api.records.ContainerExitStatus;
 import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.hadoop.yarn.api.records.ContainerState;
 import org.apache.hadoop.yarn.api.records.ContainerStatus;
+import org.apache.hadoop.yarn.api.records.ExecutionType;
 import org.apache.hadoop.yarn.api.records.NodeAttribute;
 import org.apache.hadoop.yarn.api.records.NodeAttributeType;
 import org.apache.hadoop.yarn.api.records.NodeId;
@@ -210,7 +211,7 @@ public class TestProtocolRecords {
         new ContainerStatusPBImpl(((ContainerStatusPBImpl) status).getProto());
     Assert.assertEquals(ips, pb.getIPs());
     Assert.assertEquals("locahost123", pb.getHost());
-
+    Assert.assertEquals(ExecutionType.GUARANTEED, pb.getExecutionType());
     status.setIPs(null);
     Assert.assertNull(status.getIPs());
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to