com.datasalt.pangool.utils
Class TaskAttemptContextFactory

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

public class TaskAttemptContextFactory
extends Object

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


Constructor Summary
TaskAttemptContextFactory()
           
 
Method Summary
static org.apache.hadoop.mapreduce.TaskAttemptContext get(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapreduce.TaskAttemptID taskAttemptID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskAttemptContextFactory

public TaskAttemptContextFactory()
Method Detail

get

public static org.apache.hadoop.mapreduce.TaskAttemptContext get(org.apache.hadoop.conf.Configuration conf,
                                                                 org.apache.hadoop.mapreduce.TaskAttemptID taskAttemptID)
                                                          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.