首页 文章

Datastax Cassandra odbc驱动程序并在cqlsh 3上启动cql2会出现错误,因为cqlsh:error:no such option:-2

提问于
浏览
0

我已经为cassndra安装了datastax ODBC驱动程序,并且我已经使用cql 3创建了密钥空间和一些表 . 但ODBC驱动程序没有显示这些表 . 另外在odbc文档中,我读到驱动程序当前不支持Cassandra查询语言(CQL3)的3.0版本,驱动程序将无法识别使用CQL 3定义的键空间和列系列 . 因此,为了使用cql 2我正在使用以下命令在驱动程序文档中建议:

... \ cqlsh“-2

但这是一个错误说“cqlsh:错误:没有这样的选项:-2”

有人可以帮我解决这个问题吗?

2 回答

  • 2

    cql2已弃用,已从Cassandra 2.0中的cslqh中删除 . 它也将在3.0中从服务器中删除 .

    我不知道何时将cql3支持添加到ODBC驱动程序中 .

  • 1

    关于如何使用以前的规范/版本启动cqlsh,文档是不正确的...您需要使用--cqlversion而不是-2(参见下面的注释) . 但是,正如jbellis'中提到的那样,css2支持已从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.
    

相关问题