Class HadoopJobTool
- java.lang.Object
-
- org.apache.hadoop.conf.Configured
-
- dk.netarkivet.common.utils.hadoop.HadoopJobTool
-
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
public class HadoopJobTool extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
A simple generic Hadoop map-only tool that runs a given mapper on the passed input file containing new-line separated file paths and outputs the job's resulting files in the passed output path
-
-
Constructor Summary
Constructors Constructor Description HadoopJobTool(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text> mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
run(java.lang.String[] args)
Method for running the tool/job.
-
-
-
Constructor Detail
-
HadoopJobTool
public HadoopJobTool(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text> mapper)
-
-
Method Detail
-
run
public int run(java.lang.String[] args) throws java.lang.InterruptedException, java.io.IOException, java.lang.ClassNotFoundException
Method for running the tool/job.- Specified by:
run
in interfaceorg.apache.hadoop.util.Tool
- Parameters:
args
- Expects two strings representing the job's in- and output paths (Tool interface dictates String[])- Returns:
- An exitcode to report back if the job succeeded.
- Throws:
java.lang.InterruptedException
java.io.IOException
java.lang.ClassNotFoundException
-
-