hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-17064) GZipCoded doesn't handle zip files
Date Sun, 09 Jul 2017 23:51:00 GMT

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

Andi commented on HIVE-17064:
-----------------------------

indeed. It's just a convenient way of invoking GzipCodec and experimenting with things. The
issue is in GzipCodec, which is part of hadoop-common. 
Is there a better project to log this bug against?

> GZipCoded doesn't handle zip files 
> -----------------------------------
>
>                 Key: HIVE-17064
>                 URL: https://issues.apache.org/jira/browse/HIVE-17064
>             Project: Hive
>          Issue Type: Bug
>          Components: Compression
>    Affects Versions: 2.2.0
>         Environment: OSX 10.12.5
> Native Libraries
> Hadoop 2.8 (Hive 2.2.0)
>            Reporter: Andi
>
> Attempting to read a zip file using GZip Coded created by:
>  >echo "abcdef" | zip > /tmp/a.zip 
> fails, while the same gzip succeeds.
> Code below is scala, run in spark-shell ( 2.1):
> import org.apache.hadoop.io.compress.zlib._
> org.apache.hadoop.io.compress.zlib.ZlibFactory.isNativeZlibLoaded(spark.sparkContext.hadoopConfiguration)
> val in = new java.io.FileInputStream("/tmp/a.zip")
> val gcode = new org.apache.hadoop.io.compress.GzipCodec
> gcode.setConf(spark.sparkContext.hadoopConfiguration)
> val giz = gcode.createInputStream(in)
> val lr = new org.apache.hadoop.util.LineReader(giz)
> val text = new org.apache.hadoop.io.Text
> scala> lr.readLine(text)
> java.io.IOException: incorrect header check
>   at org.apache.hadoop.io.compress.zlib.ZlibDecompressor.inflateBytesDirect(Native Method)
>   at org.apache.hadoop.io.compress.zlib.ZlibDecompressor.decompress(ZlibDecompressor.java:227)
>   at org.apache.hadoop.io.compress.DecompressorStream.decompress(DecompressorStream.java:91)
>   at org.apache.hadoop.io.compress.DecompressorStream.read(DecompressorStream.java:85)
>   at java.io.InputStream.read(InputStream.java:101)
>   at org.apache.hadoop.util.LineReader.readDefaultLine(LineReader.java:211)
>   at org.apache.hadoop.util.LineReader.readLine(LineReader.java:174)
>   at org.apache.hadoop.util.LineReader.readLine(LineReader.java:365)
>   ... 43 elided
> Repeating the same with file created by:
> echo "abcdef" |  gzip > /tmp/a.gz 
> Works as expected



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message