public class HFileArchiveTestingUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
assertArchiveEqualToOriginal(FileStatus[] expected,
FileStatus[] actual,
FileSystem fs)
Compare the archived files to the files in the original directory
|
static void |
assertArchiveEqualToOriginal(FileStatus[] expected,
FileStatus[] actual,
FileSystem fs,
boolean hasTimedBackup)
Compare the archived files to the files in the original directory
|
static boolean |
compareArchiveToOriginal(FileStatus[] previous,
FileStatus[] archived,
FileSystem fs,
boolean hasTimedBackup) |
static Path |
getRegionArchiveDir(Configuration conf,
HRegion region)
Helper method to get the archive directory for the specified region
|
static Path |
getStoreArchivePath(Configuration conf,
HRegion region,
Store store)
Helper method to get the store archive directory for the specified region
|
static Path |
getStoreArchivePath(HBaseTestingUtility util,
String tableName,
byte[] storeName) |
public static boolean compareArchiveToOriginal(FileStatus[] previous, FileStatus[] archived, FileSystem fs, boolean hasTimedBackup)
public static void assertArchiveEqualToOriginal(FileStatus[] expected, FileStatus[] actual, FileSystem fs) throws IOException
expected
- original files that should have been archivedactual
- files that were archivedfs
- filessystem on which the archiving took placeIOException
public static void assertArchiveEqualToOriginal(FileStatus[] expected, FileStatus[] actual, FileSystem fs, boolean hasTimedBackup) throws IOException
expected
- original files that should have been archivedactual
- files that were archivedfs
- FileSystem
on which the archiving took placehasTimedBackup
- true if we expect to find an archive backup directory with a
copy of the files in the archive directory (and the original files).IOException
public static Path getRegionArchiveDir(Configuration conf, HRegion region) throws IOException
conf
- Configuration
to check for the name of the archive directoryregion
- region that is being archivedPath
to the archive directory for the given regionIOException
public static Path getStoreArchivePath(Configuration conf, HRegion region, Store store) throws IOException
conf
- Configuration
to check for the name of the archive directoryregion
- region that is being archivedstore
- store that is archiving filesPath
to the store archive directory for the given regionIOException
public static Path getStoreArchivePath(HBaseTestingUtility util, String tableName, byte[] storeName) throws IOException
IOException