public class BlockDistribution
extends java.lang.Object
BasicTable.Reader.getBlockDistribution(BasicTable.Reader.RangeSplit)
,
KeyDistribution#getBlockDistribution(BytesWritable)
Constructor and Description |
---|
BlockDistribution() |
Modifier and Type | Method and Description |
---|---|
void |
add(BlockDistribution other)
Add another block distribution to this one.
|
java.lang.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.
|
public void add(BlockDistribution other)
other
- The other block distribution.public static BlockDistribution sum(BlockDistribution a, BlockDistribution b)
a
- first block distributionb
- second block distributionpublic long getLength()
public java.lang.String[] getHosts(int n)
n
- targeted number of hosts.Copyright © 2007-2012 The Apache Software Foundation