code: public DatanodeCommand[] sendHeartbeat(DatanodeRegistration registration,
                                         long capacity,
                                         long dfsUsed, long remaining,
                                         long namespaceUsed,
                                         int xmitsInProgress,
                                         int xceiverCount) throws IOException {
      throw new IOException("sendHeartbeat" + errMessage);
    }
docs: This method should not be invoked on the composite
  DatanodeProtocols object. You can call these on the individual
  DatanodeProcol objects.