avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandy Ryza (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1175) BinaryData keeps a thread local reference after completing a compare, preventing compared arrays from being GC'd
Date Fri, 28 Sep 2012 17:23:08 GMT

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

Sandy Ryza commented on AVRO-1175:
----------------------------------

Looking again, it seems like the merging code expects the comparator to be stateless, and
creating a new comparator each time the merger is done with a segment would require some heavy
rearranging.  To get a around this, the AvroKeyComparator could create a new BinaryData.Comparator
for each compare, but that would defeat the original purpose of the caching?  Any guidance
on what can/should be done on the map reduce side, Todd?
                
> BinaryData keeps a thread local reference after completing a compare, preventing compared
arrays from being GC'd
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: AVRO-1175
>                 URL: https://issues.apache.org/jira/browse/AVRO-1175
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.2
>            Reporter: Sandy Ryza
>            Assignee: Doug Cutting
>
> BinaryData holds on to BinaryDecoders as thread local variables (so it doesn't have to
make new ones for each compare?).  When a compare is completed, the BinaryDecoder still keeps
a reference to the ByteArrayByteSource, which stops its underlying byte array from being garbage
collected.
> This is causing an OutOfMemoryError in reducers when shuffling with MR2.

--
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

Mime
View raw message