Revert "HADOOP-16336. finish variable is unused in ZStandardCompressor. Contributed by cxorm."

This reverts commit 076618677d.
This commit is contained in:
Wei-Chiu Chuang 2019-08-02 08:25:41 -07:00
parent 54ac80176e
commit 797d14e816
1 changed files with 3 additions and 1 deletions

View File

@ -49,7 +49,7 @@ public class ZStandardCompressor implements Compressor {
private int uncompressedDirectBufOff = 0, uncompressedDirectBufLen = 0; private int uncompressedDirectBufOff = 0, uncompressedDirectBufLen = 0;
private boolean keepUncompressedBuf = false; private boolean keepUncompressedBuf = false;
private ByteBuffer compressedDirectBuf = null; private ByteBuffer compressedDirectBuf = null;
private boolean finished; private boolean finish, finished;
private long bytesRead = 0; private long bytesRead = 0;
private long bytesWritten = 0; private long bytesWritten = 0;
@ -180,6 +180,7 @@ public class ZStandardCompressor implements Compressor {
@Override @Override
public void finish() { public void finish() {
finish = true;
} }
@Override @Override
@ -265,6 +266,7 @@ public class ZStandardCompressor implements Compressor {
public void reset() { public void reset() {
checkStream(); checkStream();
init(level, stream); init(level, stream);
finish = false;
finished = false; finished = false;
bytesRead = 0; bytesRead = 0;
bytesWritten = 0; bytesWritten = 0;