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

WebHDFS: Add erasureCodingPolicy field to GETCONTENTSUMMARY response

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      Quote [~jojochuang]'s comment:

      ContentSummary has a field erasureCodingPolicy which was added in HDFS-11647, but webhdfs GETCONTENTSUMMARY doesn't include that.

      Examples:

      Directory, Before
      GET /webhdfs/v1/tmp/?op=GETCONTENTSUMMARY HTTP/1.1
      
      {
        "ContentSummary": {
          "directoryCount": 15,
          "fileCount": 1,
          "length": 180838,
          "quota": -1,
          "spaceConsumed": 542514,
          "spaceQuota": -1,
          "typeQuota": {}
        }
      }
      
      Directory, After, With EC policy RS-6-3-1024k set
      GET /webhdfs/v1/tmp/?op=GETCONTENTSUMMARY HTTP/1.1
      
      {
        "ContentSummary": {
          "directoryCount": 15,
          "ecPolicy": "RS-6-3-1024k",
          "fileCount": 1,
          "length": 180838,
          "quota": -1,
          "spaceConsumed": 542514,
          "spaceQuota": -1,
          "typeQuota": {}
        }
      }
      
      Directory, After, No EC policy set
      GET /webhdfs/v1/tmp/?op=GETCONTENTSUMMARY HTTP/1.1
      
      {
        "ContentSummary": {
          "directoryCount": 15,
          "ecPolicy": "",
          "fileCount": 1,
          "length": 180838,
          "quota": -1,
          "spaceConsumed": 542514,
          "spaceQuota": -1,
          "typeQuota": {}
        }
      }
      
      File, After, No EC policy set
      GET /webhdfs/v1/tmp/file?op=GETCONTENTSUMMARY HTTP/1.1
      
      {
        "ContentSummary": {
          "directoryCount": 0,
          "ecPolicy": "Replicated",
          "fileCount": 1,
          "length": 29,
          "quota": -1,
          "spaceConsumed": 29,
          "spaceQuota": -1,
          "typeQuota": {}
        }
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                smeng Siyao Meng
                Reporter:
                smeng Siyao Meng
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: