org.duracloud.services.hadoop.replication
Class RepMapper

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.duracloud.services.hadoop.base.ProcessFileMapper
          extended by org.duracloud.services.hadoop.replication.RepMapper
All Implemented Interfaces:
Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
Direct Known Subclasses:
RetryRepMapper

public class RepMapper
extends ProcessFileMapper

Mapper used to perform replication.


Field Summary
static String DATE
           
static String REP_ATTEMPTS
           
static String REP_RESULT
           
static String SRC_SIZE
           
 
Fields inherited from class org.duracloud.services.hadoop.base.ProcessFileMapper
ERR_MESSAGE, FAILURE, INPUT_PATH, jobConf, pathUtil, RESULT, RESULT_PATH, resultInfo, SUCCESS
 
Constructor Summary
RepMapper()
           
 
Method Summary
protected  String collectResult()
          Collects the result of the mapping process.
protected  ProcessResult processFile(FileWithMD5 fileWithMD5, String origContentId, org.apache.hadoop.mapred.Reporter reporter)
          Replicate a file to another storage location
 
Methods inherited from class org.duracloud.services.hadoop.base.ProcessFileMapper
collect, configure, copyFileLocal, getContentStore, getStoreManager, map, map, moveToOutput, processFile, setStoreManager
 
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.Closeable
close
 

Field Detail

DATE

public static final String DATE
See Also:
Constant Field Values

SRC_SIZE

public static final String SRC_SIZE
See Also:
Constant Field Values

REP_RESULT

public static final String REP_RESULT
See Also:
Constant Field Values

REP_ATTEMPTS

public static final String REP_ATTEMPTS
See Also:
Constant Field Values
Constructor Detail

RepMapper

public RepMapper()
Method Detail

processFile

protected ProcessResult processFile(FileWithMD5 fileWithMD5,
                                    String origContentId,
                                    org.apache.hadoop.mapred.Reporter reporter)
                             throws IOException
Replicate a file to another storage location

Overrides:
processFile in class ProcessFileMapper
Parameters:
fileWithMD5 - the file to be replicated
origContentId - the original ID of the file
reporter - allows for reporting progress and status
Returns:
null (there is no resultant file)
Throws:
IOException

collectResult

protected String collectResult()
                        throws IOException
Description copied from class: ProcessFileMapper
Collects the result of the mapping process. This method may be overridden to provide more specific result info.

Overrides:
collectResult in class ProcessFileMapper
Throws:
IOException


Copyright © 2009-2011 DuraSpace. All Rights Reserved.