public class DistCp
extends java.lang.Object
String
s) through copy(String...)
or specify individual
arguments through the rest of the methods.Modifier and Type | Class and Description |
---|---|
static class |
DistCp.Preserve
Enumeration for the possible attributes that can be preserved by a copy operation.
|
Constructor and Description |
---|
DistCp(org.apache.hadoop.conf.Configuration configuration)
Instantiates a new DistCp.
|
DistCp(org.apache.hadoop.conf.Configuration configuration,
java.lang.String user)
Instantiates a new DistCp.
|
Modifier and Type | Method and Description |
---|---|
void |
copy(java.lang.Boolean preserveReplication,
java.lang.Boolean preserveBlockSize,
java.lang.Boolean preserveUser,
java.lang.Boolean preserveGroup,
java.lang.Boolean preservePermission,
java.lang.Boolean ignoreFailures,
java.lang.Boolean skipCrc,
java.lang.String logDir,
java.lang.Integer mappers,
java.lang.Boolean overwrite,
java.lang.Boolean update,
java.lang.Boolean delete,
java.lang.Long fileLimit,
java.lang.Long sizeLimit,
java.lang.String fileList,
java.lang.String... uris)
Copies the given resources using the given parameters.
|
void |
copy(java.util.EnumSet<DistCp.Preserve> preserve,
java.lang.Boolean ignoreFailures,
java.lang.Boolean overwrite,
java.lang.Boolean update,
java.lang.Boolean delete,
java.lang.String... uris)
Copies the given resources using the given parameters.
|
void |
copy(java.util.EnumSet<DistCp.Preserve> preserve,
java.lang.Boolean ignoreFailures,
java.lang.Boolean skipCrc,
java.lang.String logDir,
java.lang.Integer mappers,
java.lang.Boolean overwrite,
java.lang.Boolean update,
java.lang.Boolean delete,
java.lang.Long fileLimit,
java.lang.Long sizeLimit,
java.lang.String fileList,
java.lang.String... uris)
Copies the given resources using the given parameters.
|
void |
copy(java.lang.String... arguments)
Initiate a copy operation using a command-line style (arguments are
specified as
String s). |
void |
copy(java.lang.String source,
java.lang.String destination)
Initiate a basic copy operation, between a source and a destination using
the defaults.
|
void |
copy(java.lang.String source1,
java.lang.String source2,
java.lang.String destination)
Initiate a basic copy operation, between two sources and a destination
using the defaults.
|
void |
setUser(java.lang.String user)
Sets the user impersonation (optional) for creating this utility.
|
public DistCp(org.apache.hadoop.conf.Configuration configuration)
configuration
- the hadoop configurationpublic DistCp(org.apache.hadoop.conf.Configuration configuration, java.lang.String user)
configuration
- the hadoop configurationuser
- the userpublic void copy(java.util.EnumSet<DistCp.Preserve> preserve, java.lang.Boolean ignoreFailures, java.lang.Boolean overwrite, java.lang.Boolean update, java.lang.Boolean delete, java.lang.String... uris)
preserve
- preserveignoreFailures
- ignoreFailuresoverwrite
- overwriteupdate
- updatedelete
- deleteuris
- urispublic void copy(java.util.EnumSet<DistCp.Preserve> preserve, java.lang.Boolean ignoreFailures, java.lang.Boolean skipCrc, java.lang.String logDir, java.lang.Integer mappers, java.lang.Boolean overwrite, java.lang.Boolean update, java.lang.Boolean delete, java.lang.Long fileLimit, java.lang.Long sizeLimit, java.lang.String fileList, java.lang.String... uris)
preserve
- preserveignoreFailures
- ignoreFailuresskipCrc
- skipCrclogDir
- logDirmappers
- mappersoverwrite
- overwriteupdate
- updatedelete
- deletefileLimit
- fileLimitsizeLimit
- sizeLimitfileList
- fileListuris
- urispublic void copy(java.lang.Boolean preserveReplication, java.lang.Boolean preserveBlockSize, java.lang.Boolean preserveUser, java.lang.Boolean preserveGroup, java.lang.Boolean preservePermission, java.lang.Boolean ignoreFailures, java.lang.Boolean skipCrc, java.lang.String logDir, java.lang.Integer mappers, java.lang.Boolean overwrite, java.lang.Boolean update, java.lang.Boolean delete, java.lang.Long fileLimit, java.lang.Long sizeLimit, java.lang.String fileList, java.lang.String... uris)
preserveReplication
- preserveReplicationpreserveBlockSize
- preserveBlockSizepreserveUser
- preserveUserpreserveGroup
- preserveGrouppreservePermission
- preservePermissionignoreFailures
- ignoreFailuresskipCrc
- skipCrclogDir
- logDirmappers
- mappersoverwrite
- overwriteupdate
- updatedelete
- deletefileLimit
- fileLimitsizeLimit
- sizeLimitfileList
- fileListuris
- urispublic void copy(java.lang.String source, java.lang.String destination)
source
- the sourcedestination
- the destinationpublic void copy(java.lang.String source1, java.lang.String source2, java.lang.String destination)
source1
- the first sourcesource2
- the second sourcedestination
- the destinationpublic void copy(java.lang.String... arguments)
String
s).arguments
- the copy argumentspublic void setUser(java.lang.String user)
user
- user/group information