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 55b499dac4
commit d79685af04
3 changed files with 11 additions and 11 deletions

View File

@ -208,9 +208,9 @@ public class Router extends CompositeService {
// 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 class Router extends CompositeService {
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 class Router extends CompositeService {
}
if (nsId != null) {
NamenodeHeartbeatService heartbeatService =
createNamenodeHearbeatService(nsId, nnId);
createNamenodeHeartbeatService(nsId, nnId);
if (heartbeatService != null) {
ret.put(heartbeatService.getNamenodeDesc(), heartbeatService);
}
@ -530,7 +530,7 @@ public class Router extends CompositeService {
*
* @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 @@ public class Router extends CompositeService {
}
}
return createNamenodeHearbeatService(nsId, nnId);
return createNamenodeHeartbeatService(nsId, nnId);
}
/**
@ -551,7 +551,7 @@ public class Router extends CompositeService {
* @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 @@ public class Router extends CompositeService {
* Get the list of namenode heartbeat service.
*/
@VisibleForTesting
Collection<NamenodeHeartbeatService> getNamenodeHearbeatServices() {
Collection<NamenodeHeartbeatService> getNamenodeHeartbeatServices() {
return this.namenodeHeartbeatServices;
}

View File

@ -341,7 +341,7 @@ public class TestRouterClientRejectOverload {
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 class TestRouterNamenodeMonitoring {
}
Collection<NamenodeHeartbeatService> heartbeatServices = routerContext
.getRouter().getNamenodeHearbeatServices();
.getRouter().getNamenodeHeartbeatServices();
// manually trigger the heartbeat
for (NamenodeHeartbeatService service : heartbeatServices) {
service.periodicInvoke();