Class BulkFilesCollector
java.lang.Object
org.apache.hadoop.hbase.backup.util.BulkFilesCollector
Utility to run BulkLoadCollectorJob over a comma-separated list of WAL directories and return a
deduplicated list of discovered bulk-load file paths.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<org.apache.hadoop.fs.Path>collectFromWalDirs(org.apache.hadoop.conf.Configuration conf, String walDirsCsv, org.apache.hadoop.fs.Path restoreRootDir, TableName sourceTable, TableName targetTable, long startTime, long endTime) Convenience overload: collector will create and configure BulkLoadCollectorJob internally.static List<org.apache.hadoop.fs.Path>collectFromWalDirs(org.apache.hadoop.conf.Configuration conf, String walDirsCsv, org.apache.hadoop.fs.Path restoreRootDir, TableName sourceTable, TableName targetTable, org.apache.hadoop.util.Tool bulkCollector) Primary implementation: runs the provided Tool (BulkLoadCollectorJob) with args "" and returns deduped list of Paths. private static List<org.apache.hadoop.fs.Path>readBulkFilesListFromOutput(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path bulkFilesOut)
-
Field Details
-
LOG
-
-
Constructor Details
-
BulkFilesCollector
private BulkFilesCollector()
-
-
Method Details
-
collectFromWalDirs
public static List<org.apache.hadoop.fs.Path> collectFromWalDirs(org.apache.hadoop.conf.Configuration conf, String walDirsCsv, org.apache.hadoop.fs.Path restoreRootDir, TableName sourceTable, TableName targetTable, long startTime, long endTime) throws IOException Convenience overload: collector will create and configure BulkLoadCollectorJob internally.- Parameters:
conf- cluster/configuration used to initialize job and access FSwalDirsCsv- comma-separated WAL directoriesrestoreRootDir- parent path under which temporary output dir will be createdsourceTable- source table name (for args/logging)targetTable- target table name (for args/logging)startTime- start time (ms) to set in the job config (WALInputFormat.START_TIME_KEY)endTime- end time (ms) to set in the job config (WALInputFormat.END_TIME_KEY)- Returns:
- deduplicated list of Paths discovered by the collector
- Throws:
IOException- on IO or job failure
-
collectFromWalDirs
public static List<org.apache.hadoop.fs.Path> collectFromWalDirs(org.apache.hadoop.conf.Configuration conf, String walDirsCsv, org.apache.hadoop.fs.Path restoreRootDir, TableName sourceTable, TableName targetTable, org.apache.hadoop.util.Tool bulkCollector) throws IOException Primary implementation: runs the provided Tool (BulkLoadCollectorJob) with args "" and returns deduped list of Paths. - Throws:
IOException
-
readBulkFilesListFromOutput
private static List<org.apache.hadoop.fs.Path> readBulkFilesListFromOutput(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path bulkFilesOut) throws IOException - Throws:
IOException
-