Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
Now, if i enable the heartbeat.enable, but i do not want to monitor any namenode, i get an ERROR log like:
[2018-04-19T14:00:03.057+08:00] [ERROR] federation.router.Router.serviceInit(Router.java 214) [main] : Heartbeat is enabled but there are no namenodes to monitor
and if i disable the heartbeat.enable, we cannot get any mounttable update, because the following logic in Router.javaļ¼
if (conf.getBoolean( RBFConfigKeys.DFS_ROUTER_HEARTBEAT_ENABLE, RBFConfigKeys.DFS_ROUTER_HEARTBEAT_ENABLE_DEFAULT)) { // Create status updater for each monitored Namenode this.namenodeHeartbeatServices = createNamenodeHeartbeatServices(); for (NamenodeHeartbeatService hearbeatService : this.namenodeHeartbeatServices) { addService(hearbeatService); } if (this.namenodeHeartbeatServices.isEmpty()) { LOG.error("Heartbeat is enabled but there are no namenodes to monitor"); } // Periodically update the router state this.routerHeartbeatService = new RouterHeartbeatService(this); addService(this.routerHeartbeatService); }