Package org.apache.hadoop.hdfs.protocol
Class BlockListAsLongs.BlockReportReplica
java.lang.Object
org.apache.hadoop.hdfs.protocol.Block
org.apache.hadoop.hdfs.protocol.BlockListAsLongs.BlockReportReplica
- All Implemented Interfaces:
Comparable<org.apache.hadoop.hdfs.protocol.Block>,Replica,org.apache.hadoop.io.Writable
- Enclosing class:
- BlockListAsLongs
@Private
public static class BlockListAsLongs.BlockReportReplica
extends org.apache.hadoop.hdfs.protocol.Block
implements Replica
-
Field Summary
Fields inherited from class org.apache.hadoop.hdfs.protocol.Block
BLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern, metaOrBlockFilePattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongGet the number of bytes that have written to diskgetState()Get the replica stateReturn the storageUuid of the volume that stores this replica.longGet the number of bytes that are visible to readersGet the volume of replica.inthashCode()booleanReturn true if the target volume is backed by RAM.voidMethods inherited from class org.apache.hadoop.hdfs.protocol.Block
appendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, metaToBlockFile, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, toString, toString, write, writeIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.hdfs.server.datanode.Replica
getBlockId, getGenerationStamp, getNumBytes
-
Constructor Details
-
BlockReportReplica
public BlockReportReplica(org.apache.hadoop.hdfs.protocol.Block block)
-
-
Method Details
-
setState
-
getState
Description copied from interface:ReplicaGet the replica state -
getBytesOnDisk
public long getBytesOnDisk()Description copied from interface:ReplicaGet the number of bytes that have written to disk- Specified by:
getBytesOnDiskin interfaceReplica- Returns:
- the number of bytes that have written to disk
-
getVisibleLength
public long getVisibleLength()Description copied from interface:ReplicaGet the number of bytes that are visible to readers- Specified by:
getVisibleLengthin interfaceReplica- Returns:
- the number of bytes that are visible to readers
-
getStorageUuid
Description copied from interface:ReplicaReturn the storageUuid of the volume that stores this replica.- Specified by:
getStorageUuidin interfaceReplica
-
isOnTransientStorage
public boolean isOnTransientStorage()Description copied from interface:ReplicaReturn true if the target volume is backed by RAM.- Specified by:
isOnTransientStoragein interfaceReplica
-
getVolume
Description copied from interface:ReplicaGet the volume of replica. -
equals
- Overrides:
equalsin classorg.apache.hadoop.hdfs.protocol.Block
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.apache.hadoop.hdfs.protocol.Block
-