org.apache.hadoop.hbase.master
Class MasterFileSystem

java.lang.Object
  extended by org.apache.hadoop.hbase.master.MasterFileSystem

public class MasterFileSystem
extends Object

This class abstracts a bunch of operations the HMaster needs to interact with the underlying file system, including splitting log files, checking file system status, etc.


Constructor Summary
MasterFileSystem(Server master, MasterMetrics metrics)
           
 
Method Summary
 boolean checkFileSystem()
          Checks to see if the file system is still accessible.
 void deleteFamily(HRegionInfo region, byte[] familyName)
           
 void deleteRegion(HRegionInfo region)
           
 void deleteTable(byte[] tableName)
           
 org.apache.hadoop.fs.FileSystem getFileSystem()
           
 org.apache.hadoop.fs.Path getOldLogDir()
          Get the directory where old logs go
 org.apache.hadoop.fs.Path getRootDir()
           
 void splitLog(String serverName)
           
 void updateRegionInfo(HRegionInfo region)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MasterFileSystem

public MasterFileSystem(Server master,
                        MasterMetrics metrics)
                 throws IOException
Throws:
IOException
Method Detail

getFileSystem

public org.apache.hadoop.fs.FileSystem getFileSystem()

getOldLogDir

public org.apache.hadoop.fs.Path getOldLogDir()
Get the directory where old logs go

Returns:
the dir

checkFileSystem

public boolean checkFileSystem()
Checks to see if the file system is still accessible. If not, sets closed

Returns:
false if file system is not available

getRootDir

public org.apache.hadoop.fs.Path getRootDir()
Returns:
HBase root dir.
Throws:
IOException

splitLog

public void splitLog(String serverName)

deleteRegion

public void deleteRegion(HRegionInfo region)
                  throws IOException
Throws:
IOException

deleteTable

public void deleteTable(byte[] tableName)
                 throws IOException
Throws:
IOException

updateRegionInfo

public void updateRegionInfo(HRegionInfo region)

deleteFamily

public void deleteFamily(HRegionInfo region,
                         byte[] familyName)
                  throws IOException
Throws:
IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.