org.apache.hadoop.hdfs.server.balancer
Class MovedBlocks.Locations<L>
java.lang.Object
org.apache.hadoop.hdfs.server.balancer.MovedBlocks.Locations<L>
- Direct Known Subclasses:
- Dispatcher.DBlock
- Enclosing class:
- MovedBlocks<L>
public static class MovedBlocks.Locations<L>
- extends Object
A class for keeping track of a block and its locations
|
Field Summary |
protected List<L> |
locations
The locations of the replicas of the block. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
locations
protected final List<L> locations
- The locations of the replicas of the block.
MovedBlocks.Locations
public MovedBlocks.Locations(org.apache.hadoop.hdfs.protocol.Block block)
clearLocations
public void clearLocations()
- clean block locations
addLocation
public void addLocation(L loc)
- add a location
isLocatedOn
public boolean isLocatedOn(L loc)
- Returns:
- if the block is located on the given location.
getLocations
public List<L> getLocations()
- Returns:
- its locations
getBlock
public org.apache.hadoop.hdfs.protocol.Block getBlock()
getNumBytes
public long getNumBytes()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.