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, Mapper
Enclosing class:
CopyFiles

public static class CopyFiles.CopyFilesMapper
extends MapReduceBase
implements Mapper

Mappper class for Copying files.


Constructor Summary
CopyFiles.CopyFilesMapper()
           
 
Method Summary
 void close()
          Default implementation that does nothing.
 void configure(JobConf job)
          Mapper configuration.
 void map(WritableComparable key, Writable val, OutputCollector out, Reporter reporter)
          Map method.
 
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

configure

public void configure(JobConf job)
Mapper configuration. Extracts source and destination file system, as well as top-level paths on source and destination directories. Gets the named file systems, to be used later in map.

Specified by:
configure in interface JobConfigurable
Overrides:
configure in class MapReduceBase
Parameters:
job - the configuration

map

public void map(WritableComparable key,
                Writable val,
                OutputCollector out,
                Reporter reporter)
         throws IOException
Map method. Copies one file from source file system to destination.

Specified by:
map in interface Mapper
Parameters:
key - source file name
value - not-used.
out - not-used.
Throws:
IOException

close

public void close()
Description copied from class: MapReduceBase
Default implementation that does nothing.

Specified by:
close in interface Closeable
Overrides:
close in class MapReduceBase


Copyright © 2006 The Apache Software Foundation