HDFS-14335. RBF: Fix heartbeat typos in the Router. Contributed by CR Hota.

This commit is contained in:
Inigo Goiri 2019-03-04 15:16:29 -08:00 committed by Brahma Reddy Battula
parent 6cdf8db55c
commit fcabc8f0e4
3 changed files with 11 additions and 11 deletions

View File

@ -208,9 +208,9 @@ protected void serviceInit(Configuration configuration) throws Exception {
// Create status updater for each monitored Namenode
this.namenodeHeartbeatServices = createNamenodeHeartbeatServices();
for (NamenodeHeartbeatService hearbeatService :
for (NamenodeHeartbeatService heartbeatService :
this.namenodeHeartbeatServices) {
addService(hearbeatService);
addService(heartbeatService);
}
if (this.namenodeHeartbeatServices.isEmpty()) {
@ -487,9 +487,9 @@ public InetSocketAddress getHttpServerAddress() {
if (conf.getBoolean(
RBFConfigKeys.DFS_ROUTER_MONITOR_LOCAL_NAMENODE,
RBFConfigKeys.DFS_ROUTER_MONITOR_LOCAL_NAMENODE_DEFAULT)) {
// Create a local heartbet service
// Create a local heartbeat service
NamenodeHeartbeatService localHeartbeatService =
createLocalNamenodeHearbeatService();
createLocalNamenodeHeartbeatService();
if (localHeartbeatService != null) {
String nnDesc = localHeartbeatService.getNamenodeDesc();
ret.put(nnDesc, localHeartbeatService);
@ -514,7 +514,7 @@ public InetSocketAddress getHttpServerAddress() {
}
if (nsId != null) {
NamenodeHeartbeatService heartbeatService =
createNamenodeHearbeatService(nsId, nnId);
createNamenodeHeartbeatService(nsId, nnId);
if (heartbeatService != null) {
ret.put(heartbeatService.getNamenodeDesc(), heartbeatService);
}
@ -530,7 +530,7 @@ public InetSocketAddress getHttpServerAddress() {
*
* @return Updater of the status for the local Namenode.
*/
protected NamenodeHeartbeatService createLocalNamenodeHearbeatService() {
protected NamenodeHeartbeatService createLocalNamenodeHeartbeatService() {
// Detect NN running in this machine
String nsId = DFSUtil.getNamenodeNameServiceId(conf);
String nnId = null;
@ -541,7 +541,7 @@ protected NamenodeHeartbeatService createLocalNamenodeHearbeatService() {
}
}
return createNamenodeHearbeatService(nsId, nnId);
return createNamenodeHeartbeatService(nsId, nnId);
}
/**
@ -551,7 +551,7 @@ protected NamenodeHeartbeatService createLocalNamenodeHearbeatService() {
* @param nnId Identifier of the namenode (HA) to monitor.
* @return Updater of the status for the specified Namenode.
*/
protected NamenodeHeartbeatService createNamenodeHearbeatService(
protected NamenodeHeartbeatService createNamenodeHeartbeatService(
String nsId, String nnId) {
LOG.info("Creating heartbeat service for Namenode {} in {}", nnId, nsId);
@ -739,7 +739,7 @@ RouterQuotaUpdateService getQuotaCacheUpdateService() {
* Get the list of namenode heartbeat service.
*/
@VisibleForTesting
Collection<NamenodeHeartbeatService> getNamenodeHearbeatServices() {
Collection<NamenodeHeartbeatService> getNamenodeHeartbeatServices() {
return this.namenodeHeartbeatServices;
}

View File

@ -341,7 +341,7 @@ public void testNoNamenodesAvailable() throws Exception{
for (RouterContext routerContext : cluster.getRouters()) {
// Manually trigger the heartbeat
Collection<NamenodeHeartbeatService> heartbeatServices = routerContext
.getRouter().getNamenodeHearbeatServices();
.getRouter().getNamenodeHeartbeatServices();
for (NamenodeHeartbeatService service : heartbeatServices) {
service.periodicInvoke();
}

View File

@ -113,7 +113,7 @@ public void testNamenodeMonitoring() throws Exception {
}
Collection<NamenodeHeartbeatService> heartbeatServices = routerContext
.getRouter().getNamenodeHearbeatServices();
.getRouter().getNamenodeHeartbeatServices();
// manually trigger the heartbeat
for (NamenodeHeartbeatService service : heartbeatServices) {
service.periodicInvoke();