org.apache.hadoop.util
Class CopyFiles.CopyFilesMapper

java.lang.Object
  extended byorg.apache.hadoop.mapred.MapReduceBase
      extended byorg.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()
          Called after the last call to any other method on this object to free and/or flush resources.
 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

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
out - not-used.
val - the values
Throws:
IOException

close

public void close()
Description copied from interface: Closeable
Called after the last call to any other method on this object to free and/or flush resources. Typical implementations do nothing.

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


Copyright © 2006 The Apache Software Foundation