Example usage for org.apache.cassandra.hadoop ConfigHelper getOutputCompressionChunkLength

List of usage examples for org.apache.cassandra.hadoop ConfigHelper getOutputCompressionChunkLength

Introduction

In this page you can find the example usage for org.apache.cassandra.hadoop ConfigHelper getOutputCompressionChunkLength.

Prototype

public static String getOutputCompressionChunkLength(Configuration conf) 

Source Link

Usage

From source file:andromache.config.CassandraConfigHelper.java

License:Apache License

public static CompressionParameters getOutputCompressionParamaters(Configuration conf) {
    if (ConfigHelper.getOutputCompressionClass(conf) == null)
        return new CompressionParameters(null);

    Map<String, String> options = new HashMap<String, String>();
    options.put(CompressionParameters.SSTABLE_COMPRESSION, ConfigHelper.getOutputCompressionClass(conf));
    options.put(CompressionParameters.CHUNK_LENGTH_KB, ConfigHelper.getOutputCompressionChunkLength(conf));

    try {//from  ww  w. j  av  a  2  s  .c o  m
        return CompressionParameters.create(options);
    } catch (ConfigurationException e) {
        throw new RuntimeException(e);
    }
}