org.apache.hadoop.hdfs.server.protocol
Class BlocksWithLocations.BlockWithLocations

java.lang.Object
  extended by org.apache.hadoop.hdfs.server.protocol.BlocksWithLocations.BlockWithLocations
All Implemented Interfaces:
org.apache.hadoop.io.Writable
Enclosing class:
BlocksWithLocations

@InterfaceAudience.Private
@InterfaceStability.Evolving
public static class BlocksWithLocations.BlockWithLocations
extends Object
implements org.apache.hadoop.io.Writable

A class to keep track of a block and its locations


Constructor Summary
BlocksWithLocations.BlockWithLocations()
          default constructor
BlocksWithLocations.BlockWithLocations(Block b, String[] datanodes)
          constructor
 
Method Summary
 Block getBlock()
          get the block
 String[] getDatanodes()
          get the block's locations
 void readFields(DataInput in)
          deserialization method
 void write(DataOutput out)
          serialization method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlocksWithLocations.BlockWithLocations

public BlocksWithLocations.BlockWithLocations()
default constructor


BlocksWithLocations.BlockWithLocations

public BlocksWithLocations.BlockWithLocations(Block b,
                                              String[] datanodes)
constructor

Method Detail

getBlock

public Block getBlock()
get the block


getDatanodes

public String[] getDatanodes()
get the block's locations


readFields

public void readFields(DataInput in)
                throws IOException
deserialization method

Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
serialization method

Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2009 The Apache Software Foundation