Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Decompressor's finished() fix #2

Open
wants to merge 1 commit into from

3 participants

@Shmuma

Without this, hbase 0.90.4-cdh3u2 produces lots of warnings "org.apache.hadoop.hbase.io.hfile.Compression: Deompressor obtained from CodecPool is already finished()"

@c0s

Wow, good catch! Thanks for submitting the fix. I will test it and then merge.
Please drop me a line if you have a second ;)

@omalley

This will fail to mark a finished, 0-byte stream as finished.

My version of the fix is at:

hortonworks/hadoop-lzo@729bcc3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/org/anarres/lzo/hadoop/codec/LzoDecompressor.java
View
2  src/org/anarres/lzo/hadoop/codec/LzoDecompressor.java
@@ -205,6 +205,8 @@ public boolean needsDictionary() {
@Override
public boolean finished() {
// logState("Before finished");
+ if (outputBufferLen.value == 0 && outputBufferPos == 0)
+ return false;
return outputBufferLen.value <= 0;
// return false;
}
Something went wrong with that request. Please try again.