@InterfaceAudience.Private public final 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.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription |
desc |
private TableDescriptor |
htd |
private static org.slf4j.Logger |
LOG |
private int |
manifestSizeLimit |
private ForeignExceptionSnare |
monitor |
private List<org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> |
regionManifests |
private org.apache.hadoop.fs.FileSystem |
rootFs |
static String |
SNAPSHOT_MANIFEST_SIZE_LIMIT_CONF_KEY |
private MonitoredTask |
statusTask |
private org.apache.hadoop.fs.Path |
workingDir |
private org.apache.hadoop.fs.FileSystem |
workingDirFs |
Modifier | Constructor and Description |
---|---|
private |
SnapshotManifest(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem rootFs,
org.apache.hadoop.fs.Path workingDir,
org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc,
ForeignExceptionSnare monitor,
MonitoredTask statusTask) |
Modifier and Type | Method and Description |
---|---|
void |
addMobRegion(RegionInfo regionInfo) |
protected void |
addMobRegion(RegionInfo regionInfo,
SnapshotManifest.RegionVisitor visitor) |
private void |
addReferenceFiles(SnapshotManifest.RegionVisitor visitor,
Object regionData,
Object familyData,
Collection<StoreFileInfo> storeFiles,
boolean isMob) |
void |
addRegion(HRegion region)
Creates a 'manifest' for the specified region, by reading directly from the HRegion object.
|
protected void |
addRegion(HRegion region,
SnapshotManifest.RegionVisitor visitor) |
void |
addRegion(org.apache.hadoop.fs.Path tableDir,
RegionInfo regionInfo)
Creates a 'manifest' for the specified region, by reading directly from the disk.
|
protected void |
addRegion(org.apache.hadoop.fs.Path tableDir,
RegionInfo regionInfo,
SnapshotManifest.RegionVisitor visitor) |
void |
addTableDescriptor(TableDescriptor 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.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc,
ForeignExceptionSnare monitor)
Return a SnapshotManifest instance, used for writing a snapshot.
|
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.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc,
ForeignExceptionSnare monitor,
MonitoredTask statusTask) |
static ThreadPoolExecutor |
createExecutor(org.apache.hadoop.conf.Configuration conf,
String name) |
private ThreadPoolExecutor |
createExecutor(String name) |
private SnapshotManifest.RegionVisitor |
createRegionVisitor(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc) |
List<org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> |
getRegionManifests()
Get all the Region Manifest from the snapshot
|
Map<String,org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> |
getRegionManifestsMap()
Get all the Region Manifest from the snapshot.
|
(package private) static String |
getRegionNameFromManifest(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest manifest)
Extract the region encoded name from the region manifest
|
org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.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.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc) |
private List<StoreFileInfo> |
getStoreFiles(org.apache.hadoop.fs.Path storeDir) |
TableDescriptor |
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.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc)
Return a SnapshotManifest instance with the information already loaded in-memory.
|
private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDataManifest |
readDataManifest() |
private void |
setStatusMsg(String msg) |
private void |
writeDataManifest(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDataManifest manifest) |
private static final org.slf4j.Logger LOG
public static final String SNAPSHOT_MANIFEST_SIZE_LIMIT_CONF_KEY
public static final String DATA_MANIFEST_NAME
private List<org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> regionManifests
private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc
private TableDescriptor 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 rootFs
private final org.apache.hadoop.fs.FileSystem workingDirFs
private int manifestSizeLimit
private final MonitoredTask statusTask
private SnapshotManifest(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem rootFs, org.apache.hadoop.fs.Path workingDir, org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc, ForeignExceptionSnare monitor, MonitoredTask statusTask) throws IOException
conf
- configuration file for HBase setuprootFs
- root filesystem containing HFilesworkingDir
- file path of where the manifest should be locateddesc
- description of snapshot being takenmonitor
- monitor of foreign exceptionsIOException
- if the working directory file system cannot be determined from the config
filepublic 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.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc, ForeignExceptionSnare monitor) throws IOException
IOException
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.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc, ForeignExceptionSnare monitor, MonitoredTask statusTask) throws IOException
IOException
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.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc) throws IOException
IOException
public void addTableDescriptor(TableDescriptor htd) throws IOException
IOException
private SnapshotManifest.RegionVisitor createRegionVisitor(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc) throws IOException
IOException
public void addMobRegion(RegionInfo regionInfo) throws IOException
IOException
protected void addMobRegion(RegionInfo regionInfo, SnapshotManifest.RegionVisitor visitor) throws IOException
IOException
public void addRegion(HRegion region) throws IOException
IOException
protected void addRegion(HRegion region, SnapshotManifest.RegionVisitor visitor) throws IOException
IOException
public void addRegion(org.apache.hadoop.fs.Path tableDir, RegionInfo regionInfo) throws IOException
IOException
protected void addRegion(org.apache.hadoop.fs.Path tableDir, RegionInfo regionInfo, SnapshotManifest.RegionVisitor visitor) throws IOException
IOException
private List<StoreFileInfo> getStoreFiles(org.apache.hadoop.fs.Path storeDir) throws IOException
IOException
private void addReferenceFiles(SnapshotManifest.RegionVisitor visitor, Object regionData, Object familyData, Collection<StoreFileInfo> storeFiles, boolean isMob) throws IOException
IOException
private void load() throws IOException
IOException
public org.apache.hadoop.fs.Path getSnapshotDir()
public org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription getSnapshotDescription()
public TableDescriptor getTableDescriptor()
public List<org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> getRegionManifests()
private void setStatusMsg(String msg)
public Map<String,org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest> getRegionManifestsMap()
public void consolidate() throws IOException
IOException
private void convertToV2SingleManifest() throws IOException
IOException
private void writeDataManifest(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDataManifest manifest) throws IOException
IOException
private org.apache.hadoop.hbase.shaded.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.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest manifest)
private static int getSnapshotFormat(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription desc)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.