[ 
https://issues.apache.org/jira/browse/HADOOP-17825?focusedWorklogId=637885&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-637885
 ]

ASF GitHub Bot logged work on HADOOP-17825:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Aug/21 20:43
            Start Date: 13/Aug/21 20:43
    Worklog Time Spent: 10m 
      Work Description: sunchao commented on a change in pull request #3250:
URL: https://github.com/apache/hadoop/pull/3250#discussion_r688770891



##########
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCodec.java
##########
@@ -882,26 +908,28 @@ private void testGzipCodecWrite(boolean useNative) throws 
IOException {
 
     BufferedWriter w = null;
     Compressor gzipCompressor = CodecPool.getCompressor(codec);
-    if (null != gzipCompressor) {
-      // If it gives us back a Compressor, we should be able to use this
-      // to write files we can then read back with Java's gzip tools.
-      OutputStream os = new CompressorStream(new FileOutputStream(fileName),
-          gzipCompressor);
-      w = new BufferedWriter(new OutputStreamWriter(os));
-      w.write(msg);
-      w.close();
-      CodecPool.returnCompressor(gzipCompressor);
-
-      verifyGzipFile(fileName, msg);
-    }
-
-    // Create a gzip text file via codec.getOutputStream().

Review comment:
       oh I mean the original test with comment "// Create a gzip text file via 
codec.getOutputStream()." I think we should change it to use multi-write too.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 637885)
    Time Spent: 22h 50m  (was: 22h 40m)

> Add BuiltInGzipCompressor
> -------------------------
>
>                 Key: HADOOP-17825
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17825
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: L. C. Hsieh
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 22h 50m
>  Remaining Estimate: 0h
>
> Currently, GzipCodec only supports BuiltInGzipDecompressor, if native zlib is 
> not loaded. So, without Hadoop native codec installed, saving SequenceFile 
> using GzipCodec will throw exception like "SequenceFile doesn't work with 
> GzipCodec without native-hadoop code!"
> Same as other codecs which we migrated to using prepared packages (lz4, 
> snappy), it will be better if we support GzipCodec generally without Hadoop 
> native codec installed. Similar to BuiltInGzipDecompressor, we can use Java 
> Deflater to support BuiltInGzipCompressor.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to