@InterfaceAudience.Private public class MasterFileSystem extends Object
Modifier and Type | Field and Description |
---|---|
private ClusterId |
clusterId |
private org.apache.hadoop.conf.Configuration |
conf |
private org.apache.hadoop.fs.FileSystem |
fs |
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
|
private org.apache.hadoop.fs.permission.FsPermission |
HiddenDirPerms |
private boolean |
isSecurityEnabled |
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.fs.Path |
rootdir |
private org.apache.hadoop.fs.permission.FsPermission |
secureRootFilePerms |
private org.apache.hadoop.fs.permission.FsPermission |
secureRootSubDirPerms |
private org.apache.hadoop.fs.Path |
tempdir |
private org.apache.hadoop.fs.FileSystem |
walFs |
private org.apache.hadoop.fs.Path |
walRootDir |
Constructor and Description |
---|
MasterFileSystem(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
private void |
checkRootDir(org.apache.hadoop.fs.Path rd,
org.apache.hadoop.conf.Configuration c,
org.apache.hadoop.fs.FileSystem fs)
Get the rootdir.
|
private void |
checkStagingDir()
Check permissions for bulk load staging directory.
|
private void |
checkSubDir(org.apache.hadoop.fs.Path p,
String dirPermsConfName)
Make sure the directories under rootDir have good permissions.
|
(package private) void |
checkTempDir(org.apache.hadoop.fs.Path tmpdir,
org.apache.hadoop.conf.Configuration c,
org.apache.hadoop.fs.FileSystem fs)
Make sure the hbase temp directory exists and is empty.
|
private void |
createInitialFileSystemLayout()
Create initial layout in filesystem.
|
void |
deleteFamilyFromFS(org.apache.hadoop.fs.Path rootDir,
RegionInfo region,
byte[] familyName) |
void |
deleteFamilyFromFS(RegionInfo region,
byte[] familyName) |
ClusterId |
getClusterId()
Returns The unique identifier generated for this cluster
|
org.apache.hadoop.conf.Configuration |
getConfiguration() |
org.apache.hadoop.fs.FileSystem |
getFileSystem() |
org.apache.hadoop.fs.Path |
getRegionDir(RegionInfo region)
Returns the directory for a give
region . |
org.apache.hadoop.fs.Path |
getRootDir()
Returns HBase root dir.
|
org.apache.hadoop.fs.Path |
getTempDir()
Returns HBase temp dir.
|
org.apache.hadoop.fs.FileSystem |
getWALFileSystem() |
org.apache.hadoop.fs.Path |
getWALRootDir()
Returns HBase root log dir.
|
void |
logFileSystemState(org.slf4j.Logger log) |
void |
stop() |
private static final org.slf4j.Logger LOG
public static final String HBASE_DIR_PERMS
public static final String HBASE_WAL_DIR_PERMS
private final org.apache.hadoop.conf.Configuration conf
private final org.apache.hadoop.fs.FileSystem fs
private final org.apache.hadoop.fs.FileSystem walFs
private final org.apache.hadoop.fs.Path rootdir
private final org.apache.hadoop.fs.Path tempdir
private final org.apache.hadoop.fs.Path walRootDir
private final org.apache.hadoop.fs.permission.FsPermission secureRootSubDirPerms
private final org.apache.hadoop.fs.permission.FsPermission secureRootFilePerms
private final org.apache.hadoop.fs.permission.FsPermission HiddenDirPerms
private boolean isSecurityEnabled
public MasterFileSystem(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
private void createInitialFileSystemLayout() throws IOException
IOException
public org.apache.hadoop.fs.FileSystem getFileSystem()
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 getRegionDir(RegionInfo region)
region
.public org.apache.hadoop.fs.Path getTempDir()
public ClusterId getClusterId()
private void checkRootDir(org.apache.hadoop.fs.Path rd, org.apache.hadoop.conf.Configuration c, org.apache.hadoop.fs.FileSystem fs) throws IOException
IOException
void checkTempDir(org.apache.hadoop.fs.Path tmpdir, org.apache.hadoop.conf.Configuration c, org.apache.hadoop.fs.FileSystem fs) throws IOException
IOException
private void checkSubDir(org.apache.hadoop.fs.Path p, String dirPermsConfName) throws IOException
IOException
private void checkStagingDir() throws IOException
IOException
public void deleteFamilyFromFS(RegionInfo region, byte[] familyName) throws IOException
IOException
public void deleteFamilyFromFS(org.apache.hadoop.fs.Path rootDir, RegionInfo region, byte[] familyName) throws IOException
IOException
public void stop()
public void logFileSystemState(org.slf4j.Logger log) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.