org.apache.hadoop.hdfs.server.protocol
Class DatanodeStorage
java.lang.Object
org.apache.hadoop.hdfs.server.protocol.DatanodeStorage
public class DatanodeStorage
- extends Object
Class captures information of a storage in Datanode.
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)
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.