org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool@Public
@Evolving
public class DistCp
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
| Constructor | Description |
|---|---|
DistCp(org.apache.hadoop.conf.Configuration configuration,
DistCpOptions inputOptions) |
Public Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
cleanup() |
Clean the staging folder created by distcp.
|
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 DistCpContext |
getContext() |
Returns the context.
|
protected org.apache.hadoop.fs.Path |
getFileListingPath() |
Get default name of the copy listing file.
|
static void |
main(java.lang.String[] argv) |
Main function of the DistCp program.
|
int |
run(java.lang.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 java.lang.Exception
configuration - configuration against which the Copy-mapper must runinputOptions - Immutable optionsjava.lang.Exceptionpublic int run(java.lang.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 java.lang.Exception
java.lang.Exceptionpublic org.apache.hadoop.mapreduce.Job createAndSubmitJob()
throws java.lang.Exception
java.lang.Exceptionpublic void waitForJobCompletion(org.apache.hadoop.mapreduce.Job job)
throws java.lang.Exception
job - the given mapreduce job that has already been submittedjava.lang.Exceptionprotected org.apache.hadoop.fs.Path createInputFileListing(org.apache.hadoop.mapreduce.Job job)
throws java.io.IOException
job - - Handle to jobjava.io.IOException - - If anyprotected org.apache.hadoop.fs.Path getFileListingPath()
throws java.io.IOException
java.io.IOException - - Exception if anyprotected DistCpContext getContext()
public static void main(java.lang.String[] argv)
argv - Command-line arguments sent to DistCp.protected void cleanup()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.