You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2019/08/02 15:26:04 UTC

[hadoop] branch trunk updated: Revert "HADOOP-16336. finish variable is unused in ZStandardCompressor. Contributed by cxorm."

This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 797d14e  Revert "HADOOP-16336. finish variable is unused in ZStandardCompressor. Contributed by cxorm."
797d14e is described below

commit 797d14e8168415fd812d9a43da7eee16e52fb910
Author: Wei-Chiu Chuang <we...@apache.org>
AuthorDate: Fri Aug 2 08:25:41 2019 -0700

    Revert "HADOOP-16336. finish variable is unused in ZStandardCompressor. Contributed by cxorm."
    
    This reverts commit 076618677d3524187e5be4b5401e25a9ca154230.
---
 .../java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java
index 716a198..7445502 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java
@@ -49,7 +49,7 @@ public class ZStandardCompressor implements Compressor {
   private int uncompressedDirectBufOff = 0, uncompressedDirectBufLen = 0;
   private boolean keepUncompressedBuf = false;
   private ByteBuffer compressedDirectBuf = null;
-  private boolean finished;
+  private boolean finish, finished;
   private long bytesRead = 0;
   private long bytesWritten = 0;
 
@@ -180,6 +180,7 @@ public class ZStandardCompressor implements Compressor {
 
   @Override
   public void finish() {
+    finish = true;
   }
 
   @Override
@@ -265,6 +266,7 @@ public class ZStandardCompressor implements Compressor {
   public void reset() {
     checkStream();
     init(level, stream);
+    finish = false;
     finished = false;
     bytesRead = 0;
     bytesWritten = 0;


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org