@InterfaceAudience.Private public class MasterFileSystem extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
HBASE_DIR_PERMS
Parameter name for HBase instance root directory permission
|
static String |
HBASE_WAL_DIR_PERMS
Parameter name for HBase WAL directory permission
|
| Constructor and Description |
|---|
MasterFileSystem(Server master,
MasterServices services) |
| Modifier and Type | Method and Description |
|---|---|
void |
archiveMetaLog(ServerName serverName)
For meta region open and closed normally on a server, it may leave some meta
WAL in the server's wal dir.
|
boolean |
checkFileSystem()
Checks to see if the file system is still accessible.
|
void |
deleteFamilyFromFS(HRegionInfo region,
byte[] familyName) |
ClusterId |
getClusterId() |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
org.apache.hadoop.fs.FileSystem |
getFileSystem() |
org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.SplitLogTask.RecoveryMode |
getLogRecoveryMode() |
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() |
org.apache.hadoop.fs.FileSystem |
getWALFileSystem() |
org.apache.hadoop.fs.Path |
getWALRootDir() |
void |
logFileSystemState(org.apache.commons.logging.Log log) |
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,
org.apache.hadoop.fs.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() |
public static final String HBASE_DIR_PERMS
public static final String HBASE_WAL_DIR_PERMS
public MasterFileSystem(Server master, MasterServices services) throws IOException
IOExceptionpublic org.apache.hadoop.fs.FileSystem getFileSystem()
public org.apache.hadoop.fs.Path getOldLogDir()
public boolean checkFileSystem()
public org.apache.hadoop.fs.FileSystem getWALFileSystem()
public org.apache.hadoop.conf.Configuration getConfiguration()
public org.apache.hadoop.fs.Path getRootDir()
public org.apache.hadoop.fs.Path getWALRootDir()
public org.apache.hadoop.fs.Path getTempDir()
public ClusterId getClusterId()
public void splitLog(ServerName serverName) throws IOException
IOExceptionpublic void splitMetaLog(ServerName serverName) throws IOException
serverName - IOExceptionpublic void splitMetaLog(Set<ServerName> serverNames) throws IOException
serverNames - IOExceptionpublic void prepareLogReplay(ServerName serverName, Set<HRegionInfo> regions) throws IOException
serverName - Failed region server whose wals to be replayedregions - Set of regions to be recoveredIOExceptionpublic void splitLog(Set<ServerName> serverNames) throws IOException
IOExceptionpublic void splitLog(Set<ServerName> serverNames, org.apache.hadoop.fs.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 - IOExceptionpublic static void setInfoFamilyCachingForMeta(HTableDescriptor metaDescriptor, boolean b)
public void deleteFamilyFromFS(HRegionInfo region, byte[] familyName) throws IOException
IOExceptionpublic void stop()
public void setLogRecoveryMode()
throws IOException
IOExceptionpublic org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.SplitLogTask.RecoveryMode getLogRecoveryMode()
public void logFileSystemState(org.apache.commons.logging.Log log)
throws IOException
IOExceptionpublic void archiveMetaLog(ServerName serverName)
serverName - the server to archive meta logCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.