HDFS-13275. Adding log for BlockPoolManager#refreshNamenodes failures. Contributed by Ajay Kumar.
This commit is contained in:
parent
4c57fb0cd9
commit
0be0f1ce1d
|
@ -146,13 +146,25 @@ class BlockPoolManager {
|
||||||
|
|
||||||
void refreshNamenodes(Configuration conf)
|
void refreshNamenodes(Configuration conf)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
LOG.info("Refresh request received for nameservices: " + conf.get
|
LOG.info("Refresh request received for nameservices: " +
|
||||||
(DFSConfigKeys.DFS_NAMESERVICES));
|
conf.get(DFSConfigKeys.DFS_NAMESERVICES));
|
||||||
|
|
||||||
Map<String, Map<String, InetSocketAddress>> newAddressMap = DFSUtil
|
Map<String, Map<String, InetSocketAddress>> newAddressMap = null;
|
||||||
.getNNServiceRpcAddressesForCluster(conf);
|
Map<String, Map<String, InetSocketAddress>> newLifelineAddressMap = null;
|
||||||
Map<String, Map<String, InetSocketAddress>> newLifelineAddressMap = DFSUtil
|
|
||||||
.getNNLifelineRpcAddressesForCluster(conf);
|
try {
|
||||||
|
newAddressMap =
|
||||||
|
DFSUtil.getNNServiceRpcAddressesForCluster(conf);
|
||||||
|
newLifelineAddressMap =
|
||||||
|
DFSUtil.getNNLifelineRpcAddressesForCluster(conf);
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
LOG.warn("Unable to get NameNode addresses.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newAddressMap == null || newAddressMap.isEmpty()) {
|
||||||
|
throw new IOException("No services to connect, missing NameNode " +
|
||||||
|
"address.");
|
||||||
|
}
|
||||||
|
|
||||||
synchronized (refreshNamenodesLock) {
|
synchronized (refreshNamenodesLock) {
|
||||||
doRefreshNamenodes(newAddressMap, newLifelineAddressMap);
|
doRefreshNamenodes(newAddressMap, newLifelineAddressMap);
|
||||||
|
|
Loading…
Reference in New Issue