Search in sources :

Example 11 with Lz4Decompressor

use of io.airlift.compress.lz4.Lz4Decompressor in project hadoop by apache.

the class TestLz4CompressorDecompressor method testDecompressorCompressNullPointerException.

//test on NullPointerException in {@code decompressor.decompress()}  
@Test
public void testDecompressorCompressNullPointerException() {
    try {
        Lz4Decompressor decompressor = new Lz4Decompressor();
        byte[] bytes = generate(1024 * 6);
        decompressor.setInput(bytes, 0, bytes.length);
        decompressor.decompress(null, 0, 0);
        fail("testDecompressorCompressNullPointerException error !!!");
    } catch (NullPointerException ex) {
    // expected
    } catch (Exception e) {
        fail("testDecompressorCompressNullPointerException ex error !!!");
    }
}
Also used : Lz4Decompressor(org.apache.hadoop.io.compress.lz4.Lz4Decompressor) IOException(java.io.IOException) Test(org.junit.Test)

Aggregations

Lz4Decompressor (org.apache.hadoop.io.compress.lz4.Lz4Decompressor)9 Test (org.junit.Test)9 IOException (java.io.IOException)7 Lz4Compressor (org.apache.hadoop.io.compress.lz4.Lz4Compressor)5 Lz4Decompressor (io.airlift.compress.lz4.Lz4Decompressor)2 BlockCompressorStream (org.apache.hadoop.io.compress.BlockCompressorStream)2 BlockDecompressorStream (org.apache.hadoop.io.compress.BlockDecompressorStream)2 SnappyCompressor (org.apache.hadoop.io.compress.snappy.SnappyCompressor)2 SnappyDecompressor (org.apache.hadoop.io.compress.snappy.SnappyDecompressor)2 DeflateCompressor (com.facebook.presto.orc.zlib.DeflateCompressor)1 InflateDecompressor (com.facebook.presto.orc.zlib.InflateDecompressor)1 ZstdJniCompressor (com.facebook.presto.orc.zstd.ZstdJniCompressor)1 ZstdJniDecompressor (com.facebook.presto.orc.zstd.ZstdJniDecompressor)1 PrestoException (com.facebook.presto.spi.PrestoException)1 PageCompressor (com.facebook.presto.spi.page.PageCompressor)1 PageDecompressor (com.facebook.presto.spi.page.PageDecompressor)1 PagesSerde (com.facebook.presto.spi.page.PagesSerde)1 Lz4Compressor (io.airlift.compress.lz4.Lz4Compressor)1 SnappyCompressor (io.airlift.compress.snappy.SnappyCompressor)1 SnappyDecompressor (io.airlift.compress.snappy.SnappyDecompressor)1