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 @@ void joinAll() {
|
||||
|
||||
void refreshNamenodes(Configuration conf)
|
||||
throws IOException {
|
||||
LOG.info("Refresh request received for nameservices: " + conf.get
|
||||
(DFSConfigKeys.DFS_NAMESERVICES));
|
||||
LOG.info("Refresh request received for nameservices: " +
|
||||
conf.get(DFSConfigKeys.DFS_NAMESERVICES));
|
||||
|
||||
Map<String, Map<String, InetSocketAddress>> newAddressMap = DFSUtil
|
||||
.getNNServiceRpcAddressesForCluster(conf);
|
||||
Map<String, Map<String, InetSocketAddress>> newLifelineAddressMap = DFSUtil
|
||||
.getNNLifelineRpcAddressesForCluster(conf);
|
||||
Map<String, Map<String, InetSocketAddress>> newAddressMap = null;
|
||||
Map<String, Map<String, InetSocketAddress>> newLifelineAddressMap = null;
|
||||
|
||||
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) {
|
||||
doRefreshNamenodes(newAddressMap, newLifelineAddressMap);
|
||||
|
Loading…
Reference in New Issue
Block a user