com.datasalt.pangool.utils
Class JobContextFactory

java.lang.Object
  extended by com.datasalt.pangool.utils.JobContextFactory

public class JobContextFactory
extends Object

A trick that uses reflection to be compatible with both Hadoop 1.0 and Hadoop 2.0 In Hadoop 2.0 JobContext is an interface and cannot be instantiated. Instead, one must instantiate JobContextImpl.


Constructor Summary
JobContextFactory()
           
 
Method Summary
static org.apache.hadoop.mapreduce.JobContext get(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapreduce.JobID jobId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobContextFactory

public JobContextFactory()
Method Detail

get

public static org.apache.hadoop.mapreduce.JobContext get(org.apache.hadoop.conf.Configuration conf,
                                                         org.apache.hadoop.mapreduce.JobID jobId)
                                                  throws ClassNotFoundException,
                                                         IllegalArgumentException,
                                                         SecurityException,
                                                         InstantiationException,
                                                         IllegalAccessException,
                                                         InvocationTargetException,
                                                         NoSuchMethodException
Throws:
ClassNotFoundException
IllegalArgumentException
SecurityException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodException


Copyright © –2014 Datasalt Systems S.L.. All rights reserved.