Class DistCp

  • All Implemented Interfaces:
    org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

    public class DistCp
    extends Object
    implements org.apache.hadoop.util.Tool
    A Map-reduce program to recursively copy directories between different file-systems.
    Since:
    1.0
    Author:
    The hadoop project
    • Constructor Detail

      • DistCp

        public DistCp​(org.apache.hadoop.conf.Configuration conf)
    • Method Detail

      • setConf

        public void setConf​(org.apache.hadoop.conf.Configuration conf)
        Specified by:
        setConf in interface org.apache.hadoop.conf.Configurable
      • getConf

        public org.apache.hadoop.conf.Configuration getConf()
        Specified by:
        getConf in interface org.apache.hadoop.conf.Configurable
      • copy

        @Deprecated
        public static void copy​(org.apache.hadoop.conf.Configuration conf,
                                String srcPath,
                                String destPath,
                                org.apache.hadoop.fs.Path logPath,
                                boolean srcAsList,
                                boolean ignoreReadFailures)
                         throws IOException
        Deprecated.
        Throws:
        IOException
      • run

        public int run​(String[] args)
        This is the main driver for recursively copying directories across file systems. It takes at least two cmdline parameters. A source URL and a destination URL. It then essentially does an "ls -lR" on the source URL, and writes the output in a round-robin manner to all the map input files. The mapper actually copies the files allotted to it. The reduce is empty.
        Specified by:
        run in interface org.apache.hadoop.util.Tool
      • runWithException

        public void runWithException​(String[] args)
                              throws EoulsanException
        This is the main driver for recursively copying directories across file systems. It takes at least two cmdline parameters. A source URL and a destination URL. It then essentially does an "ls -lR" on the source URL, and writes the output in a round-robin manner to all the map input files. The mapper actually copies the files allotted to it. The reduce is empty.
        Throws:
        EoulsanException - if an error occurs
      • getRandomId

        public static String getRandomId()