Skip to content
Snippets Groups Projects
Commit f725b2ec authored by tedyu's avatar tedyu Committed by Andrew Or
Browse files

[SPARK-12056][CORE] Part 2 Create a TaskAttemptContext only after calling setConf

This is continuation of SPARK-12056 where change is applied to SqlNewHadoopRDD.scala

andrewor14
FYI

Author: tedyu <yuzhihong@gmail.com>

Closes #10164 from tedyu/master.
parent 840bd2e0
No related branches found
No related tags found
No related merge requests found
......@@ -148,14 +148,14 @@ private[spark] class SqlNewHadoopRDD[V: ClassTag](
}
inputMetrics.setBytesReadCallback(bytesReadCallback)
val attemptId = newTaskAttemptID(jobTrackerId, id, isMap = true, split.index, 0)
val hadoopAttemptContext = newTaskAttemptContext(conf, attemptId)
val format = inputFormatClass.newInstance
format match {
case configurable: Configurable =>
configurable.setConf(conf)
case _ =>
}
val attemptId = newTaskAttemptID(jobTrackerId, id, isMap = true, split.index, 0)
val hadoopAttemptContext = newTaskAttemptContext(conf, attemptId)
private[this] var reader: RecordReader[Void, V] = null
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment