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
Related
I am facing an issue while cassandra migration from 3.11.4 to 4.0 beta version in my development system.
ERROR [main] 2020-07-31 15:34:36,099 CassandraDaemon.java:800 - Exception encountered during startup
java.lang.IllegalArgumentException: Compact Tables are not allowed in Cassandra starting with 4.0 version. Use `ALTER ... DROP COMPACT STORAGE` command supplied in 3.x/3.11 Cassandra in order to migrate off Compact Storage.
at org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:960)
at org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:919)
at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:878)
at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:869)
at org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:857)
at org.apache.cassandra.schema.Schema.loadFromDisk(Schema.java:102)
at org.apache.cassandra.schema.Schema.loadFromDisk(Schema.java:91)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:241)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:661)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:778)
Error says to remove COMPACT STORAGE , but in my database there are no table with COMPACT STORAGE enabled.
Please suggest any solution!!
As the exception suggests, you have one or more tables that is still using the deprecated Thrift storage format even if you don't know about it.
Try this (rough-and-simple) command:
$ cqlsh <node_ip> -e "DESCRIBE FULL SCHEMA" | egrep "CREATE TABLE|COMPACT STORAGE"
This will list all the tables in your cluster and will indicate if any of them still have compact storage support. You will need to modify it accordingly to include DB credentials if you have authentication enabled. Cheers!
I am trying to run below CQL query in dev center (1.6) and seeing this error thus not allowing me to execute query. I verified DataStax documentation and I see syntax is correct. Any help please?
select * from some_table PER PARTITION LIMIT 1;
Error I see -> no viable alternative at input 'PER
If you're using DataStax Enterprise 6.x, then you need to use DataStax Studio instead of DevCenter. DSE 6 supports per partition limit without problems, it's a DevCenter that doesn't understand this syntax.
My guess is that you're using a version of Cassandra that does not support that syntax.
Does sstabloader work between datastax cassandra and apache cassandra?
I'm trying to copy data from dse 5.0.7 to apache 3.11.1 cassandra version
It shouldn't be an issue to use it to export between Datastax Cassandra and the open source version, if they are the same versions.
Having said that, please note that DSE 5.0.7 uses Apache 3.0.11, as explained in the release notes. This means that you should import the data to a cluster with that version, and once that this is completed, upgrade to 3.11.1.
Disclosure: I'm not a DSE user, I don't have a way to test this.
Just curious what versions of cql are supported in Cassandra 3.9.
I know that cql 3.4.2 is supported in Cassandra 3.9, but whether 3.4.3 is supported too? and how to upgrade/config Cassandra 3.9 to use cql 3.4.3?
I searched on Internet, I found some information such as Which CQL version corresponds to which Cassandra version?, https://docs.datastax.com/en/landing_page/doc/landing_page/compatibility.html, and so on, but these posts can not help me.
Any comments welcomed. Thanks
Just curious what versions of cql are supported in Cassandra 3.9
CQL adheres to semantic versioning, meaning that a server supporting 3.4.2 should support anything in the range [3.0, 3.4.2].
but whether 3.4.3 is supported too? and how to upgrade/config Cassandra 3.9 to use cql 3.4.3?
A given version of Cassandra has a fixed maximum CQL spec. For 3.9, it is 3.4.2, as you point out. There is no way to configure a higher version. To get features from the next CQL spec requires upgrading Cassandra (note that all the changes for 3.4.3 have fixVer=3.10)
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