I am trying to run the following wso2cep sample.
https://docs.wso2.com/display/CEP400/Sample+0067+-+Publishing+Map+Events+via+Cassandra+Transport
But in the latest cassandra releases we cannot find the cassandra-cli. So we have to use cassandra CQL instead.
How to run the following commands which targeted cassandra-cli, within CQL?
Create a keyspace: create keyspace CEP_KS;
Use keyspace: use CEP_KS admin 'admin';
Create column family: create column family CF_Transactions with comparator = 'UTF8Type' and caching='ALL';
Thanks..
cassandra-cli is an old client using Thrift protocol and now deprecated, you should use cqlsh client which is using the new CQL binary protocol
Related
I'm trying to use GeoSpatial example from Cassandra documentation: https://docs.datastax.com/en/dse/6.7/cql/cql/cql_using/search_index/queriesGeoSpatial.html
CREATE TABLE test ( id text PRIMARY KEY, point 'PointType', linestring 'LineStringType');
I'm getting error:
SyntaxException: Error setting type PointType: Unable to find abstract-type class 'org.apache.cassandra.db.marshal.PointType'
I'm using stack:
[cqlsh 5.0.1 | Cassandra 3.11.1 | CQL spec 3.4.4 | Native protocol v4]
How to solve it?
The documentation you are looking at is for DSE 6.7 which is a commercial product has extended functionality over Cassandra 3.11.1. Cassandra 3.11.1 does not support the PointType.
Depending on what you are trying to do you, there are a number of open source projects that support geospatial extensions for Cassandra:
GeoMesa
Elassandra
Is there a way to check the selected keyspace in Cassandra while using it through Java?
Context:
A subsystem uses authentication credentials to select a keyspace. I'm working on a DTO that executes commands. I have a hunch that i'm operating in the wrong keyspace (commands execute successfully in DevCenter but not within the Java code).
I'm new to Cassandra and this Java application so I apologize if this is a silly question.
I'm trying use Datastax Enterprise for deploying database system
My cluster:
2 dse cassandra node
2 dse solr node
I created a keyspace by cqlsh on one node but I could not drop that keyspace from another nodes on cluster, unless drop from node creating keyspace. Anybody know why?
This sounds like https://issues.apache.org/jira/browse/CASSANDRA-5202
I have had to delete the data directory for the troubled key space in all nodes and restart DSE to fix.
Do you have the output from cqlsh on the node that won't allow you to drop the keyspace?
What version of DSE are you using?
In Cassandra database the Table created in CQL is not seen in CLI in same column family is there any reference reason for the same ?
This is because two diffrent protocols are used to create the column family. You are creating the 'table' using the CQL binary protocol and then you are trying to edit it using the THRIFT interface (through CLI), this is not allowed on purpose. From the Cassandra CTO:
This is by design. CLI and Thrift-based consumers in general do not know how to understand CQL3 metadata, and would do the Wrong Thing without realizing it.
You can find the documented "issue" here.
If you wanted to access the data in the table you created you can use cqlsh.
I'm trying Cassandra v1.2.3 on ubuntu and created KeySpace and objects using both cli and cqlsh interfaces.
When connected Toad for cloud to this Casandra node, to query and insert data, found that none of the cql3 created objects through cqlsh not shown except for cli created objects.
Could anyone please let me know how to make Toad for Cloud to see those objects or it is not supported yet?
It apears that toad only supports thrift and not the binary protocol'CQL', but have a look at this tutorial containing a demo on using cassandra with toad.