org.apache.hadoop.hdfs.server.blockmanagement
Class DatanodeStorageInfo

java.lang.Object
  extended by org.apache.hadoop.hdfs.server.blockmanagement.DatanodeStorageInfo

public class DatanodeStorageInfo
extends Object

A Datanode has one or more storages. A storage in the Datanode is represented by this class.


Field Summary
static DatanodeStorageInfo[] EMPTY_ARRAY
           
 
Method Summary
 boolean equals(Object obj)
           
 org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor getDatanodeDescriptor()
           
 int hashCode()
           
static void incrementBlocksScheduled(DatanodeStorageInfo... storages)
          Increment the number of blocks scheduled for each given storage
 void setUtilizationForTesting(long capacity, long dfsUsed, long remaining, long blockPoolUsed)
           
static org.apache.hadoop.hdfs.protocol.DatanodeInfo[] toDatanodeInfos(DatanodeStorageInfo[] storages)
           
static String[] toStorageIDs(DatanodeStorageInfo[] storages)
           
static StorageType[] toStorageTypes(DatanodeStorageInfo[] storages)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_ARRAY

public static final DatanodeStorageInfo[] EMPTY_ARRAY
Method Detail

toDatanodeInfos

public static org.apache.hadoop.hdfs.protocol.DatanodeInfo[] toDatanodeInfos(DatanodeStorageInfo[] storages)

toStorageIDs

public static String[] toStorageIDs(DatanodeStorageInfo[] storages)

toStorageTypes

public static StorageType[] toStorageTypes(DatanodeStorageInfo[] storages)

setUtilizationForTesting

public void setUtilizationForTesting(long capacity,
                                     long dfsUsed,
                                     long remaining,
                                     long blockPoolUsed)

getDatanodeDescriptor

public org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor getDatanodeDescriptor()

incrementBlocksScheduled

public static void incrementBlocksScheduled(DatanodeStorageInfo... storages)
Increment the number of blocks scheduled for each given storage


equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Apache Software Foundation. All Rights Reserved.