Class TestBackupFileSystemManager
java.lang.Object
org.apache.hadoop.hbase.backup.util.TestBackupFileSystemManager
@Tag("org.apache.hadoop.hbase.testclassification.SmallTests")
public class TestBackupFileSystemManager
extends Object
Unit tests for
BackupFileSystemManager.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIntegration-y test: constructor should create directories under the provided backup root.voidextractWalPathInfo: missing date directory -> should throw IOException.voidextractWalPathInfo: null input should throw IllegalArgumentException.voidextractWalPathInfo: case where WALs is at root (leading slash).voidextractWalPathInfo: happy path where WALs dir has a prefix.voidextractWalPathInfo: WALs segment name mismatch -> should throw IOException.voidresolveBulkLoadFullPath: when WALs is under root (prefix is root) - ensure path resolved under /bulk-load-files//... voidresolveBulkLoadFullPath: normal case with prefix.
-
Field Details
-
tmp
-
-
Constructor Details
-
TestBackupFileSystemManager
public TestBackupFileSystemManager()
-
-
Method Details
-
testExtractWalPathInfo_withPrefix
extractWalPathInfo: happy path where WALs dir has a prefix. e.g. /some/prefix/WALs/2025-09-14/some-wal- Throws:
Exception
-
testExtractWalPathInfo_rootWALs
extractWalPathInfo: case where WALs is at root (leading slash). e.g. /WALs/2025-09-14/some-wal Expect prefixBeforeWALs to be "/" (root) or non-null; resolution should still work.- Throws:
Exception
-
testExtractWalPathInfo_nullPath
extractWalPathInfo: null input should throw IllegalArgumentException.- Throws:
Exception
-
testExtractWalPathInfo_missingDateDir
extractWalPathInfo: missing date directory -> should throw IOException. Example: path that has no parent for the wal file.- Throws:
Exception
-
testExtractWalPathInfo_wrongWALsegment
extractWalPathInfo: WALs segment name mismatch -> should throw IOException. e.g. /prefix/NOT_WALs/2025/wal- Throws:
Exception
-
testResolveBulkLoadFullPath_withPrefix
resolveBulkLoadFullPath: normal case with prefix.- Throws:
Exception
-
testResolveBulkLoadFullPath_rootWALs
resolveBulkLoadFullPath: when WALs is under root (prefix is root) - ensure path resolved under /bulk-load-files//... - Throws:
Exception
-
testConstructorCreatesDirectories
Integration-y test: constructor should create directories under the provided backup root. Uses a temporary folder (local fs).- Throws:
Exception
-