org.apache.hadoop.hdfs.server.datanode
Interface Replica

All Known Implementing Classes:
ReplicaInfo

@InterfaceAudience.Private
public interface Replica

This represents block replicas which stored in DataNode.


Method Summary
 long getBlockId()
          get block ID
 long getBytesOnDisk()
          Get the number of bytes that have written to disk
 long getGenerationStamp()
          get generation stamp
 long getNumBytes()
          Get the number of bytes received
 HdfsConstants.ReplicaState getState()
          Get the replica state
 long getVisibleLength()
          Get the number of bytes that are visible to readers
 

Method Detail

getBlockId

long getBlockId()
get block ID


getGenerationStamp

long getGenerationStamp()
get generation stamp


getState

HdfsConstants.ReplicaState getState()
Get the replica state

Returns:
the replica state

getNumBytes

long getNumBytes()
Get the number of bytes received

Returns:
the number of bytes that have been received

getBytesOnDisk

long getBytesOnDisk()
Get the number of bytes that have written to disk

Returns:
the number of bytes that have written to disk

getVisibleLength

long getVisibleLength()
Get the number of bytes that are visible to readers

Returns:
the number of bytes that are visible to readers


Copyright © 2009 The Apache Software Foundation