Skip to content

Commit

Permalink
[SPARK-12056][CORE] Part 2 Create a TaskAttemptContext only after cal…
Browse files Browse the repository at this point in the history
…ling setConf

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

andrewor14
FYI

Author: tedyu <[email protected]>

Closes apache#10164 from tedyu/master.
  • Loading branch information
tedyu authored and Andrew Or committed Dec 16, 2015
1 parent 840bd2e commit f725b2e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down

0 comments on commit f725b2e

Please sign in to comment.