Details
Description
Exception looks like:
2018-02-23 19:04:56,341 ERROR router.RouterHeartbeatService: Cannot get version for class org.apache.hadoop.hdfs.server.federation.store.MembershipStore: Cached State Store not initialized, MembershipState records not valid 2018-02-23 19:04:56,341 ERROR router.RouterHeartbeatService: Cannot get version for class org.apache.hadoop.hdfs.server.federation.store.MountTableStore: Cached State Store not initialized, MountTable records not valid Exception in thread "Router Heartbeat Async" java.lang.NullPointerException at org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreSerializableImpl.serialize(StateStoreSerializableImpl.java:60) at org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreZooKeeperImpl.putAll(StateStoreZooKeeperImpl.java:191) at org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreBaseImpl.put(StateStoreBaseImpl.java:75) at org.apache.hadoop.hdfs.server.federation.store.impl.RouterStoreImpl.routerHeartbeat(RouterStoreImpl.java:88) at org.apache.hadoop.hdfs.server.federation.router.RouterHeartbeatService.updateStateStore(RouterHeartbeatService.java:95) at org.apache.hadoop.hdfs.server.federation.router.RouterHeartbeatService.access$000(RouterHeartbeatService.java:43) at org.apache.hadoop.hdfs.server.federation.router.RouterHeartbeatService$1.run(RouterHeartbeatService.java:68) at java.lang.Thread.run(Thread.java:748)
This is because, during starting the Router, the CachedStateStore hasn't been initialized and cannot serve requests. Although the router will still be started, it would be better to fix the exceptions.