@InterfaceAudience.Private public class MasterFileSystem extends Object
Constructor and Description |
---|
MasterFileSystem(Server master,
MasterServices services) |
Modifier and Type | Method and Description |
---|---|
HTableDescriptor |
addColumn(TableName tableName,
HColumnDescriptor hcd)
Add column to a table
|
boolean |
checkFileSystem()
Checks to see if the file system is still accessible.
|
HTableDescriptor |
deleteColumn(TableName tableName,
byte[] familyName)
Delete column of a table
|
void |
deleteFamilyFromFS(HRegionInfo region,
byte[] familyName) |
void |
deleteRegion(HRegionInfo region) |
void |
deleteTable(TableName tableName) |
ClusterId |
getClusterId() |
FileSystem |
getFileSystem() |
ZooKeeperProtos.SplitLogTask.RecoveryMode |
getLogRecoveryMode() |
Path |
getOldLogDir()
Get the directory where old logs go
|
Path |
getRootDir() |
Path |
getTempDir() |
HTableDescriptor |
modifyColumn(TableName tableName,
HColumnDescriptor hcd)
Modify Column of a table
|
Path |
moveTableToTemp(TableName tableName)
Move the specified table to the hbase temp directory
|
void |
prepareLogReplay(ServerName serverName,
Set<HRegionInfo> regions)
Mark regions in recovering state when distributedLogReplay are set true
|
static void |
setInfoFamilyCachingForMeta(HTableDescriptor metaDescriptor,
boolean b)
Enable in memory caching for hbase:meta
|
void |
setLogRecoveryMode()
The function is used in SSH to set recovery mode based on configuration after all outstanding
log split tasks drained.
|
void |
splitLog(ServerName serverName) |
void |
splitLog(Set<ServerName> serverNames) |
void |
splitLog(Set<ServerName> serverNames,
PathFilter filter)
This method is the base split method that splits WAL files matching a filter.
|
void |
splitMetaLog(ServerName serverName)
Specialized method to handle the splitting for meta WAL
|
void |
splitMetaLog(Set<ServerName> serverNames)
Specialized method to handle the splitting for meta WAL
|
void |
stop() |
void |
updateRegionInfo(HRegionInfo region) |
public MasterFileSystem(Server master, MasterServices services) throws IOException
IOException
public FileSystem getFileSystem()
public Path getOldLogDir()
public boolean checkFileSystem()
public Path getRootDir()
public Path getTempDir()
public ClusterId getClusterId()
public void splitLog(ServerName serverName) throws IOException
IOException
public void splitMetaLog(ServerName serverName) throws IOException
serverName
- IOException
public void splitMetaLog(Set<ServerName> serverNames) throws IOException
serverNames
- IOException
public void prepareLogReplay(ServerName serverName, Set<HRegionInfo> regions) throws IOException
serverName
- Failed region server whose wals to be replayedregions
- Set of regions to be recoveredIOException
public void splitLog(Set<ServerName> serverNames) throws IOException
IOException
public void splitLog(Set<ServerName> serverNames, PathFilter filter) throws IOException
serverNames
- logs belonging to these servers will be split; this will rename the log
directory out from under a soft-failed serverfilter
- IOException
public static void setInfoFamilyCachingForMeta(HTableDescriptor metaDescriptor, boolean b)
public void deleteRegion(HRegionInfo region) throws IOException
IOException
public void deleteTable(TableName tableName) throws IOException
IOException
public Path moveTableToTemp(TableName 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 HTableDescriptor deleteColumn(TableName tableName, byte[] familyName) throws IOException
tableName
- familyName
- IOException
public HTableDescriptor modifyColumn(TableName tableName, HColumnDescriptor hcd) throws IOException
tableName
- hcd
- HColumnDesciptorIOException
public HTableDescriptor addColumn(TableName tableName, HColumnDescriptor hcd) throws IOException
tableName
- hcd
- IOException
public void setLogRecoveryMode() throws IOException
IOException
public ZooKeeperProtos.SplitLogTask.RecoveryMode getLogRecoveryMode()