public class HFileArchiveTestingUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
assertArchiveEqualToOriginal(org.apache.hadoop.fs.FileStatus[] expected,
org.apache.hadoop.fs.FileStatus[] actual,
org.apache.hadoop.fs.FileSystem fs)
Compare the archived files to the files in the original directory
|
static void |
assertArchiveEqualToOriginal(org.apache.hadoop.fs.FileStatus[] expected,
org.apache.hadoop.fs.FileStatus[] actual,
org.apache.hadoop.fs.FileSystem fs,
boolean hasTimedBackup)
Compare the archived files to the files in the original directory
|
static boolean |
compareArchiveToOriginal(org.apache.hadoop.fs.FileStatus[] previous,
org.apache.hadoop.fs.FileStatus[] archived,
org.apache.hadoop.fs.FileSystem fs,
boolean hasTimedBackup) |
static org.apache.hadoop.fs.Path |
getRegionArchiveDir(org.apache.hadoop.conf.Configuration conf,
HRegion region)
Helper method to get the archive directory for the specified region
|
static org.apache.hadoop.fs.Path |
getStoreArchivePath(org.apache.hadoop.conf.Configuration conf,
HRegion region,
Store store)
Helper method to get the store archive directory for the specified region
|
static org.apache.hadoop.fs.Path |
getStoreArchivePath(HBaseTestingUtility util,
String tableName,
byte[] storeName) |
public static boolean compareArchiveToOriginal(org.apache.hadoop.fs.FileStatus[] previous, org.apache.hadoop.fs.FileStatus[] archived, org.apache.hadoop.fs.FileSystem fs, boolean hasTimedBackup)
public static void assertArchiveEqualToOriginal(org.apache.hadoop.fs.FileStatus[] expected, org.apache.hadoop.fs.FileStatus[] actual, org.apache.hadoop.fs.FileSystem fs) throws IOException
expected - original files that should have been archivedactual - files that were archivedfs - filessystem on which the archiving took placeIOExceptionpublic static void assertArchiveEqualToOriginal(org.apache.hadoop.fs.FileStatus[] expected, org.apache.hadoop.fs.FileStatus[] actual, org.apache.hadoop.fs.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).IOExceptionpublic static org.apache.hadoop.fs.Path getRegionArchiveDir(org.apache.hadoop.conf.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 regionIOExceptionpublic static org.apache.hadoop.fs.Path getStoreArchivePath(org.apache.hadoop.conf.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 regionIOExceptionpublic static org.apache.hadoop.fs.Path getStoreArchivePath(HBaseTestingUtility util, String tableName, byte[] storeName) throws IOException
IOExceptionCopyright © 2007–2019 Cloudera. All rights reserved.