@InterfaceAudience.Private public class SnapshotManifest extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
SnapshotManifest.RegionVisitor<TRegion,TFamily> |
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
static String |
DATA_MANIFEST_NAME |
private org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription |
desc |
private org.apache.hadoop.fs.FileSystem |
fs |
private HTableDescriptor |
htd |
private static org.apache.commons.logging.Log |
LOG |
private int |
manifestSizeLimit |
private ForeignExceptionSnare |
monitor |
private List<org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> |
regionManifests |
static String |
SNAPSHOT_MANIFEST_SIZE_LIMIT_CONF_KEY |
private org.apache.hadoop.fs.Path |
workingDir |
Modifier | Constructor and Description |
---|---|
private |
SnapshotManifest(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path workingDir,
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc,
ForeignExceptionSnare monitor) |
Modifier and Type | Method and Description |
---|---|
void |
addRegion(HRegion region)
Creates a 'manifest' for the specified region, by reading directly from the HRegion object.
|
void |
addRegion(org.apache.hadoop.fs.Path tableDir,
HRegionInfo regionInfo)
Creates a 'manifest' for the specified region, by reading directly from the disk.
|
void |
addTableDescriptor(HTableDescriptor htd)
Add the table descriptor to the snapshot manifest
|
void |
consolidate() |
private void |
convertToV2SingleManifest() |
static SnapshotManifest |
create(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path workingDir,
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc,
ForeignExceptionSnare monitor)
Return a SnapshotManifest instance, used for writing a snapshot.
|
static ThreadPoolExecutor |
createExecutor(org.apache.hadoop.conf.Configuration conf,
String name) |
private ThreadPoolExecutor |
createExecutor(String name) |
private SnapshotManifest.RegionVisitor |
createRegionVisitor(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc) |
List<org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> |
getRegionManifests()
Get all the Region Manifest from the snapshot
|
Map<String,org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> |
getRegionManifestsMap()
Get all the Region Manifest from the snapshot.
|
(package private) static String |
getRegionNameFromManifest(org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest manifest)
Extract the region encoded name from the region manifest
|
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription |
getSnapshotDescription()
Get the SnapshotDescription
|
org.apache.hadoop.fs.Path |
getSnapshotDir()
Get the current snapshot working dir
|
private static int |
getSnapshotFormat(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc) |
HTableDescriptor |
getTableDescriptor()
Get the table descriptor from the Snapshot
|
private void |
load()
Load the information in the SnapshotManifest.
|
static SnapshotManifest |
open(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path workingDir,
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc)
Return a SnapshotManifest instance with the information already loaded in-memory.
|
private org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotDataManifest |
readDataManifest() |
private void |
writeDataManifest(org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotDataManifest manifest) |
private static final org.apache.commons.logging.Log LOG
public static final String SNAPSHOT_MANIFEST_SIZE_LIMIT_CONF_KEY
public static final String DATA_MANIFEST_NAME
private List<org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> regionManifests
private org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc
private HTableDescriptor htd
private final ForeignExceptionSnare monitor
private final org.apache.hadoop.conf.Configuration conf
private final org.apache.hadoop.fs.Path workingDir
private final org.apache.hadoop.fs.FileSystem fs
private int manifestSizeLimit
private SnapshotManifest(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path workingDir, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc, ForeignExceptionSnare monitor)
public static SnapshotManifest create(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path workingDir, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc, ForeignExceptionSnare monitor)
public static SnapshotManifest open(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path workingDir, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc) throws IOException
IOException
public void addTableDescriptor(HTableDescriptor htd) throws IOException
IOException
private SnapshotManifest.RegionVisitor createRegionVisitor(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc) throws IOException
IOException
public void addRegion(HRegion region) throws IOException
IOException
public void addRegion(org.apache.hadoop.fs.Path tableDir, HRegionInfo regionInfo) throws IOException
IOException
private void load() throws IOException
IOException
public org.apache.hadoop.fs.Path getSnapshotDir()
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription getSnapshotDescription()
public HTableDescriptor getTableDescriptor()
public List<org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> getRegionManifests()
public Map<String,org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> getRegionManifestsMap()
public void consolidate() throws IOException
IOException
private void convertToV2SingleManifest() throws IOException
IOException
private void writeDataManifest(org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotDataManifest manifest) throws IOException
IOException
private org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotDataManifest readDataManifest() throws IOException
IOException
private ThreadPoolExecutor createExecutor(String name)
public static ThreadPoolExecutor createExecutor(org.apache.hadoop.conf.Configuration conf, String name)
static String getRegionNameFromManifest(org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest manifest)
private static int getSnapshotFormat(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription desc)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.