Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #61 from ekoontz/add-buffer-warning

add LOG.warn() about insufficient io.compression.codec.lzo.buffersize
  • Loading branch information...
commit 0c074675e6b972fb7ab5cf4713abbdf1afd1988e 2 parents 1892f80 + 5c12afd
@rangadi rangadi authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/java/com/hadoop/compression/lzo/LzoDecompressor.java
View
10 src/java/com/hadoop/compression/lzo/LzoDecompressor.java
@@ -201,6 +201,16 @@ public LzoDecompressor() {
}
public synchronized void setInput(byte[] b, int off, int len) {
+ if (!isCurrentBlockUncompressed()) {
+ if (len > directBufferSize) {
+ LOG.warn("Decompression will fail because compressed buffer size :" +
+ len + " is greater than this decompressor's directBufferSize: " +
+ directBufferSize + ". To fix this, increase the value of your " +
+ "configuration's io.compression.codec.lzo.buffersize to be larger " +
+ "than: " + len + ".")
+ }
+ }
+
if (b == null) {
throw new NullPointerException();
}
Please sign in to comment.
Something went wrong with that request. Please try again.