Class BackupFileSystemManager

java.lang.Object
org.apache.hadoop.hbase.backup.util.BackupFileSystemManager

@Private public class BackupFileSystemManager extends Object
Initializes and organizes backup directories for continuous Write-Ahead Logs (WALs) and bulk-loaded files within the specified backup root directory.
  • Field Details

  • Constructor Details

  • Method Details

    • createDirectory

      private org.apache.hadoop.fs.Path createDirectory(String dirName) throws IOException
      Throws:
      IOException
    • getWalsDir

      public org.apache.hadoop.fs.Path getWalsDir()
    • getBulkLoadFilesDir

      public org.apache.hadoop.fs.Path getBulkLoadFilesDir()
    • getBackupFs

      public org.apache.hadoop.fs.FileSystem getBackupFs()
    • extractWalPathInfo

      public static BackupFileSystemManager.WalPathInfo extractWalPathInfo(org.apache.hadoop.fs.Path walPath) throws IOException
      Validate the walPath has the expected structure: .../WALs//<wal-file> and return WalPathInfo(prefixBeforeWALs, dateSegment).
      Throws:
      IOException - if the path is not in expected format
    • resolveBulkLoadFullPath

      public static org.apache.hadoop.fs.Path resolveBulkLoadFullPath(org.apache.hadoop.fs.Path walPath, org.apache.hadoop.fs.Path relativeBulkPath) throws IOException
      Resolve the full bulk-load file path corresponding to a relative bulk-load path referenced from a WAL file path. For a WAL path like: /some/prefix/.../WALs/23-08-2025/some-wal-file and a relative bulk path like: namespace/table/region/family/file, this returns: /some/prefix/.../bulk-load-files/23-08-2025/namespace/table/region/family/file
      Parameters:
      walPath - the Path to the WAL file (must contain the WALS_DIR segment followed by date)
      relativeBulkPath - the relative bulk-load file Path
      Returns:
      resolved full Path for the bulk-load file
      Throws:
      IOException - if the WAL path does not contain the expected segments