org.apache.hadoop.tools.mapred
Class CopyMapper
java.lang.Object
org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.fs.FileStatus,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text>
org.apache.hadoop.tools.mapred.CopyMapper
public class CopyMapper
- extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.fs.FileStatus,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text>
Mapper class that executes the DistCp copy operation.
Implements the o.a.h.mapreduce.Mapper<> interface.
Nested Class Summary |
static class |
CopyMapper.Counter
Hadoop counters for the DistCp CopyMapper. |
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper |
org.apache.hadoop.mapreduce.Mapper.Context |
Method Summary |
protected void |
cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)
|
void |
map(org.apache.hadoop.io.Text relPath,
org.apache.hadoop.fs.FileStatus sourceFileStatus,
org.apache.hadoop.mapreduce.Mapper.Context context)
Implementation of the Mapper<>::map(). |
void |
setup(org.apache.hadoop.mapreduce.Mapper.Context context)
|
Methods inherited from class org.apache.hadoop.mapreduce.Mapper |
run |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CopyMapper
public CopyMapper()
setup
public void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
- Overrides:
setup
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.fs.FileStatus,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
InterruptedException
map
public void map(org.apache.hadoop.io.Text relPath,
org.apache.hadoop.fs.FileStatus sourceFileStatus,
org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
- Implementation of the Mapper<>::map(). Does the copy.
- Overrides:
map
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.fs.FileStatus,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text>
- Parameters:
relPath:
- The target path.sourceFileStatus:
- The source path.
- Throws:
IOException
InterruptedException
cleanup
protected void cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
- Overrides:
cleanup
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.fs.FileStatus,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
InterruptedException
Copyright © 2014 InMobi. All rights reserved.