}
public void run() {
if (!shouldRun())
return;
KeepAliveHeartbeater keepAliveTask =
new KeepAliveHeartbeater(namenode, nsRegistration, this.servicePair);
keepAliveSender = Executors.newSingleThreadScheduledExecutor();
keepAliveRun = keepAliveSender.scheduleAtFixedRate(keepAliveTask, 0,
anode.heartBeatInterval,
TimeUnit.MILLISECONDS);
while (shouldRun()) {