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

Add BlockOpResponseProto's message to DFSClient's exception message

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      When (BlockOpResponseProto#getStatus() != SUCCESS), it helps with debugging if DFSClient can add BlockOpResponseProto's message to the exception message applications will get. For example, instead of

              throw new IOException("Got error for OP_READ_BLOCK, self="
                  + peer.getLocalAddressString() + ", remote="
                  + peer.getRemoteAddressString() + ", for file " + file
                  + ", for pool " + block.getBlockPoolId() + " block " 
                  + block.getBlockId() + "_" + block.getGenerationStamp());
      

      It could be,

              throw new IOException("Got error for OP_READ_BLOCK, self="
                  + peer.getLocalAddressString() + ", remote="
                  + peer.getRemoteAddressString() + ", for file " + file
                  + ", for pool " + block.getBlockPoolId() + " block " 
                  + block.getBlockId() + "_" + block.getGenerationStamp()
                  + ", status message " + status.getMessage());
      

      We might want to check out all the references to BlockOpResponseProto in DFSClient.

      Attachments

        1. HDFS-7439.1.patch
          1 kB
          Takanobu Asanuma
        2. HDFS-7439.2.patch
          12 kB
          Takanobu Asanuma
        3. HDFS-7439.3.patch
          12 kB
          Takanobu Asanuma

        Activity

          People

            tasanuma Takanobu Asanuma
            mingma Ming Ma
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: