I've created a Table called 'test'.
CREATE TABLE test1(
link text PRIMARY KEY,
title text,
descp text,
pubdate text,
ts timestamp
);
Then I insert a record into:
INSERT INTO test1(title,link,descp,pubdate, ts) VALUES('T3','http://link.com/a3','D3','date3', toTimestamp(now())) IF NOT EXISTS;
This results in an error (red colored text in cqlsh): NoHostAvailable
The Cassandra setup uses Cassandra version 3.9 on Mac OS El Capitain. The key space is this:
CREATE KEYSPACE testkeyspace
WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 3};
This is configuration parameters I changed according to answers on stackoverflow:
start_rpc: true (from false)
start_native_transport: true (from false)
Still, I can't seem to pin-point why I can't run this statement of INSERT INTO using these keywords at the end of the insert statement "IF NOT EXISTS"
Note that I started Cassandra using "cassandra -f"
Please help if you know what's wrong here.
'replication_factor' : 1? - xmas79