Datastax Cassandra odbc driver and starting cql2 on cqlsh 3 gives error as cqlsh: error: no such option: -2

别等时光非礼了梦想. 提交于 2019-12-12 02:15:50

问题


I have installed datastax ODBC driver for cassndra and also i have created keyspace and some tables using cql 3. But ODBC driver is not showing up those tables. Also in odbc documentation i read that the driver does not currently support version 3.0 of the Cassandra Query Language (CQL3) and the driver will not recognize keyspaces and column families that are defined with CQL 3. So in order to use cql 2 i am using following command which is suggested in driver documentation:

...\cqlsh” -2

But this is giving an error saying "cqlsh: error: no such option: -2"

Can anybody help me out with this?


回答1:


cql2 is deprecated and was removed from cslqh in Cassandra 2.0. It will be removed from the server as well in 3.0.

I do not know when cql3 support will be added to the ODBC driver.




回答2:


The documentation is not correct regarding how to start cqlsh using a previous spec/version...you need to use --cqlversion instead of -2 (see notes below). However, as mentioned in jbellis' answer cql2 support has been removed from later versions of cassandra.

CQL Shell for Apache Cassandra

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -C, --color           Always use color output
  --no-color            Never use color output
  -u USERNAME, --username=USERNAME
                        Authenticate as user.
  -p PASSWORD, --password=PASSWORD
                        Authenticate using password.
  -k KEYSPACE, --keyspace=KEYSPACE
                        Authenticate to the given keyspace.
  -f FILE, --file=FILE  Execute commands from FILE, then exit
  -t TRANSPORT_FACTORY, --transport-factory=TRANSPORT_FACTORY
                        Use the provided Thrift transport factory function.
  --debug               Show additional debugging information
  --cqlversion=CQLVERSION
                        Specify a particular CQL version (default: 3.1.1).
                        Examples: "3.0.3", "3.1.0"
  -e EXECUTE, --execute=EXECUTE
                        Execute the statement and quit.


来源:https://stackoverflow.com/questions/21201218/datastax-cassandra-odbc-driver-and-starting-cql2-on-cqlsh-3-gives-error-as-cqlsh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!