org.apache.hadoop.fs
Class HdfsVolumeId

java.lang.Object
  extended by org.apache.hadoop.fs.HdfsVolumeId
All Implemented Interfaces:
Comparable<VolumeId>, VolumeId

@InterfaceStability.Unstable
@InterfaceAudience.Public
public class HdfsVolumeId
extends Object
implements VolumeId

HDFS-specific volume identifier which implements VolumeId. Can be used to differentiate between the data directories on a single datanode. This identifier is only unique on a per-datanode basis. Note that invalid IDs are represented by VolumeId.INVALID_VOLUME_ID.


Field Summary
 
Fields inherited from interface org.apache.hadoop.fs.VolumeId
INVALID_VOLUME_ID
 
Constructor Summary
HdfsVolumeId(byte[] id)
           
 
Method Summary
 int compareTo(VolumeId arg0)
           
 boolean equals(Object obj)
           
 int hashCode()
           
 boolean isValid()
          Indicates if the disk identifier is valid.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HdfsVolumeId

public HdfsVolumeId(byte[] id)
Method Detail

isValid

public final boolean isValid()
Description copied from interface: VolumeId
Indicates if the disk identifier is valid. Invalid identifiers indicate that the block was not present, or the location could otherwise not be determined.

Specified by:
isValid in interface VolumeId
Returns:
true if the disk identifier is valid

compareTo

public int compareTo(VolumeId arg0)
Specified by:
compareTo in interface Comparable<VolumeId>
Specified by:
compareTo in interface VolumeId

hashCode

public int hashCode()
Specified by:
hashCode in interface VolumeId
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Specified by:
equals in interface VolumeId
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Apache Software Foundation. All Rights Reserved.