public static class SnapshotInfo.SnapshotStats extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SnapshotInfo.SnapshotStats.FileInfo
Information about the file referenced by the snapshot
|
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private org.apache.hadoop.fs.FileSystem |
fs |
private AtomicInteger |
hfilesArchiveCount |
private AtomicLong |
hfilesArchiveSize |
private AtomicInteger |
hfilesCorrupted |
private AtomicInteger |
hfilesCount |
private AtomicInteger |
hfilesMissing |
private AtomicInteger |
hfilesMobCount |
private AtomicLong |
hfilesMobSize |
private AtomicLong |
hfilesSize |
private AtomicInteger |
logsCount |
private AtomicLong |
logSize |
private AtomicInteger |
logsMissing |
private AtomicLong |
nonSharedHfilesArchiveSize |
private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription |
snapshot |
private TableName |
snapshotTable |
Constructor and Description |
---|
SnapshotStats(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
SnapshotDescription snapshot) |
SnapshotStats(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot) |
Modifier and Type | Method and Description |
---|---|
(package private) SnapshotInfo.SnapshotStats.FileInfo |
addLogFile(String server,
String logfile)
Add the specified log file to the stats
|
(package private) SnapshotInfo.SnapshotStats.FileInfo |
addStoreFile(RegionInfo region,
String family,
org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest.StoreFile storeFile,
Map<org.apache.hadoop.fs.Path,Integer> filesMap)
Add the specified store file to the stats
|
int |
getArchivedStoreFilesCount()
Returns the number of available store files in the archive
|
long |
getArchivedStoreFileSize()
Returns the total size of the store files in the archive
|
int |
getCorruptedStoreFilesCount()
Returns the number of corrupted store files
|
int |
getLogsCount()
Returns the number of available log files
|
long |
getLogsSize()
Returns the total log size
|
int |
getMissingLogsCount()
Returns the number of missing log files
|
int |
getMissingStoreFilesCount()
Returns the number of missing store files
|
float |
getMobStoreFilePercentage()
Returns the percentage of the mob store files
|
int |
getMobStoreFilesCount()
Returns the number of available store files in the mob dir
|
long |
getMobStoreFilesSize()
Returns the total size of the store files in the mob store
|
long |
getNonSharedArchivedStoreFilesSize() |
float |
getSharedStoreFilePercentage()
Returns the percentage of the shared store files
|
long |
getSharedStoreFilesSize()
Returns the total size of the store files shared
|
SnapshotDescription |
getSnapshotDescription()
Returns the snapshot descriptor
|
int |
getStoreFilesCount()
Returns the number of available store files
|
long |
getStoreFilesSize()
Returns the total size of the store files referenced by the snapshot
|
private boolean |
isArchivedFileStillReferenced(org.apache.hadoop.fs.Path filePath,
Map<org.apache.hadoop.fs.Path,Integer> snapshotFilesMap)
Check if for a give file in archive, if there are other snapshots/tables still reference it.
|
boolean |
isSnapshotCorrupted()
Returns true if the snapshot is corrupted
|
private AtomicInteger hfilesArchiveCount
private AtomicInteger hfilesCorrupted
private AtomicInteger hfilesMissing
private AtomicInteger hfilesCount
private AtomicInteger hfilesMobCount
private AtomicInteger logsMissing
private AtomicInteger logsCount
private AtomicLong hfilesArchiveSize
private AtomicLong hfilesSize
private AtomicLong hfilesMobSize
private AtomicLong nonSharedHfilesArchiveSize
private AtomicLong logSize
private final org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot
private final TableName snapshotTable
private final org.apache.hadoop.conf.Configuration conf
private final org.apache.hadoop.fs.FileSystem fs
SnapshotStats(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, SnapshotDescription snapshot)
SnapshotStats(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot)
public SnapshotDescription getSnapshotDescription()
public boolean isSnapshotCorrupted()
public int getStoreFilesCount()
public int getArchivedStoreFilesCount()
public int getMobStoreFilesCount()
public int getLogsCount()
public int getMissingStoreFilesCount()
public int getCorruptedStoreFilesCount()
public int getMissingLogsCount()
public long getStoreFilesSize()
public long getSharedStoreFilesSize()
public long getArchivedStoreFileSize()
public long getMobStoreFilesSize()
public long getNonSharedArchivedStoreFilesSize()
SnapshotInfo.getSnapshotStats(Configuration, SnapshotProtos.SnapshotDescription, Map)
is
called with a non-null Mappublic float getSharedStoreFilePercentage()
public float getMobStoreFilePercentage()
public long getLogsSize()
private boolean isArchivedFileStillReferenced(org.apache.hadoop.fs.Path filePath, Map<org.apache.hadoop.fs.Path,Integer> snapshotFilesMap)
filePath
- file path in archivesnapshotFilesMap
- a map for store files in snapshots about how many snapshots refer to
it.SnapshotInfo.SnapshotStats.FileInfo addStoreFile(RegionInfo region, String family, org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotRegionManifest.StoreFile storeFile, Map<org.apache.hadoop.fs.Path,Integer> filesMap) throws IOException
region
- region encoded Namefamily
- family namestoreFile
- store file namefilesMap
- store files map for all snapshots, it may be nullIOException
SnapshotInfo.SnapshotStats.FileInfo addLogFile(String server, String logfile) throws IOException
server
- server namelogfile
- log file nameIOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.