|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.master.MasterFileSystem
@InterfaceAudience.Private public class MasterFileSystem
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,
MasterServices services,
MetricsMaster metricsMaster,
boolean masterRecovery)
|
Method Summary | |
---|---|
HTableDescriptor |
addColumn(byte[] tableName,
HColumnDescriptor hcd)
Add column to a table |
boolean |
checkFileSystem()
Checks to see if the file system is still accessible. |
void |
createTableDescriptor(HTableDescriptor htableDescriptor)
Create new HTableDescriptor in HDFS. |
HTableDescriptor |
deleteColumn(byte[] tableName,
byte[] familyName)
Delete column of a table |
void |
deleteFamilyFromFS(HRegionInfo region,
byte[] familyName)
|
void |
deleteRegion(HRegionInfo region)
|
void |
deleteTable(byte[] tableName)
|
ClusterId |
getClusterId()
|
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()
|
org.apache.hadoop.fs.Path |
getTempDir()
|
HTableDescriptor |
modifyColumn(byte[] tableName,
HColumnDescriptor hcd)
Modify Column of a table |
org.apache.hadoop.fs.Path |
moveTableToTemp(byte[] tableName)
Move the specified table to the hbase temp directory |
org.apache.hadoop.fs.Path |
moveToTemp(org.apache.hadoop.fs.Path path)
Move the specified file/directory to the hbase temp directory. |
static void |
setInfoFamilyCachingForMeta(boolean b)
Enable in memory caching for .META. |
void |
splitLog(List<ServerName> serverNames)
|
void |
splitLog(List<ServerName> serverNames,
org.apache.hadoop.fs.PathFilter filter)
This method is the base split method that splits HLog files matching a filter. |
void |
splitLog(ServerName serverName)
|
void |
splitMetaLog(ServerName serverName)
Specialized method to handle the splitting for meta HLog |
void |
stop()
|
void |
updateRegionInfo(HRegionInfo region)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MasterFileSystem(Server master, MasterServices services, MetricsMaster metricsMaster, boolean masterRecovery) throws IOException
IOException
Method Detail |
---|
public org.apache.hadoop.fs.FileSystem getFileSystem()
public org.apache.hadoop.fs.Path getOldLogDir()
public boolean checkFileSystem()
public org.apache.hadoop.fs.Path getRootDir()
public org.apache.hadoop.fs.Path getTempDir()
public ClusterId getClusterId()
public void splitLog(ServerName serverName) throws IOException
IOException
public void splitMetaLog(ServerName serverName) throws IOException
serverName
-
IOException
public void splitLog(List<ServerName> serverNames) throws IOException
IOException
public void splitLog(List<ServerName> serverNames, org.apache.hadoop.fs.PathFilter filter) throws IOException
serverNames
- filter
-
IOException
public static void setInfoFamilyCachingForMeta(boolean b)
public void deleteRegion(HRegionInfo region) throws IOException
IOException
public void deleteTable(byte[] tableName) throws IOException
IOException
public org.apache.hadoop.fs.Path moveToTemp(org.apache.hadoop.fs.Path path) throws IOException
path
- The path of the file/directory to move
IOException
- in case of file-system failurepublic org.apache.hadoop.fs.Path moveTableToTemp(byte[] tableName) throws IOException
tableName
- Table name to move
IOException
- in case of file-system failurepublic void updateRegionInfo(HRegionInfo region)
public void deleteFamilyFromFS(HRegionInfo region, byte[] familyName) throws IOException
IOException
public void stop()
public void createTableDescriptor(HTableDescriptor htableDescriptor) throws IOException
htableDescriptor
-
IOException
public HTableDescriptor deleteColumn(byte[] tableName, byte[] familyName) throws IOException
tableName
- familyName
-
IOException
public HTableDescriptor modifyColumn(byte[] tableName, HColumnDescriptor hcd) throws IOException
tableName
- hcd
- HColumnDesciptor
IOException
public HTableDescriptor addColumn(byte[] tableName, HColumnDescriptor hcd) throws IOException
tableName
- hcd
-
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |