org.apache.hadoop.hdfs.server.balancer
Class MovedBlocks.Locations<L>

java.lang.Object
  extended by 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.
 
Constructor Summary
MovedBlocks.Locations(org.apache.hadoop.hdfs.protocol.Block block)
           
 
Method Summary
 void addLocation(L loc)
          add a location
 void clearLocations()
          clean block locations
 org.apache.hadoop.hdfs.protocol.Block getBlock()
           
 List<L> getLocations()
           
 long getNumBytes()
           
 boolean isLocatedOn(L loc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locations

protected final List<L> locations
The locations of the replicas of the block.

Constructor Detail

MovedBlocks.Locations

public MovedBlocks.Locations(org.apache.hadoop.hdfs.protocol.Block block)
Method Detail

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.