public DatanodeCommand [ ] sendHeartbeat ( DatanodeRegistration nodeReg , long capacity , long dfsUsed , long remaining , long namespaceUsed , int xmitsInProgress , int xceiverCount ) throws IOException { verifyRequest ( nodeReg ) ; myMetrics . numHeartbeat . inc ( ) ; return namesystem . handleHeartbeat ( nodeReg , capacity , dfsUsed , remaining , namespaceUsed , xceiverCount , xmitsInProgress ) ; }
Data node notify the name node that it is alive Return an array of block - oriented commands for the datanode to execute . This will be either a transfer or a delete operation .