code: public void updateRegInfo(DatanodeID nodeReg) {
      name = nodeReg.getName();
      infoPort = nodeReg.getInfoPort();
      ipcPort = nodeReg.getIpcPort();
      // update any more fields added in future.
    }
docs: Update fields when a new registration request comes in.
  Note that this does not update storageID.