org.springframework.data.hadoop.fs
Class DistCp

java.lang.Object
  extended by org.springframework.data.hadoop.fs.DistCp

public class DistCp
extends Object

Exposes the Hadoop command-line distcp as an embeddable API. Due to the number of options available in DistCp, one can either specify them in a command-like style (through one or multiple Strings) through copy(String...) or specify individual arguments through the rest of the methods.

Author:
Costin Leau

Nested Class Summary
static class DistCp.Preserve
          Enumeration for the possible attributes that can be preserved by a copy operation.
 
Constructor Summary
DistCp(Configuration configuration)
          Constructs a new DistCp instance.
 
Method Summary
 void copy(Boolean preserveReplication, Boolean preserveBlockSize, Boolean preserveUser, Boolean preserveGroup, Boolean preservePermission, Boolean ignoreFailures, Boolean skipCrc, String logDir, Integer mappers, Boolean overwrite, Boolean update, Boolean delete, Long fileLimit, Long sizeLimit, String fileList, String... uris)
          Copies the given resources using the given parameters.
 void copy(EnumSet<DistCp.Preserve> preserve, Boolean ignoreFailures, Boolean overwrite, Boolean update, Boolean delete, String... uris)
          Copy operation.
 void copy(EnumSet<DistCp.Preserve> preserve, Boolean ignoreFailures, Boolean skipCrc, String logDir, Integer mappers, Boolean overwrite, Boolean update, Boolean delete, Long fileLimit, Long sizeLimit, String fileList, String... uris)
          Copies the given resources using the given parameters.
 void copy(String... arguments)
          DistCopy using a command-line style (arguments are specified as Strings).
 void copy(String arg1, String arg2)
          Basic copy operation, between a source and a destination using the defaults.
 void copy(String arg1, String arg2, String arg3)
          Basic copy operation, between a source and a destination using the defaults.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistCp

public DistCp(Configuration configuration)
Constructs a new DistCp instance.

Parameters:
configuration - Hadoop configuration to use.
Method Detail

copy

public void copy(EnumSet<DistCp.Preserve> preserve,
                 Boolean ignoreFailures,
                 Boolean overwrite,
                 Boolean update,
                 Boolean delete,
                 String... uris)
Copy operation.

Parameters:
preserve -
ignoreFailures -
overwrite -
update -
delete -
uris -

copy

public void copy(EnumSet<DistCp.Preserve> preserve,
                 Boolean ignoreFailures,
                 Boolean skipCrc,
                 String logDir,
                 Integer mappers,
                 Boolean overwrite,
                 Boolean update,
                 Boolean delete,
                 Long fileLimit,
                 Long sizeLimit,
                 String fileList,
                 String... uris)
Copies the given resources using the given parameters.

Parameters:
preserve -
ignoreFailures -
skipCrc -
logDir -
mappers -
overwrite -
update -
delete -
fileLimit -
sizeLimit -
fileList -
uris -

copy

public void copy(Boolean preserveReplication,
                 Boolean preserveBlockSize,
                 Boolean preserveUser,
                 Boolean preserveGroup,
                 Boolean preservePermission,
                 Boolean ignoreFailures,
                 Boolean skipCrc,
                 String logDir,
                 Integer mappers,
                 Boolean overwrite,
                 Boolean update,
                 Boolean delete,
                 Long fileLimit,
                 Long sizeLimit,
                 String fileList,
                 String... uris)
Copies the given resources using the given parameters.

Parameters:
preserveReplication -
preserveBlockSize -
preserveUser -
preserveGroup -
preservePermission -
ignoreFailures -
skipCrc -
logDir -
mappers -
overwrite -
update -
delete -
fileLimit -
sizeLimit -
fileList -
uris -

copy

public void copy(String arg1,
                 String arg2)
Basic copy operation, between a source and a destination using the defaults.

Parameters:
arg1 -
arg2 -

copy

public void copy(String arg1,
                 String arg2,
                 String arg3)
Basic copy operation, between a source and a destination using the defaults.

Parameters:
arg1 -
arg2 -
arg3 -

copy

public void copy(String... arguments)
DistCopy using a command-line style (arguments are specified as Strings).

Parameters:
arguments - copy arguments