0

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

...\cqlsh” -2

但这给出了一个错误,说“cqlsh:错误:没有这样的选项:-2”

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

4

2 回答 2

2

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

不知道 ODBC 驱动什么时候会加入 cql3 支持。

于 2014-01-19T14:14:58.917 回答
1

关于如何使用以前的规范/版本启动 cqlsh 的文档不正确...您需要使用 --cqlversion 而不是 -2 (请参阅下面的注释)。但是,正如 jbellis 的回答中提到的,cql2 支持已从更高版本的 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.
于 2014-08-19T19:38:46.690 回答