You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/01/21 20:01:20 UTC

[GitHub] [iceberg] cipriangerea opened a new issue #3950: ParquetWriter leaks memory

cipriangerea opened a new issue #3950:
URL: https://github.com/apache/iceberg/issues/3950


   The constructor for ParquetWriter is allocating a compressor at https://github.com/linkedin/iceberg/blob/master/parquet/src/main/java/org/apache/iceberg/parquet/ParquetWriter.java#L92
   
   The compressor needs to be released once the writer is closed. If this doesn't happen we are leaking the native memory associated with the compressor.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] renshangtao commented on issue #3950: ParquetWriter leaks memory

Posted by GitBox <gi...@apache.org>.
renshangtao commented on issue #3950:
URL: https://github.com/apache/iceberg/issues/3950#issuecomment-1068138868


   Hi , i got the same question with you.
   I use flink session mode to run some job,and after several jobs finished , i used top command to see the memory of linux,i foud the memory is only a little left,and the taskmanager will be kill by the Linux because of oom
   
   
   But i get what you have modify, and test again, the question is also here.
   
   I see the code 
   HeapBytesCompressor(CompressionCodecName codecName) {
         this.codecName = codecName;
         this.codec = getCodec(codecName);
         if (codec != null) {
           this.compressor = CodecPool.getCompressor(codec);
           this.compressedOutBuffer = new ByteArrayOutputStream(pageSize);
         } else {
           this.compressor = null;
           this.compressedOutBuffer = null;
         }
       }
   
   public ByteArrayOutputStream(int size) {
           if (size < 0) {
               throw new IllegalArgumentException("Negative initial size: "
                                                  + size);
           }
           buf = new byte[size];                    //here it only new size byte of memroy needn't free
       }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org