[ 
https://issues.apache.org/jira/browse/HADOOP-9233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Lowe updated HADOOP-9233:
-------------------------------

    Status: Open  (was: Patch Available)

Thanks for the update, Vadim.  Another issue I ran into while trying out the 
patch is running the unit tests when native code support is not compiled.  
TestCompressorDecompressor fails in this case:

{noformat}
java.lang.UnsatisfiedLinkError: 
org.apache.hadoop.io.compress.zlib.ZlibCompressor.init(III)J
        at org.apache.hadoop.io.compress.zlib.ZlibCompressor.init(Native Method)
        at 
org.apache.hadoop.io.compress.zlib.ZlibCompressor.<init>(ZlibCompressor.java:228)
        at 
org.apache.hadoop.io.compress.zlib.ZlibCompressor.<init>(ZlibCompressor.java:198)
        at 
org.apache.hadoop.io.compress.TestCompressorDecompressor.testCompressorDecompressor(TestCompressorDecompressor.java:44)
{noformat}

We can't construct a {{ZlibCompressor}} or {{ZlibDecompressor}} without native 
code support, which is why {{ZlibFactory}} hides this in its 
{{getZlibCompressor}} and {{getZlibDecompressor}} methods.  We either need to 
use those methods (with conf settings to get the two types we want) or have the 
code conditionally exclude the native codec support based on 
{{ZLibFactory#isNativeZlibLoaded}}.

Arguably the acceptor function should also be checking this otherwise we run 
the risk of the native code being loaded but zlib libraries are for some reason 
unavailable.
                
> Cover package org.apache.hadoop.compress.zlib with unit tests
> -------------------------------------------------------------
>
>                 Key: HADOOP-9233
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9233
>             Project: Hadoop Common
>          Issue Type: Test
>    Affects Versions: 2.0.3-alpha, 3.0.0, 0.23.6
>            Reporter: Vadim Bondarev
>            Assignee: Vadim Bondarev
>         Attachments: HADOOP-9233-branch-0.23-b.patch, 
> HADOOP-9233-branch-2-a.patch, HADOOP-9233-branch-2-b.patch, 
> HADOOP-9233-trunk-a.patch, HADOOP-9233-trunk-b.patch, 
> HADOOP-9233-trunk-c.patch
>
>


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

Reply via email to