avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zoltan Farkas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1707) Java serialization readers/writers in generated Jaca classes
Date Mon, 20 Jul 2015 21:49:04 GMT

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

Zoltan Farkas commented on AVRO-1707:

I propose:

1) Making this reference to the creator thread a SoftReference, this way we do not hold onto
this thread instance past its expiration date...
2) make these readers/writers which are only used for java serialization Lazy, this way users
who do not use java serialization do not pay the class loading penalty to initialize this
reader/writer pair...



> Java serialization readers/writers in generated Jaca classes
> ------------------------------------------------------------
>                 Key: AVRO-1707
>                 URL: https://issues.apache.org/jira/browse/AVRO-1707
>             Project: Avro
>          Issue Type: Improvement
>    Affects Versions: 1.8.0
>            Reporter: Zoltan Farkas
> the following static instances are declared in the generated classes:
>   private static final org.apache.avro.io.DatumWriter
>     WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);  
>   private static final org.apache.avro.io.DatumReader
>     READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);  
>  the reaser/writer hold on to a reference to the "Creator Thread":
> "private final Thread creator;"
> which inhibits GC-ing thread locals... for this thread...

This message was sent by Atlassian JIRA

View raw message