In webhdfs, what is the difference between length and spaceConsumed?

80 Views Asked by At

Using webhdfs we can get the content summary of a directory/file.

However, the following properties are unclear for me:

"length":
        {
          "description": "The number of bytes used by the content.",
          "type"       : "integer",
          "required"   : true
        }


"spaceConsumed":
        {
          "description": "The disk space consumed by the content.",
          "type"       : "integer",
          "required"   : true
        }

What exactly is the difference between those ? Is spaceConsumed the size taken on disk duplication included ? The internal method documentation does not provide additional detail.

1

There are 1 best solutions below

1
Itération 122442 On BEST ANSWER

According to a collegue, the answer is:

spaceConsumed = length * replicationFactor

However, I have no source to prove it.