public class MasterFileSystem extends Object
Constructor and Description |
---|
MasterFileSystem(Server master,
MasterServices services,
MasterMetrics metrics,
boolean masterRecovery) |
Modifier and Type | Method and Description |
---|---|
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) |
String |
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.
|
static void |
setInfoFamilyCachingForRoot(boolean b)
Enable in-memory caching for -ROOT-
|
void |
splitAllLogs(List<ServerName> serverNames) |
void |
splitAllLogs(ServerName serverName) |
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) |
public MasterFileSystem(Server master, MasterServices services, MasterMetrics metrics, boolean masterRecovery) throws IOException
IOException
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 String getClusterId()
public void splitLog(ServerName serverName) throws IOException
IOException
public void splitAllLogs(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 splitAllLogs(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 setInfoFamilyCachingForRoot(boolean b)
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 moveIOException
- in case of file-system failurepublic org.apache.hadoop.fs.Path moveTableToTemp(byte[] tableName) throws IOException
tableName
- Table name to moveIOException
- 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
- HColumnDesciptorIOException
public HTableDescriptor addColumn(byte[] tableName, HColumnDescriptor hcd) throws IOException
tableName
- hcd
- IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.