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() |
long |
getArchivedStoreFileSize() |
int |
getCorruptedStoreFilesCount() |
int |
getLogsCount() |
long |
getLogsSize() |
int |
getMissingLogsCount() |
int |
getMissingStoreFilesCount() |
float |
getMobStoreFilePercentage() |
int |
getMobStoreFilesCount() |
long |
getMobStoreFilesSize() |
long |
getNonSharedArchivedStoreFilesSize() |
float |
getSharedStoreFilePercentage() |
long |
getSharedStoreFilesSize() |
SnapshotDescription |
getSnapshotDescription() |
int |
getStoreFilesCount() |
long |
getStoreFilesSize() |
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() |
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–2019 The Apache Software Foundation. All rights reserved.