[ 
https://issues.apache.org/jira/browse/OOZIE-1186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561093#comment-13561093
 ] 

Virag Kothari commented on OOZIE-1186:
--------------------------------------

>From the java docs, dispose() is not required when paint() method of component 
>is used 
>(http://docs.oracle.com/javase/6/docs/api/java/awt/Graphics.html#dispose())
>From the below code, it seems like construction of BufferedImage can occupy 
>lot of memory if d.width and d.height are huge as each pixel is an int.
{code}
 BufferedImage img = new BufferedImage(d.width, d.height, 
BufferedImage.TYPE_INT_RGB);
{code}
I dont think img.flush() will free this databuffer holding the pixel data. 
(http://docs.oracle.com/javase/6/docs/api/java/awt/Image.html#flush())
So, I am not sure which portion of the patch is actually releasing the 
resources and making a difference in memory consumption.
It seems creation of BufferedImage itself can lead to OOM if multiple servlets 
are creating this image simultaneously.



 

 

                
> Image load for Job DAG visualization should handle resources better
> -------------------------------------------------------------------
>
>                 Key: OOZIE-1186
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1186
>             Project: Oozie
>          Issue Type: Bug
>    Affects Versions: trunk, 3.3.1
>            Reporter: Mona Chitnis
>            Assignee: Mona Chitnis
>             Fix For: trunk, 3.3.1
>
>         Attachments: OOZIE-1186.patch
>
>
> The Job DAG visualization loads an image into memory to be streamed on 
> outputstream. However, it does not free up memory and I/O resources leading 
> to 'Out of Java heap space' errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to