HADOOP-11459. Fix recent findbugs in ActiveStandbyElector, NetUtils and ShellBasedIdMapping (Contributed by Vinayakumar B)
(cherry picked from commit 9803ae374f69942aec82ec6eeeb9722523a1ade0)
This commit is contained in:
parent
7adffad2bb
commit
383e1c5f73
@ -318,7 +318,10 @@ Release 2.7.0 - UNRELEASED
|
|||||||
|
|
||||||
HADOOP-11446. S3AOutputStream should use shared thread pool to
|
HADOOP-11446. S3AOutputStream should use shared thread pool to
|
||||||
avoid OutOfMemoryError. (Ted Yu via stevel)
|
avoid OutOfMemoryError. (Ted Yu via stevel)
|
||||||
|
|
||||||
|
HADOOP-11459. Fix recent findbugs in ActiveStandbyElector, NetUtils
|
||||||
|
and ShellBasedIdMapping (vinayakumarb)
|
||||||
|
|
||||||
Release 2.6.0 - 2014-11-18
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -1064,7 +1064,9 @@ private void setZooKeeperRef(ZooKeeper zk) {
|
|||||||
public void process(WatchedEvent event) {
|
public void process(WatchedEvent event) {
|
||||||
hasReceivedEvent.countDown();
|
hasReceivedEvent.countDown();
|
||||||
try {
|
try {
|
||||||
hasSetZooKeeper.await(zkSessionTimeout, TimeUnit.MILLISECONDS);
|
if (!hasSetZooKeeper.await(zkSessionTimeout, TimeUnit.MILLISECONDS)) {
|
||||||
|
LOG.debug("Event received with stale zk");
|
||||||
|
}
|
||||||
ActiveStandbyElector.this.processWatchEvent(
|
ActiveStandbyElector.this.processWatchEvent(
|
||||||
zk, event);
|
zk, event);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
@ -288,7 +288,7 @@ private static String canonicalizeHost(String host) {
|
|||||||
try {
|
try {
|
||||||
fqHost = SecurityUtil.getByName(host).getHostName();
|
fqHost = SecurityUtil.getByName(host).getHostName();
|
||||||
// slight race condition, but won't hurt
|
// slight race condition, but won't hurt
|
||||||
canonicalizedHostCache.put(host, fqHost);
|
canonicalizedHostCache.putIfAbsent(host, fqHost);
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
fqHost = host;
|
fqHost = host;
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ private static boolean isInteger(final String s) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initStaticMapping() throws IOException {
|
private synchronized void initStaticMapping() throws IOException {
|
||||||
staticMapping = new StaticMapping(
|
staticMapping = new StaticMapping(
|
||||||
new HashMap<Integer, Integer>(), new HashMap<Integer, Integer>());
|
new HashMap<Integer, Integer>(), new HashMap<Integer, Integer>());
|
||||||
if (staticMappingFile.exists()) {
|
if (staticMappingFile.exists()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user