From 8c0133f3d4c85733c1e0389d1ee39f1eab58c0b9 Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Tue, 24 Nov 2015 18:40:33 +0900 Subject: [PATCH] YARN-4298. Fix findbugs warnings in hadoop-yarn-common. Contributed by Sunil G. --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../api/protocolrecords/impl/pb/AllocateResponsePBImpl.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 24807d702b0..6558e40e187 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -1061,6 +1061,9 @@ Release 2.8.0 - UNRELEASED YARN-4367. SLS webapp doesn't load. (kasha). + YARN-4298. Fix findbugs warnings in hadoop-yarn-common. + (Sunil G via aajisaka) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/AllocateResponsePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/AllocateResponsePBImpl.java index bd460f6fa4e..da87465ed49 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/AllocateResponsePBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/AllocateResponsePBImpl.java @@ -386,7 +386,7 @@ public class AllocateResponsePBImpl extends AllocateResponse { } @Override - public Priority getApplicationPriority() { + public synchronized Priority getApplicationPriority() { AllocateResponseProtoOrBuilder p = viaProto ? proto : builder; if (this.appPriority != null) { return this.appPriority; @@ -399,7 +399,7 @@ public class AllocateResponsePBImpl extends AllocateResponse { } @Override - public void setApplicationPriority(Priority priority) { + public synchronized void setApplicationPriority(Priority priority) { maybeInitBuilder(); if (priority == null) builder.clearApplicationPriority();