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()
MapStatus
public long getSizeForBlock(int reduceId)
MapStatus
If 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 MapStatus
public void writeExternal(java.io.ObjectOutput out)
writeExternal
in interface java.io.Externalizable
public void readExternal(java.io.ObjectInput in)
readExternal
in interface java.io.Externalizable