Github user CodingCat commented on a diff in the pull request: https://github.com/apache/spark/pull/101#discussion_r10548392 --- Diff: core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala --- @@ -165,12 +174,29 @@ class HadoopRDD[K, V]( override def compute(theSplit: Partition, context: TaskContext) = { val iter = new NextIterator[(K, V)] { + + private def localizeConfiguration(conf: JobConf) { + //generate job id + val stageId = context.stageId + val dummyJobTrackerID = new SimpleDateFormat("yyyyMMddHHmm").format(createTime) + val jobId = new JobID(dummyJobTrackerID, stageId) + val splitID = theSplit.index + val attemptId = (context.attemptId % Int.MaxValue).toInt + val taId = new TaskAttemptID(new TaskID(jobId, true, splitID), attemptId) + + conf.set("mapred.tip.id", taId.getTaskID.toString) + conf.set("mapred.task.id", taId.toString) + conf.setBoolean("mapred.task.is.map", true) + conf.setInt("mapred.task.partition", splitID) + conf.set("mapred.job.id", jobId.toString) + } + val split = theSplit.asInstanceOf[HadoopPartition] logInfo("Input split: " + split.inputSplit) var reader: RecordReader[K, V] = null - val jobConf = getJobConf() val inputFormat = getInputFormat(jobConf) + localizeConfiguration(jobConf) --- End diff -- I mean adding some configurations which are local to the certain task....
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---