This page describes an older version of the product. The latest stable version is 16.4.

Hector Client


A wrapper around the Hector Library used for communicating with Cassandra.

This component is used by both the Cassandra Space Synchronization Endpoint and the Cassandra Space Data Source. The main usage is related to metadata operations (such as creating column families, adding secondary indexes, reading column families metadata, etc…).

Library Dependencies

See Hector library dependencies for required dependencies.

Setup

<bean id="hectorClient"
    class="org.openspaces.persistency.cassandra.HectorCassandraClientFactoryBean">

    <!-- comma separated seed list -->
    <property name="hosts" value="${cassandra.host}" />

    <!-- cassandra rpc communication port -->
    <property name="port" value="${cassandra.port}" />

    <!-- keyspace name to work with -->
    <property name="keyspaceName" value="${cassandra.keyspace}" />

</bean>
HectorCassandraClient hectorClient = new HectorCassandraClientConfigurer()
    .hosts(cassandraHosts)
    .port(cassandraPort)
    .keyspaceName(cassandraKeyspaceName)
    .create();

HectorCassandraClient Properties

Property Description Default
hosts A comma separated list of seeds in the Cassandra cluster
port The rpc port for Cassandra client communication 9160
keyspaceName The name of the keyspace to work with
clusterName If there is need to connect to more than one Cassandra cluster within the same JVM, each cluster should be references by a different name. cluster
readConsistencyLevel The CassandraConsistencyLevel in which read operations should be performed QUORUM
writeConsistencyLevel The CassandraConsistencyLevel in which write operations should be performed QUORUM
columnFamilyGcGraceSeconds See Distributed deletes 10 Days (Derived from Cassandra’s default value)