Package org.apache.hadoop.hbase.quotas
Interface FileArchiverNotifier
- All Known Implementing Classes:
FileArchiverNotifierImpl
Interface allowing various implementations of tracking files that have recently been archived to
allow for the Master to notice changes to snapshot sizes for space quotas. This object needs to
ensure that
addArchivedFiles(Set)
and computeAndStoreSnapshotSizes(Collection)
are mutually exclusive. If a "full" computation is in progress, new changes being archived should
be held.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addArchivedFiles
(Set<Map.Entry<String, Long>> fileSizes) Records a file and its size in bytes being moved to the archive directory.long
computeAndStoreSnapshotSizes
(Collection<String> currentSnapshots) Computes the size of a table and all of its snapshots, recording new "full" sizes for each.
-
Method Details
-
addArchivedFiles
Records a file and its size in bytes being moved to the archive directory.- Parameters:
fileSizes
- A collection of file name to size in bytes- Throws:
IOException
- If there was an IO-related error persisting the file size(s)
-
computeAndStoreSnapshotSizes
Computes the size of a table and all of its snapshots, recording new "full" sizes for each.- Parameters:
currentSnapshots
- the current list of snapshots against this table- Returns:
- The total size of all snapshots against this table.
- Throws:
IOException
- If there was an IO-related error computing or persisting the sizes.
-