This is an automated email from the ASF dual-hosted git repository.
jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git
The following commit(s) were added to refs/heads/master by this push:
new 30b22b87f [AMORO-6789]Memory leaks when using mix -hive format to
write parquet files. (#2820)
30b22b87f is described below
commit 30b22b87fea719eb0cd4b7651eade7e6302d2f16
Author: Nico CHen <[email protected]>
AuthorDate: Thu May 9 09:44:32 2024 +0800
[AMORO-6789]Memory leaks when using mix -hive format to write parquet
files. (#2820)
---
.../java/org/apache/iceberg/parquet/AdaptHiveParquetWriter.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/amoro-mixed-format/amoro-mixed-format-hive/src/main/java/org/apache/iceberg/parquet/AdaptHiveParquetWriter.java
b/amoro-mixed-format/amoro-mixed-format-hive/src/main/java/org/apache/iceberg/parquet/AdaptHiveParquetWriter.java
index 495a5d6bc..54f1dd0a5 100644
---
a/amoro-mixed-format/amoro-mixed-format-hive/src/main/java/org/apache/iceberg/parquet/AdaptHiveParquetWriter.java
+++
b/amoro-mixed-format/amoro-mixed-format-hive/src/main/java/org/apache/iceberg/parquet/AdaptHiveParquetWriter.java
@@ -228,7 +228,12 @@ class AdaptHiveParquetWriter<T> implements
FileAppender<T>, Closeable {
this.closed = true;
flushRowGroup(true);
writeStore.close();
- writer.end(metadata);
+ if (writer != null) {
+ writer.end(metadata);
+ }
+ if (compressor != null) {
+ compressor.release();
+ }
}
}
}