Example usage for org.apache.cassandra.dht IPartitioner getMinimumToken

List of usage examples for org.apache.cassandra.dht IPartitioner getMinimumToken

Introduction

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

Prototype

public Token getMinimumToken();

Source Link

Usage

From source file:com.stratio.deep.cassandra.thrift.ThriftRangeUtils.java

License:Apache License

/**
 * Builds a new {@link ThriftRangeUtils}.
 *
 * @param partitioner  the partitioner./* w ww  .j a  va2 s.c  om*/
 * @param host         the host address.
 * @param rpcPort      the host RPC port.
 * @param keyspace     the keyspace name.
 * @param columnFamily the column family name.
 * @param splitSize    the number of rows per split.
 */
public ThriftRangeUtils(IPartitioner partitioner, String host, int rpcPort, String keyspace,
        String columnFamily, int splitSize) {
    this.host = host;
    this.rpcPort = rpcPort;
    this.splitSize = splitSize;
    this.keyspace = keyspace;
    this.columnFamily = columnFamily;
    tokenType = partitioner.getTokenValidator();
    tokenFactory = partitioner.getTokenFactory();
    minToken = (Comparable) partitioner.getMinimumToken().token;
}