public interface HadoopCompat
This interface is public, but should be considered unstable and likely to change in the future as new Hadoop versions are released, or as titan-hadoop-core uses additional Hadoop features, or as bugs are discovered. It's possible to write and use a third-party implementation, but be prepared to update it when upgrading to a newer Titan release.
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.conf.Configuration |
getContextConfiguration(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Get configuration from the supplied task attempt context and return it.
|
long |
getCounter(org.apache.hadoop.mrunit.mapreduce.MapReduceDriver counters,
Enum<?> e)
Get the value of the counter specified by
e on counters. |
org.apache.hadoop.conf.Configuration |
getJobContextConfiguration(org.apache.hadoop.mapreduce.JobContext context)
Get configuration from the supplied job context and return it.
|
String |
getMapredJarConfigKey() |
String |
getSpeculativeMapConfigKey()
Return the Hadoop configuration key which takes a boolean value and
controls whether Hadoop will attempt speculative execution of mappers.
|
String |
getSpeculativeReduceConfigKey()
Return the Hadoop configuration key which takes a boolean value and
controls whether Hadoop will attempt speculative execution of reducers.
|
void |
incrementContextCounter(org.apache.hadoop.mapreduce.TaskInputOutputContext context,
Enum<?> counter,
long incr)
Add
incr to the counter designated by counter on context. |
HadoopCompiler |
newCompiler(HadoopGraph g)
Instantiate and return a HadoopCompiler instance that uses the supplied
graph
|
JobClasspathConfigurer |
newDistCacheConfigurer()
Construct a
JobClasspathConfigurer
that walks the classpath and adds all jars its finds to the Hadoop Jobs's
classpaths via the Hadoop Distributed Cache. |
org.apache.hadoop.conf.Configuration |
newImmutableConfiguration(org.apache.hadoop.conf.Configuration base)
Construct a
Configuration instance which throws
UnsupportedOperationException on any attempt to modify its state,
but which forwards to its parameter all method calls that don't mutate state (i.e. |
JobClasspathConfigurer |
newMapredJarConfigurer(String mapredJarPath)
Construct a
JobClasspathConfigurer
that sets the Mapreduce job jar config key to the supplied value. |
org.apache.hadoop.mapreduce.TaskAttemptContext |
newTask(org.apache.hadoop.conf.Configuration c,
org.apache.hadoop.mapreduce.TaskAttemptID t)
Instantiate a new TaskAttemptContext using the given attempt ID and configuration.
|
HadoopCompiler newCompiler(HadoopGraph g)
g - data source/sink for the task compilerorg.apache.hadoop.mapreduce.TaskAttemptContext newTask(org.apache.hadoop.conf.Configuration c,
org.apache.hadoop.mapreduce.TaskAttemptID t)
c - configurationt - task attempt IDString getSpeculativeMapConfigKey()
String getSpeculativeReduceConfigKey()
String getMapredJarConfigKey()
void incrementContextCounter(org.apache.hadoop.mapreduce.TaskInputOutputContext context,
Enum<?> counter,
long incr)
incr to the counter designated by counter on context.context - Hadoop task IO context containing counter statecounter - name of the counterincr - amount to add to the counter's current valueorg.apache.hadoop.conf.Configuration getContextConfiguration(org.apache.hadoop.mapreduce.TaskAttemptContext context)
context - Hadoop task attempt contextcontextorg.apache.hadoop.conf.Configuration getJobContextConfiguration(org.apache.hadoop.mapreduce.JobContext context)
context - Hadoop job contextcontextlong getCounter(org.apache.hadoop.mrunit.mapreduce.MapReduceDriver counters,
Enum<?> e)
e on counters.counters - MRUnit test driver containing counter statee - the name of the counter whose value should be retrievedJobClasspathConfigurer newMapredJarConfigurer(String mapredJarPath)
JobClasspathConfigurer
that sets the Mapreduce job jar config key to the supplied value. The job jar
should contain Faunus's classes plus its entire dependency tree ("fat" jar).mapredJarPath - path to the mapreduce job jarJobClasspathConfigurer newDistCacheConfigurer()
JobClasspathConfigurer
that walks the classpath and adds all jars its finds to the Hadoop Jobs's
classpaths via the Hadoop Distributed Cache.org.apache.hadoop.conf.Configuration newImmutableConfiguration(org.apache.hadoop.conf.Configuration base)
Configuration instance which throws
UnsupportedOperationException on any attempt to modify its state,
but which forwards to its parameter all method calls that don't mutate state (i.e. reads).base - the configuration to encapsulate behind an immutable forwarder classbaseCopyright © 2012–2016. All rights reserved.