Class MapReduceBackupCopyJob.BackupDistCp
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.tools.DistCp
org.apache.hadoop.hbase.backup.mapreduce.MapReduceBackupCopyJob.BackupDistCp
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
- Enclosing class:
- MapReduceBackupCopyJob
Extends DistCp for progress updating to backup system table during backup. Using DistCpV2
(MAPREDUCE-2765). Simply extend it and override execute() method to get the Job reference for
progress updating. Only the argument "src1, [src2, [...]] dst" is supported, no more DistCp
options.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBackupDistCp
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.tools.DistCpOptions options, BackupInfo backupInfo, BackupManager backupManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.hadoop.fs.Path
createInputFileListing
(org.apache.hadoop.mapreduce.Job job) org.apache.hadoop.mapreduce.Job
execute()
private Field
getInputOptionsField
(Class<?> classDistCp) private org.apache.hadoop.io.Text
getKey
(org.apache.hadoop.fs.Path path) private List<org.apache.hadoop.fs.Path>
private List<org.apache.hadoop.fs.Path>
getSourcePaths
(Field fieldInputOptions) private org.apache.hadoop.io.SequenceFile.Writer
getWriter
(org.apache.hadoop.fs.Path pathToListFile) Methods inherited from class org.apache.hadoop.tools.DistCp
createAndSubmitJob, getFileListingPath, main, run, waitForJobCompletion
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
backupInfo
-
backupManager
-
-
Constructor Details
-
BackupDistCp
public BackupDistCp(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.tools.DistCpOptions options, BackupInfo backupInfo, BackupManager backupManager) throws Exception - Throws:
Exception
-
-
Method Details
-
execute
- Overrides:
execute
in classorg.apache.hadoop.tools.DistCp
- Throws:
Exception
-
getInputOptionsField
- Throws:
IOException
-
getSourcePaths
- Throws:
IOException
-
createInputFileListing
protected org.apache.hadoop.fs.Path createInputFileListing(org.apache.hadoop.mapreduce.Job job) throws IOException - Overrides:
createInputFileListing
in classorg.apache.hadoop.tools.DistCp
- Throws:
IOException
-
getKey
-
getSourceFiles
private List<org.apache.hadoop.fs.Path> getSourceFiles() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, ClassNotFoundException, InvocationTargetException, IOException -
getWriter
private org.apache.hadoop.io.SequenceFile.Writer getWriter(org.apache.hadoop.fs.Path pathToListFile) throws IOException - Throws:
IOException
-