Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-6578

add toString method to DatanodeStorage for easier debugging

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0
    • None
    • None
    • Reviewed

    Description

      It seems to be nice to add a toString() method for DatanodeStorage class, so we can print out its key info easier while doing debuging.

      Another thing is, in the end of BlockManager#processReport, there is the following message,

         blockLog.info("BLOCK* processReport: from storage " + storage.getStorageID()
              + " node " + nodeID + ", blocks: " + newReport.getNumberOfBlocks()
              + ", processing time: " + (endTime - startTime) + " msecs");
          return !node.hasStaleStorages();
      

      We could add node.hasStaleStorages() to the log, and possibly replace storage.getSorateID() with the suggested storage.toString().

      Any comments? thanks.

      Attachments

        1. HDFS-6578.001.patch
          3 kB
          Yongjun Zhang
        2. HDFS-6578.002.patch
          3 kB
          Yongjun Zhang

        Activity

          People

            yzhangal Yongjun Zhang
            yzhangal Yongjun Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: