HDFS-5666. Fix inconsistent synchronization in BPOfferService (jxiang via cmccabe)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1551302 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
63cb6749bb
commit
bbc30c2607
|
@ -381,6 +381,8 @@ Release 2.3.0 - UNRELEASED
|
|||
|
||||
HDFS-4201. NPE in BPServiceActor#sendHeartBeat. (jxiang via cmccabe)
|
||||
|
||||
HDFS-5666. Fix inconsistent synchronization in BPOfferService (jxiang via cmccabe)
|
||||
|
||||
Release 2.2.0 - 2013-10-13
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -146,7 +146,7 @@ class BPOfferService {
|
|||
return false;
|
||||
}
|
||||
|
||||
String getBlockPoolId() {
|
||||
synchronized String getBlockPoolId() {
|
||||
if (bpNSInfo != null) {
|
||||
return bpNSInfo.getBlockPoolID();
|
||||
} else {
|
||||
|
@ -161,7 +161,7 @@ class BPOfferService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public synchronized String toString() {
|
||||
if (bpNSInfo == null) {
|
||||
// If we haven't yet connected to our NN, we don't yet know our
|
||||
// own block pool ID.
|
||||
|
|
Loading…
Reference in New Issue