org.apache.hadoop.hdfs.server.protocol
Class DatanodeStorage

java.lang.Object
  extended by org.apache.hadoop.hdfs.server.protocol.DatanodeStorage

public class DatanodeStorage
extends Object

Class captures information of a storage in Datanode.


Nested Class Summary
static class DatanodeStorage.State
          The state of the storage.
 
Constructor Summary
DatanodeStorage(String storageID)
          Create a storage with DatanodeStorage.State.NORMAL and StorageType.DEFAULT.
DatanodeStorage(String sid, DatanodeStorage.State s, StorageType sm)
           
 
Method Summary
 boolean equals(Object other)
           
static String generateUuid()
          Generate new storage ID.
 DatanodeStorage.State getState()
           
 String getStorageID()
           
 StorageType getStorageType()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatanodeStorage

public DatanodeStorage(String storageID)
Create a storage with DatanodeStorage.State.NORMAL and StorageType.DEFAULT.

Parameters:
storageID -

DatanodeStorage

public DatanodeStorage(String sid,
                       DatanodeStorage.State s,
                       StorageType sm)
Method Detail

getStorageID

public String getStorageID()

getState

public DatanodeStorage.State getState()

getStorageType

public StorageType getStorageType()

generateUuid

public static String generateUuid()
Generate new storage ID. The format of this string can be changed in the future without requiring that old storage IDs be updated.

Returns:
unique storage ID

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2014 Apache Software Foundation. All Rights Reserved.