Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ class FileBatchWrite(
}

override def createBatchWriterFactory(): DataWriterFactory = {
val conf = new SerializableConfiguration(job.getConfiguration)
FileWriterFactory(description, committer, conf)
FileWriterFactory(description, committer)
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import org.apache.spark.util.SerializableConfiguration

case class FileWriterFactory (
description: WriteJobDescription,
committer: FileCommitProtocol,
conf: SerializableConfiguration) extends DataWriterFactory {
committer: FileCommitProtocol) extends DataWriterFactory {
override def createWriter(partitionId: Int, realTaskId: Long): DataWriter[InternalRow] = {
val taskAttemptContext = createTaskAttemptContext(partitionId)
committer.setupTask(taskAttemptContext)
Expand All @@ -46,7 +45,7 @@ case class FileWriterFactory (
val taskId = new TaskID(jobId, TaskType.MAP, partitionId)
val taskAttemptId = new TaskAttemptID(taskId, 0)
// Set up the configuration object
val hadoopConf = conf.value
val hadoopConf = description.serializableHadoopConf.value
hadoopConf.set("mapreduce.job.id", jobId.toString)
hadoopConf.set("mapreduce.task.id", taskId.toString)
hadoopConf.set("mapreduce.task.attempt.id", taskAttemptId.toString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,8 @@ class OrcPartitionDiscoverySuite extends OrcPartitionDiscoveryTest with SharedSQ

class OrcV1PartitionDiscoverySuite extends OrcPartitionDiscoveryTest with SharedSQLContext {
override protected def sparkConf: SparkConf =
super.sparkConf.set(SQLConf.USE_V1_SOURCE_READER_LIST, "orc")
super
.sparkConf
.set(SQLConf.USE_V1_SOURCE_READER_LIST, "orc")
.set(SQLConf.USE_V1_SOURCE_WRITER_LIST, "orc")
}
Original file line number Diff line number Diff line change
Expand Up @@ -690,5 +690,8 @@ class OrcQuerySuite extends OrcQueryTest with SharedSQLContext {

class OrcV1QuerySuite extends OrcQuerySuite {
override protected def sparkConf: SparkConf =
super.sparkConf.set(SQLConf.USE_V1_SOURCE_READER_LIST, "orc")
super
.sparkConf
.set(SQLConf.USE_V1_SOURCE_READER_LIST, "orc")
.set(SQLConf.USE_V1_SOURCE_WRITER_LIST, "orc")
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ import org.apache.spark.sql.internal.SQLConf
class OrcV1FilterSuite extends OrcFilterSuite {

override protected def sparkConf: SparkConf =
super.sparkConf.set(SQLConf.USE_V1_SOURCE_READER_LIST, "orc")
super
.sparkConf
.set(SQLConf.USE_V1_SOURCE_READER_LIST, "orc")
.set(SQLConf.USE_V1_SOURCE_WRITER_LIST, "orc")

override def checkFilterPredicate(
df: DataFrame,
Expand Down