0
votes
  1. Installed --> datastax-community-64bit_2.2.7

  2. Created --> Keyspace = INVENTORY and Tablename = Stocks

  3. Able to pump in total 858 , 469 data records

  4. System error to SELECT total of 858 , 469 data records

    SELECT * FROM Stocks;

    Unable to execute CQL script on localhost: [localhost/127.0.0.1:9042] Operation timed out

  5. Here is Cassandra Keyspace and Table script creation:

    CREATE KEYSPACE INVENTORY WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 1};

    USE Inventory;

    CREATE COLUMNFAMILY Stocks ( Id varchar, ProductId varchar, DealerGroupId varchar, SupplierId varchar, SerialNo1 varchar, SerialNo2 varchar, SerialNo3 varchar, PIN1 varchar, PIN2 varchar, PIN3 varchar, PIN4 varchar, PIN5 varchar, PIN6 varchar, ExpiryDate varchar, GRNId varchar, ProvisionedDate varchar, ModifiedDate varchar, MStockStatusId varchar, IsIntermediate varchar, ReStockOrderId varchar, ReturnRequestId varchar, AllocationOrderId varchar, PRIMARY KEY ((Id));

2
What if I am using Datastax DevCenter 1.5.0 --> an GUI interface to execute SELECT Queries ? Where I can adjust or configure the time out issue ?Douglas Foong

2 Answers

1
votes

The default client timeout is 10 sec. If you are using CQLSH, you can configure in ~/.cassandra/cqlshrc

[connection]
client_timeout = 3600

Generally, it is not recommended to select all with so many rows. Hope this helps!

0
votes

I received Connection timeout while creating my first Keyspace itself. After lots of testing, i finally came upon a solution - follow the below steps in cqlsh

  1. desc keyspaces --- This will list all system keyspaces present

  2. use system_schema; --- Go to any keyspace, here system_schema

  3. cqlsh:system_schema> CREATE KEYSPACE ksp1 ... WITH REPLICATION = { ... 'class' : 'SimpleStrategy', ... 'replication_factor' : 1 ... }; ------------------- This will create 'ksp1'

  4. cqlsh:system_schema> desc keyspaces cycling system_schema system_auth system system_distributed system_traces

  5. cqlsh:system_schema> use cycling;

Thanks,