@InterfaceAudience.Public
@InterfaceStability.Evolving
public class DistCp
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
| Constructor and Description |
|---|
DistCp(org.apache.hadoop.conf.Configuration configuration,
DistCpOptions inputOptions)
Public Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.mapreduce.Job |
createAndSubmitJob()
Create and submit the mapreduce job.
|
protected org.apache.hadoop.fs.Path |
createInputFileListing(org.apache.hadoop.mapreduce.Job job)
Create input listing by invoking an appropriate copy listing
implementation.
|
org.apache.hadoop.mapreduce.Job |
execute()
Implements the core-execution.
|
protected org.apache.hadoop.fs.Path |
getFileListingPath()
Get default name of the copy listing file.
|
static void |
main(String[] argv)
Main function of the DistCp program.
|
int |
run(String[] argv)
Implementation of Tool::run().
|
void |
waitForJobCompletion(org.apache.hadoop.mapreduce.Job job)
Wait for the given job to complete.
|
public DistCp(org.apache.hadoop.conf.Configuration configuration,
DistCpOptions inputOptions)
throws Exception
inputOptions - Options (indicating source-paths, target-location.)configuration - The Hadoop configuration against which the Copy-mapper must run.Exceptionpublic int run(String[] argv)
run in interface org.apache.hadoop.util.Toolargv - List of arguments passed to DistCp, from the ToolRunner.public org.apache.hadoop.mapreduce.Job execute()
throws Exception
Exceptionpublic org.apache.hadoop.mapreduce.Job createAndSubmitJob()
throws Exception
Exceptionpublic void waitForJobCompletion(org.apache.hadoop.mapreduce.Job job)
throws Exception
job - the given mapreduce job that has already been submittedExceptionprotected org.apache.hadoop.fs.Path createInputFileListing(org.apache.hadoop.mapreduce.Job job)
throws IOException
job - - Handle to jobIOException - - If anyprotected org.apache.hadoop.fs.Path getFileListingPath()
throws IOException
IOException - - Exception if anypublic static void main(String[] argv)
argv - Command-line arguments sent to DistCp.Copyright © 2017 Apache Software Foundation. All Rights Reserved.