public class ContextUtil extends Object
Constructor and Description |
---|
ContextUtil() |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.conf.Configuration |
getConfiguration(org.apache.hadoop.mapreduce.JobContext context)
Invoke getConfiguration() method on JobContext.
|
static org.apache.hadoop.mapreduce.Counter |
getCounter(org.apache.hadoop.mapreduce.TaskInputOutputContext context,
String groupName,
String counterName) |
static void |
incrementCounter(org.apache.hadoop.mapreduce.Counter counter,
long increment) |
static org.apache.hadoop.mapreduce.Counter |
newGenericCounter(String name,
String displayName,
long value) |
static org.apache.hadoop.mapreduce.JobContext |
newJobContext(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.mapreduce.JobID jobId)
Creates JobContext from a JobConf and jobId using the correct constructor
for based on Hadoop version.
|
static org.apache.hadoop.mapreduce.TaskAttemptContext |
newTaskAttemptContext(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.mapreduce.TaskAttemptID taskAttemptId)
Creates TaskAttempContext from a JobConf and jobId using the correct
constructor for based on Hadoop version.
|
public static org.apache.hadoop.mapreduce.JobContext newJobContext(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapreduce.JobID jobId)
jobId
could be null.public static org.apache.hadoop.mapreduce.TaskAttemptContext newTaskAttemptContext(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapreduce.TaskAttemptID taskAttemptId)
public static org.apache.hadoop.mapreduce.Counter newGenericCounter(String name, String displayName, long value)
new GenericCounter(args)
,new Counter(args)
public static org.apache.hadoop.conf.Configuration getConfiguration(org.apache.hadoop.mapreduce.JobContext context)
public static org.apache.hadoop.mapreduce.Counter getCounter(org.apache.hadoop.mapreduce.TaskInputOutputContext context, String groupName, String counterName)
public static void incrementCounter(org.apache.hadoop.mapreduce.Counter counter, long increment)
Copyright © 2015 The Apache Software Foundation. All rights reserved.