怎么用jdbc连接cassandra数据库

2025-02-27 09:44:03
推荐回答(1个)
回答1:

Cassandra的文件包中,bin下有自带的数据库操作命令行工具cassandra-cli,lib中有可供Java编程访问的Driver.我们先介绍命令行工具的基本数据库操作:
$ bin/cassandra-cli
>> Connected to: "Test Cluster" on 127.0.0.1/9160 Welcome to Cassandra CLI version 2.0.3 The CLI is deprecated and will be removed in Cassandra 3.0. Consider migrating to cqlsh. CQL is fully backwards compatible with Thrif
>> [default@unknown]

Key space类似于数据库的概念,首先需要创建一个Key space.