[ 
https://issues.apache.org/jira/browse/HADOOP-6803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874880#action_12874880
 ] 

Eli Collins commented on HADOOP-6803:
-------------------------------------

I figured it out. In the earlier change I had remove the synchronized modifier 
from ZlibCompressor#finished which would cause the jvm to miss the update from 
the jni code.  

> Add native gzip read/write coverage to TestCodec 
> -------------------------------------------------
>
>                 Key: HADOOP-6803
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6803
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: io
>    Affects Versions: 0.22.0
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>             Fix For: 0.22.0
>
>         Attachments: hadoop-6803-1.patch, hadoop-6803-2.patch
>
>
> Looking at ZlibCompressor I noticed that the finished member is never 
> modified, and is therefore always false. This means ZlibCompressor#finished 
> will always return false so CompressorStream#close loops indefinitely in 
> finish:
> {code} 
>       while (!compressor.finished()) {
>         compress();
>       }
> {code}
> I modifed TestCodec#testGzipCodecWrite to also cover writing using the native 
> lib and confirmed the hang with jstack. The fix is simple, ZlibCompressor 
> should record when it's been finished.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to