You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Chris Douglas (JIRA)" <ji...@apache.org> on 2017/11/06 20:23:00 UTC
[jira] [Updated] (HADOOP-8522) ResetableGzipOutputStream creates
invalid gzip files when finish() and resetState() are used
[ https://issues.apache.org/jira/browse/HADOOP-8522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Douglas updated HADOOP-8522:
----------------------------------
Attachment: HADOOP-8522.05.patch
Rebased patch. Looking at the RFC, it shouldn't be a problem to hard-code the header instead of creating a stream to extract the 10 bytes. Also updated {{resetState}} to be idempotent.
[~mpercy] does this look OK to you? If so, I'll commit this.
> ResetableGzipOutputStream creates invalid gzip files when finish() and resetState() are used
> --------------------------------------------------------------------------------------------
>
> Key: HADOOP-8522
> URL: https://issues.apache.org/jira/browse/HADOOP-8522
> Project: Hadoop Common
> Issue Type: Bug
> Components: io
> Affects Versions: 1.0.3, 2.0.0-alpha
> Reporter: Mike Percy
> Assignee: Mike Percy
> Labels: BB2015-05-TBR
> Attachments: HADOOP-8522-4.patch, HADOOP-8522.05.patch
>
>
> ResetableGzipOutputStream creates invalid gzip files when finish() and resetState() are used. The issue is that finish() flushes the compressor buffer and writes the gzip CRC32 + data length trailer. After that, resetState() does not repeat the gzip header, but simply starts writing more deflate-compressed data. The resultant files are not readable by the Linux "gunzip" tool. ResetableGzipOutputStream should write valid multi-member gzip files.
> The gzip format is specified in [RFC 1952|https://tools.ietf.org/html/rfc1952].
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org