org.apache.hadoop.util
Class CopyFiles.CopyFilesMapper

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.hadoop.util.CopyFiles.CopyFilesMapper
All Implemented Interfaces:
Closeable, JobConfigurable
Direct Known Subclasses:
CopyFiles.DFSCopyFilesMapper, CopyFiles.HTTPCopyFilesMapper
Enclosing class:
CopyFiles

public abstract static class CopyFiles.CopyFilesMapper
extends MapReduceBase

Base-class for all mappers for distcp

Author:
Arun C Murthy

Constructor Summary
CopyFiles.CopyFilesMapper()
           
 
Method Summary
abstract  void cleanup(Configuration conf, JobConf jobConf, String srcPath, String destPath)
          Interface to cleanup *distcp* specific resources
static String getFileSysName(URI url)
           
static Path makeRelative(Path root, Path absPath)
          Make a path relative with respect to a root path.
abstract  void setup(Configuration conf, JobConf jobConf, String[] srcPaths, String destPath, boolean ignoreReadFailures)
          Interface to initialize *distcp* specific map tasks.
 
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase
close, configure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyFiles.CopyFilesMapper

public CopyFiles.CopyFilesMapper()
Method Detail

setup

public abstract void setup(Configuration conf,
                           JobConf jobConf,
                           String[] srcPaths,
                           String destPath,
                           boolean ignoreReadFailures)
                    throws IOException
Interface to initialize *distcp* specific map tasks.

Parameters:
conf - : The dfs/mapred configuration.
jobConf - : The handle to the jobConf object to be initialized.
srcPaths - : The source paths.
destPath - : The destination path.
ignoreReadFailures - : Ignore read failures?
Throws:
IOException

cleanup

public abstract void cleanup(Configuration conf,
                             JobConf jobConf,
                             String srcPath,
                             String destPath)
                      throws IOException
Interface to cleanup *distcp* specific resources

Parameters:
conf - : The dfs/mapred configuration.
jobConf - : The handle to the jobConf object to be initialized.
srcPath - : The source uri.
destPath - : The destination uri.
Throws:
IOException

getFileSysName

public static String getFileSysName(URI url)

makeRelative

public static Path makeRelative(Path root,
                                Path absPath)
Make a path relative with respect to a root path. absPath is always assumed to descend from root. Otherwise returned path is null.



Copyright © 2006 The Apache Software Foundation