You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by xu...@apache.org on 2022/04/19 10:30:09 UTC
[hudi] 01/11: [MINOR] Removing invalid code to close parquet reader iterator (#5182)
This is an automated email from the ASF dual-hosted git repository.
xushiyan pushed a commit to branch release-0.11.0
in repository https://gitbox.apache.org/repos/asf/hudi.git
commit d886e9eb8df9d74d2b8a00a98e851704af183364
Author: Sivabalan Narayanan <n....@gmail.com>
AuthorDate: Fri Apr 15 14:50:07 2022 -0400
[MINOR] Removing invalid code to close parquet reader iterator (#5182)
---
.../src/main/scala/org/apache/hudi/HoodieBaseRelation.scala | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala
index c33c6dce6d..769016ca8a 100644
--- a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala
+++ b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala
@@ -422,13 +422,7 @@ object HoodieBaseRelation {
partitionedFile => {
val extension = FSUtils.getFileExtension(partitionedFile.filePath)
if (HoodieFileFormat.PARQUET.getFileExtension.equals(extension)) {
- val iter = parquetReader.apply(partitionedFile)
- if (iter.isInstanceOf[Closeable]) {
- // register a callback to close parquetReader which will be executed on task completion.
- // when tasks finished, this method will be called, and release resources.
- Option(TaskContext.get()).foreach(_.addTaskCompletionListener[Unit](_ => iter.asInstanceOf[Closeable].close()))
- }
- iter
+ parquetReader.apply(partitionedFile)
} else if (HoodieFileFormat.HFILE.getFileExtension.equals(extension)) {
hfileReader.apply(partitionedFile)
} else {