Example usage for org.apache.cassandra.dht RandomPartitioner RandomPartitioner

List of usage examples for org.apache.cassandra.dht RandomPartitioner RandomPartitioner

Introduction

In this page you can find the example usage for org.apache.cassandra.dht RandomPartitioner RandomPartitioner.

Prototype

RandomPartitioner

Source Link

Usage

From source file:com.fullcontact.sstable.hadoop.mapreduce.SSTableRecordReader.java

License:Apache License

protected AbstractPartitioner getPartitioner() {
    return new RandomPartitioner();
}

From source file:org.pentaho.di.trans.steps.cassandrasstableoutput.SSTableWriter.java

License:Apache License

/**
 * Initialization. Creates target directory if needed and establishes 
 * the writer/*from  ww w  .j  a  v  a 2 s. c om*/
 * 
 * @throws Exception if a problem occurs
 */
public void init() throws Exception {
    File directory = new File(this.directory);

    if (!directory.exists()) {
        directory.mkdir();
    }
    try {
        writer = new SSTableSimpleUnsortedWriter(directory, new RandomPartitioner(), keyspace, columnFamily,
                AsciiType.instance, null, bufferSize);
    } catch (Throwable t) {
        throw new KettleException("Failed to create SSTableSimpleUnsortedWriter", t);
    }
}