@InterfaceAudience.Private public final class MasterRegion extends Object
 hbase
   |
   --<region dir>
       |
       --data
       |  |
       |  --/<ns>/<table>/<encoded-region-name> <---- The region data
       |      |
       |      --replay <---- The edits to replay
       |
       --WALs
          |
          --<master-server-name> <---- The WAL dir for active master
          |
          --<master-server-name>-dead <---- The WAL dir for dead master
 
 Notice that, you can use different root file system and WAL file system. Then the above directory
 will be on two file systems, the root file system will have the data directory while the WAL
 filesystem will have the WALs directory. The archived HFile will be moved to the global HFile
 archived directory with the MasterRegionParams.archivedWalSuffix() suffix. The archived
 WAL will be moved to the global WAL archived directory with the
 MasterRegionParams.archivedHFileSuffix() suffix.| Modifier and Type | Field and Description | 
|---|---|
| private static String | DEAD_WAL_DIR_SUFFIX | 
| (package private) MasterRegionFlusherAndCompactor | flusherAndCompactor | 
| private static org.slf4j.Logger | LOG | 
| (package private) HRegion | region | 
| private static int | REGION_ID | 
| private static String | REPLAY_EDITS_DIR | 
| private WALFactory | walFactory | 
| private MasterRegionWALRoller | walRoller | 
| Modifier | Constructor and Description | 
|---|---|
| private  | MasterRegion(HRegion region,
            WALFactory walFactory,
            MasterRegionFlusherAndCompactor flusherAndCompactor,
            MasterRegionWALRoller walRoller) | 
| Modifier and Type | Method and Description | 
|---|---|
| private static HRegion | bootstrap(org.apache.hadoop.conf.Configuration conf,
         TableDescriptor td,
         org.apache.hadoop.fs.FileSystem fs,
         org.apache.hadoop.fs.Path rootDir,
         org.apache.hadoop.fs.FileSystem walFs,
         org.apache.hadoop.fs.Path walRootDir,
         WALFactory walFactory,
         MasterRegionWALRoller walRoller,
         String serverName) | 
| void | close(boolean abort) | 
| private void | closeRegion(boolean abort) | 
| static MasterRegion | create(MasterRegionParams params) | 
| private static WAL | createWAL(WALFactory walFactory,
         MasterRegionWALRoller walRoller,
         String serverName,
         org.apache.hadoop.fs.FileSystem walFs,
         org.apache.hadoop.fs.Path walRootDir,
         RegionInfo regionInfo) | 
| HRegion.FlushResult | flush(boolean force) | 
| Result | get(Get get) | 
| RegionScanner | getScanner(Scan scan) | 
| private static HRegion | open(org.apache.hadoop.conf.Configuration conf,
    TableDescriptor td,
    org.apache.hadoop.fs.FileSystem fs,
    org.apache.hadoop.fs.Path rootDir,
    org.apache.hadoop.fs.FileSystem walFs,
    org.apache.hadoop.fs.Path walRootDir,
    WALFactory walFactory,
    MasterRegionWALRoller walRoller,
    String serverName) | 
| void | requestRollAll() | 
| private void | shutdownWAL() | 
| void | update(UpdateMasterRegion action) | 
| void | waitUntilWalRollFinished() | 
private static final org.slf4j.Logger LOG
private static final String REPLAY_EDITS_DIR
private static final String DEAD_WAL_DIR_SUFFIX
private static final int REGION_ID
private final WALFactory walFactory
final MasterRegionFlusherAndCompactor flusherAndCompactor
private MasterRegionWALRoller walRoller
private MasterRegion(HRegion region, WALFactory walFactory, MasterRegionFlusherAndCompactor flusherAndCompactor, MasterRegionWALRoller walRoller)
private void closeRegion(boolean abort)
private void shutdownWAL()
public void update(UpdateMasterRegion action) throws IOException
IOExceptionpublic Result get(Get get) throws IOException
IOExceptionpublic RegionScanner getScanner(Scan scan) throws IOException
IOExceptionpublic HRegion.FlushResult flush(boolean force) throws IOException
IOExceptionpublic void requestRollAll()
public void waitUntilWalRollFinished() throws InterruptedException
InterruptedExceptionpublic void close(boolean abort)
private static WAL createWAL(WALFactory walFactory, MasterRegionWALRoller walRoller, String serverName, org.apache.hadoop.fs.FileSystem walFs, org.apache.hadoop.fs.Path walRootDir, RegionInfo regionInfo) throws IOException
IOExceptionprivate static HRegion bootstrap(org.apache.hadoop.conf.Configuration conf, TableDescriptor td, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, org.apache.hadoop.fs.FileSystem walFs, org.apache.hadoop.fs.Path walRootDir, WALFactory walFactory, MasterRegionWALRoller walRoller, String serverName) throws IOException
IOExceptionprivate static HRegion open(org.apache.hadoop.conf.Configuration conf, TableDescriptor td, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, org.apache.hadoop.fs.FileSystem walFs, org.apache.hadoop.fs.Path walRootDir, WALFactory walFactory, MasterRegionWALRoller walRoller, String serverName) throws IOException
IOExceptionpublic static MasterRegion create(MasterRegionParams params) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.