From 797d14e8168415fd812d9a43da7eee16e52fb910 Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Fri, 2 Aug 2019 08:25:41 -0700 Subject: [PATCH] Revert "HADOOP-16336. finish variable is unused in ZStandardCompressor. Contributed by cxorm." This reverts commit 076618677d3524187e5be4b5401e25a9ca154230. --- .../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 716a19886f8..7445502c989 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;