Cassandra3.9版本基础入门3-插入和查询,cassandra3.93-
Cassandra的API是CQL(Cassandra Query Language),要使用CQL,需要先连接到集群。连接的方式: (1)使用cqlsh; (2)通过Cassandrad的客户端驱动程序。 注:使用CQLSH前请先安装Python 2.7和python-setuptools,并将cql模块装到python。详细操作请参考http://it.zhaozhao.info/archives/8057CQLSH cqlsh是用于让CQL和Cassandra进行交互的命令行脚本。每个Cassandra压缩包中都会自动提供,可以在bin目录下找到可执行文件。 它连接到在命令行上指定的单个节点。 例如:
$ bin/cqlsh localhost
Connected to Test Cluster at localhost:9042.
[cqlsh 5.0.1 | Cassandra 3.8 | CQL spec 3.4.2 | Native protocol v4]
Use HELP for help.
cqlsh> SELECT cluster_name, listen_address FROM system.local;
cluster_name | listen_address
--------------+----------------
Test Cluster | 127.0.0.1
(1 rows)
cqlsh>
关于CQL的使用会在之后专门详细的讲解,读者先做个稍微的了解
客户端驱动 许多客户端驱动程序由社区提供,以下提供已知驱动程序的列表。 您应参考每个驱动程序的文档以获取有关如何使用它们的更多信息。 Java
- Achilles
- Astyanax
- Casser
- Datastax Java driver
- Kundera
- PlayORM
- Datastax Python driver
- Datastax Ruby driver
- Cassandra Sharp
- Datastax C# driver
- Fluent Cassandra
- Datastax Nodejs driver
- Node-Cassandra-CQL
- CQL | PHP
- Datastax PHP driver
- PHP-Cassandra
- PHP Library for Cassandra
- Datastax C++ driver
- libQTCassandra
- Datastax Spark connector
- Phantom
- Quill
- Alia
- Cassaforte
- Hayt
- CQerl
- Erlcass
- CQLc
- Gocassa
- GoCQL
- Cassy
- Rust CQL
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。