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

snemeth pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 0c209f3  YARN-10296. Make ContainerPBImpl#getId/setId synchronized. 
Contributed by Benjamin Teke
0c209f3 is described below

commit 0c209f3f7df34ee01adc2199484205d7f5f6bfee
Author: Szilard Nemeth <[email protected]>
AuthorDate: Wed Jun 10 18:02:05 2020 +0200

    YARN-10296. Make ContainerPBImpl#getId/setId synchronized. Contributed by 
Benjamin Teke
---
 .../org/apache/hadoop/yarn/api/records/impl/pb/ContainerPBImpl.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerPBImpl.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerPBImpl.java
index 47be2f0..1d7315b 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerPBImpl.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerPBImpl.java
@@ -63,7 +63,7 @@ public class ContainerPBImpl extends Container {
     viaProto = true;
   }
   
-  public ContainerProto getProto() {
+  synchronized public ContainerProto getProto() {
   
     mergeLocalToProto();
     proto = viaProto ? proto : builder.build();
@@ -132,7 +132,7 @@ public class ContainerPBImpl extends Container {
   }
 
   @Override
-  public ContainerId getId() {
+  synchronized public ContainerId getId() {
     ContainerProtoOrBuilder p = viaProto ? proto : builder;
     if (this.containerId != null) {
       return this.containerId;
@@ -166,7 +166,7 @@ public class ContainerPBImpl extends Container {
   }
 
   @Override
-  public void setId(ContainerId id) {
+  synchronized public void setId(ContainerId id) {
     maybeInitBuilder();
     if (id == null)
       builder.clearId();


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

Reply via email to