org.apache.hadoop.hdfs.server.datanode.fsdataset
Interface FsVolumeSpi


public interface FsVolumeSpi

This is an interface for the underlying volume.


Method Summary
 long getAvailable()
           
 String getBasePath()
           
 String[] getBlockPoolList()
           
 File getFinalizedDir(String bpid)
           
 String getPath(String bpid)
           
 String getStorageID()
           
 StorageType getStorageType()
           
 boolean isTransientStorage()
          Returns true if the volume is NOT backed by persistent storage.
 void releaseReservedSpace(long bytesToRelease)
          Release disk space previously reserved for RBW block.
 void reserveSpaceForRbw(long bytesToReserve)
          Reserve disk space for an RBW block so a writer does not run out of space before the block is full.
 

Method Detail

getStorageID

String getStorageID()
Returns:
the StorageUuid of the volume

getBlockPoolList

String[] getBlockPoolList()
Returns:
a list of block pools.

getAvailable

long getAvailable()
                  throws IOException
Returns:
the available storage space in bytes.
Throws:
IOException

getBasePath

String getBasePath()
Returns:
the base path to the volume

getPath

String getPath(String bpid)
               throws IOException
Returns:
the path to the volume
Throws:
IOException

getFinalizedDir

File getFinalizedDir(String bpid)
                     throws IOException
Returns:
the directory for the finalized blocks in the block pool.
Throws:
IOException

getStorageType

StorageType getStorageType()

reserveSpaceForRbw

void reserveSpaceForRbw(long bytesToReserve)
Reserve disk space for an RBW block so a writer does not run out of space before the block is full.


releaseReservedSpace

void releaseReservedSpace(long bytesToRelease)
Release disk space previously reserved for RBW block.


isTransientStorage

boolean isTransientStorage()
Returns true if the volume is NOT backed by persistent storage.



Copyright © 2014 Apache Software Foundation. All Rights Reserved.