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

Misha Dmitriev commented on OOZIE-3250:
---------------------------------------

I agree with [~gezapeti] wrt. the needed changes to the test. Arrays.equals() 
compares the _contents_ of two arrays, i.e. we can have ar1 != ar2, but 
Arrays.equals(ar1, ar2). So it's exactly opposite of what we need in this test, 
because we really want to achieve ar1 == ar2 after internalization of ar1 and 
ar2. So please replace Arrays.equals() with '==' and maybe furthermore add a 
similar check, but with !=, for arrays before internalization, same as done in 
my original example. This will hopefully remove some confusion for the future 
maintainers of this code.

 

> Reduce heap waste by reducing duplicate byte[] count
> ----------------------------------------------------
>
>                 Key: OOZIE-3250
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3250
>             Project: Oozie
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 5.0.0
>            Reporter: Andras Piros
>            Assignee: Andras Piros
>            Priority: Major
>         Attachments: OOZIE-3250.001.patch, OOZIE-3250.002.patch
>
>
> Similar to OOZIE-3232, we also need to intern the {{byte[]}} field values 
> within 
> [*{{BinaryBlob}}*|https://github.com/apache/oozie/blob/master/core/src/main/java/org/apache/oozie/BinaryBlob.java#L32-L33]
>  and 
> [*{{StringBlob}}*|https://github.com/apache/oozie/blob/master/core/src/main/java/org/apache/oozie/StringBlob.java#L34]
>  to reduce heap waste caused by duplicate {{byte[]}} entries.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to