aboutsummaryrefslogtreecommitdiff
path: root/core/src/hadoop2/scala/org/apache/hadoop/mapreduce/HadoopMapReduceUtil.scala
blob: 7fdbe322fdf0ba50d1f62de502247f4991fbf16c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
package org.apache.hadoop.mapreduce

import org.apache.hadoop.conf.Configuration
import task.{TaskAttemptContextImpl, JobContextImpl}

trait HadoopMapReduceUtil {
  def newJobContext(conf: Configuration, jobId: JobID): JobContext = new JobContextImpl(conf, jobId)

  def newTaskAttemptContext(conf: Configuration, attemptId: TaskAttemptID): TaskAttemptContext = new TaskAttemptContextImpl(conf, attemptId)

  def newTaskAttemptID(jtIdentifier: String, jobId: Int, isMap: Boolean, taskId: Int, attemptId: Int) = new TaskAttemptID(jtIdentifier,
    jobId, isMap, taskId, attemptId)
}