Examples of LZ4Compressor


Examples of org.apache.hadoop.io.compress.lz4.Lz4Compressor

    int bufferSize = 262144;
    int compressionOverhead = (bufferSize / 6) + 32;
    try {
      DataOutputBuffer compressedDataBuffer = new DataOutputBuffer();
      CompressionOutputStream deflateFilter = new BlockCompressorStream(
          compressedDataBuffer, new Lz4Compressor(bufferSize), bufferSize,
          compressionOverhead);
      deflateOut = new DataOutputStream(new BufferedOutputStream(deflateFilter));
      deflateOut.write(bytes, 0, bytes.length);
      deflateOut.flush();
      deflateFilter.finish();
View Full Code Here

Examples of org.apache.hadoop.io.compress.lz4.Lz4Compressor

    }
    int bufferSize = conf.getInt(
        IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_KEY,
        IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_DEFAULT);
    System.out.println("Create Lz4hc codec");
    return new Lz4Compressor(bufferSize, true);
  }
View Full Code Here

Examples of org.apache.hadoop.io.compress.lz4.Lz4Compressor

        IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_KEY,
        IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_DEFAULT);
    boolean useLz4HC = conf.getBoolean(
        IO_COMPRESSION_CODEC_LZ4_USELZ4HC_KEY,
        IO_COMPRESSION_CODEC_LZ4_USELZ4HC_DEFAULT);
    return new Lz4Compressor(bufferSize, useLz4HC);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.