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

Ryan Skraba commented on AVRO-3590:
-----------------------------------

Hello!  Can you help clarify what's happening in this change?  I think I'm 
missing something!

How is it possible that the static initializer making 
*{{SnappyCodec.INSTANCE}}* can see the snappy library and return an the 
non-null Option and SnappyCodec, but the static initializer in 
*{{CodecFactory}}* can't?  Is there some sort of ClassLoader oddness happening 
between the two?

If it's the case, it definitely should be fixed!  Is there a corresponding 
Flink Jira for example?

> Fix the problem that CodeFactory is null when specifying snappy format when 
> java Client compresses data
> -------------------------------------------------------------------------------------------------------
>
>                 Key: AVRO-3590
>                 URL: https://issues.apache.org/jira/browse/AVRO-3590
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.10.0
>            Reporter: xingyuan cheng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.10.0
>
>         Attachments: image-2022-07-27-16-10-17-970.png, 
> image-2022-07-27-16-10-33-410.png, image-2022-07-27-16-10-42-262.png, 
> image-2022-07-27-16-11-46-218.png
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> When flink-avro writes data in batches based on the avro format, the general 
> user will specify snappy compression. However, in the avro-1.10.0 version, 
> the Codec and CodeFactory are returned by directly applying for the object, 
> so that the user cannot obtain it Information for SnappyCodec.
> I refer to the practice of ```NullCodec```, changing it to a global variable 
> way will work fine
>  
> !image-2022-07-27-16-10-17-970.png!
>  
> Before repair:
> !image-2022-07-27-16-10-42-262.png!
>  
>  
> after Repair:
>  
> !image-2022-07-27-16-11-46-218.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to