Skip to content
This repository
Browse code

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
Raghu Angadi rangadi authored

Showing 1 changed file with 10 additions and 0 deletions. Show diff stats Hide diff stats

  1. +10 0 src/java/com/hadoop/compression/lzo/LzoDecompressor.java
10 src/java/com/hadoop/compression/lzo/LzoDecompressor.java
@@ -201,6 +201,16 @@ public LzoDecompressor() {
201 201 }
202 202
203 203 public synchronized void setInput(byte[] b, int off, int len) {
  204 + if (!isCurrentBlockUncompressed()) {
  205 + if (len > directBufferSize) {
  206 + LOG.warn("Decompression will fail because compressed buffer size :" +
  207 + len + " is greater than this decompressor's directBufferSize: " +
  208 + directBufferSize + ". To fix this, increase the value of your " +
  209 + "configuration's io.compression.codec.lzo.buffersize to be larger " +
  210 + "than: " + len + ".")
  211 + }
  212 + }
  213 +
204 214 if (b == null) {
205 215 throw new NullPointerException();
206 216 }

0 comments on commit 0c07467

Please sign in to comment.
Something went wrong with that request. Please try again.