Skip to content

Commit 8650174

Browse files
authored
Merge pull request apache-spark-on-k8s#408 from palantir/rk/propagate-tc
Propagate task context in parquet schema merging code
2 parents 796d09d + ef34c77 commit 8650174

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormat.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,10 @@ object ParquetFileFormat extends Logging {
622622
conf: Configuration,
623623
partFiles: Seq[FileStatus],
624624
ignoreCorruptFiles: Boolean): Seq[Footer] = {
625+
val taskContext = TaskContext.get()
625626
ThreadUtils.parmap(partFiles, "readingParquetFooters", 8) { currentFile =>
626627
try {
628+
TaskContext.setTaskContext(taskContext)
627629
// Skips row group information since we only need the schema.
628630
// ParquetFileReader.readFooter throws RuntimeException, instead of IOException,
629631
// when it can't read the footer.

0 commit comments

Comments
 (0)