@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() |
org.apache.hadoop.fs.FileSystem |
getFileSystem() |
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() |
HTableDescriptor |
modifyColumn(TableName tableName,
HColumnDescriptor hcd)
Modify Column of a table
|
org.apache.hadoop.fs.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,
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() |
void |
updateRegionInfo(HRegionInfo region) |
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.Path getRootDir()
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 deleteRegion(HRegionInfo region) throws IOException
IOExceptionpublic void deleteTable(TableName tableName) throws IOException
IOExceptionpublic org.apache.hadoop.fs.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
IOExceptionpublic void stop()
public HTableDescriptor deleteColumn(TableName tableName, byte[] familyName) throws IOException
tableName - familyName - IOExceptionpublic HTableDescriptor modifyColumn(TableName tableName, HColumnDescriptor hcd) throws IOException
tableName - hcd - HColumnDesciptorIOExceptionpublic HTableDescriptor addColumn(TableName tableName, HColumnDescriptor hcd) throws IOException
tableName - hcd - IOExceptionpublic void setLogRecoveryMode()
throws IOException
IOExceptionpublic ZooKeeperProtos.SplitLogTask.RecoveryMode getLogRecoveryMode()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.