|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.zebra.io.BlockDistribution
public class BlockDistribution
Class used to convey the information of how on-disk data that fall in a specific split are distributed across hosts. This class is used by the MapReduce layer to calculate intelligent splits.
BasicTable.Reader.getBlockDistribution(BasicTable.Reader.RangeSplit)
,
KeyDistribution#getBlockDistribution(BytesWritable)
Constructor Summary | |
---|---|
BlockDistribution()
|
Method Summary | |
---|---|
void |
add(BlockDistribution other)
Add another block distribution to this one. |
String[] |
getHosts(int n)
Get up to n hosts that own the most bytes. |
long |
getLength()
Get the total number of bytes of all the blocks. |
static BlockDistribution |
sum(BlockDistribution a,
BlockDistribution b)
Sum up two block distributions together. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockDistribution()
Method Detail |
---|
public void add(BlockDistribution other)
other
- The other block distribution.public static BlockDistribution sum(BlockDistribution a, BlockDistribution b)
a
- first block distributionb
- second block distribution
public long getLength()
public String[] getHosts(int n)
n
- targeted number of hosts.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |