Note that there are some explanatory texts on larger screens.

plurals
  1. POIssue with reading data from Apache cassandra
    primarykey
    data
    text
    <p>I have some trouble using apache cassandra. I have been trying to solve this problem for several weeks now.</p> <p>This is my setup. I have 2 computers running apache cassandra(lets call the computer C1 and Computer C2), I create a keyspace with replication factor 2. This is so that each computer has a local copy of the data.</p> <p>I have a program that reads a fairly large amount of data say about 500MB. </p> <p>Scenario 1) Say only computer C1 has cassandra is running, I run the read program on computer C1 then this read occurs with half a minute to a minute.</p> <p>Scenario 2) I now start the cassandra instance on the computer C2 and run the read program on computer C1 again- it now takes a very long time to complete in the order of 20 minutes.</p> <p>I am not sure why this is happening. The read consistency is set to "One"</p> <p><strong>Expected performance</strong></p> <p>Ideally the read program on both computers C1 and C2 has to complete fast. This should be possible as both computers have a local copy of the data.</p> <p>Can anyone please point me in the right direction? I really appreciate the help, Thanks</p> <p><strong>Update: Network Usage</strong></p> <p>This may not mean much, but I monitored the internet connection using nethogs and when both cassandra nodes are up, and I read the database, bandwidth is used by cassandra to communicate with the other node - presumably this is read repairs occuring in the background as I've used the read consistency level 'One' and in my case the closest node with the required data is the local computer's cassandra instance (all nodes have all the data) - so the source of data should be from the local computer...</p> <p><strong>Update: SQLTransentExceptions: TimedOutException()</strong></p> <p>When both nodes are up, the program that reads the database, however, has several SQLTransentExceptions: TimedOutException(). I use the default timeout of 10 sec. But that raises a question of why the SQL statements are timing out, when all data retrieval should be from the local instance. Also, the same SQL code runs fine, if only one node is up.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload