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

add toString method to DatanodeStorage for easier debugging

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      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.002.patch
          3 kB
          Yongjun Zhang
        2. HDFS-6578.001.patch
          3 kB
          Yongjun Zhang

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: