aboutsummaryrefslogtreecommitdiff
path: root/core/src/hadoop1
diff options
context:
space:
mode:
authorThomas Dudziak <tomdzk@gmail.com>2012-10-09 15:21:38 -0700
committerThomas Dudziak <tomdzk@gmail.com>2012-10-18 16:08:54 -0700
commitd9c2a89c57d0e650b6707e45381b2d89ff7e0cdb (patch)
treecd4ad0391a17f588278e1147062a7ddca686e65d /core/src/hadoop1
parent63fe4e9d33ec59d93b42507ca9ea286178c12ec4 (diff)
downloadspark-d9c2a89c57d0e650b6707e45381b2d89ff7e0cdb.tar.gz
spark-d9c2a89c57d0e650b6707e45381b2d89ff7e0cdb.tar.bz2
spark-d9c2a89c57d0e650b6707e45381b2d89ff7e0cdb.zip
Support for Hadoop 2 distributions such as cdh4
Diffstat (limited to 'core/src/hadoop1')
-rw-r--r--core/src/hadoop1/scala/org/apache/hadoop/mapred/HadoopMapRedUtil.scala7
-rw-r--r--core/src/hadoop1/scala/org/apache/hadoop/mapreduce/HadoopMapReduceUtil.scala9
2 files changed, 16 insertions, 0 deletions
diff --git a/core/src/hadoop1/scala/org/apache/hadoop/mapred/HadoopMapRedUtil.scala b/core/src/hadoop1/scala/org/apache/hadoop/mapred/HadoopMapRedUtil.scala
new file mode 100644
index 0000000000..ca9f7219de
--- /dev/null
+++ b/core/src/hadoop1/scala/org/apache/hadoop/mapred/HadoopMapRedUtil.scala
@@ -0,0 +1,7 @@
+package org.apache.hadoop.mapred
+
+trait HadoopMapRedUtil {
+ def newJobContext(conf: JobConf, jobId: JobID): JobContext = new JobContext(conf, jobId)
+
+ def newTaskAttemptContext(conf: JobConf, attemptId: TaskAttemptID): TaskAttemptContext = new TaskAttemptContext(conf, attemptId)
+}
diff --git a/core/src/hadoop1/scala/org/apache/hadoop/mapreduce/HadoopMapReduceUtil.scala b/core/src/hadoop1/scala/org/apache/hadoop/mapreduce/HadoopMapReduceUtil.scala
new file mode 100644
index 0000000000..de7b0f81e3
--- /dev/null
+++ b/core/src/hadoop1/scala/org/apache/hadoop/mapreduce/HadoopMapReduceUtil.scala
@@ -0,0 +1,9 @@
+package org.apache.hadoop.mapreduce
+
+import org.apache.hadoop.conf.Configuration
+
+trait HadoopMapReduceUtil {
+ def newJobContext(conf: Configuration, jobId: JobID): JobContext = new JobContext(conf, jobId)
+
+ def newTaskAttemptContext(conf: Configuration, attemptId: TaskAttemptID): TaskAttemptContext = new TaskAttemptContext(conf, attemptId)
+}