cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Svihla>
Subject Re: TransportException - Consistency LOCAL_ONE - EC2
Date Wed, 15 Mar 2017 12:38:44 GMT
LOCAL_ONE just means local to the datacenter by default the tokenaware
policy will go to a replica that owns that data (primary or any replica
depends on the driver) and that may or may not be the node the driver
process is running on.

So to put this more concretely if you have RF 2 with that 4 node cluster so
2 nodes will be responsible for that data and if your local process is not
running on one of those 2 nodes it will definitely HAVE to go to another

Therefore, if you wanted to pin behavior to a local replica you'd have to
send your work out in a token aware fashion where said work only goes to
the primary token owner of that data, and remove any shuffling of replicas
in the process (is only on by default in the java driver to my knowledge).

On Wed, Mar 15, 2017 at 6:38 AM, Frank Hughes <>

> Hi there,
> Im running a java process on a 4 node cassandra 3.9 cluster on EC2
> (instance type t2.2xlarge), the process running separately on each of the
> nodes (i.e. 4 running JVMs).
> The process is just doing reads from Cassandra and building a SOLR index
> and using the java driver with consistency level LOCAL_ONE.
> However, the following exception is through:
> com.datastax.driver.core.exceptions.TransportException: [/]
> Connection has been closed
>         at com.datastax.driver.core.exceptions.TransportException.
> copy(
>         at com.datastax.driver.core.exceptions.TransportException.
> copy(
>         at com.datastax.driver.core.DriverThrowables.propagateCause(
>         at com.datastax.driver.core.ArrayBackedResultSet$
> MultiPage.prepareNextRow(
>         at com.datastax.driver.core.ArrayBackedResultSet$
> MultiPage.isExhausted(
>         at com.datastax.driver.core.ArrayBackedResultSet$1.
> hasNext(
> where is not the local machine. So my questions:
> - Should this happen when Im using consistency level LOCAL_ONE and just
> doing reads ?
> - Does this suggest non-local reads are happening ?
> Many thanks for any help/ideas.
> Frank


Ryan Svihla

View raw message