public class CompressedMapStatus extends Object implements MapStatus, java.io.Externalizable
MapStatus implementation that tracks the size of each block. Size for each block is
represented using a single byte.
| Constructor and Description |
|---|
CompressedMapStatus(BlockManagerId loc,
byte[] compressedSizes) |
CompressedMapStatus(BlockManagerId loc,
long[] uncompressedSizes) |
| Modifier and Type | Method and Description |
|---|---|
long |
getSizeForBlock(int reduceId)
Estimated size for the reduce block, in bytes.
|
BlockManagerId |
location()
Location where this task was run.
|
void |
readExternal(java.io.ObjectInput in) |
void |
writeExternal(java.io.ObjectOutput out) |
public CompressedMapStatus(BlockManagerId loc, byte[] compressedSizes)
public CompressedMapStatus(BlockManagerId loc, long[] uncompressedSizes)
public BlockManagerId location()
MapStatuspublic long getSizeForBlock(int reduceId)
MapStatusIf a block is non-empty, then this method MUST return a non-zero size. This invariant is necessary for correctness, since block fetchers are allowed to skip zero-size blocks.
getSizeForBlock in interface MapStatuspublic void writeExternal(java.io.ObjectOutput out)
writeExternal in interface java.io.Externalizablepublic void readExternal(java.io.ObjectInput in)
readExternal in interface java.io.Externalizable