官术网_书友最值得收藏!

Interacting with Cassandra

Most common programming languages have drivers for interacting with Cassandra. When selecting a driver, you should look for libraries that support the CQL binary protocol, which is the latest and most efficient way to communicate with Cassandra.

The CQL binary protocol is a relatively new introduction; older versions of Cassandra used the Thrift protocol as a transport layer. Although Cassandra continues to support Thrift, avoid Thrift-based drivers as they are less performant than the binary protocol.

Here are the CQL binary drivers available for some popular programming languages:

While you are likely to use one of these drivers in your applications, to try out the code examples in this book, you can simply use the cqlsh tool, which is a command-line interface for executing CQL queries and viewing the results. To start cqlsh on OS X or Linux, simply type cqlsh into your command line; you should see something like this:

$ cqlsh
Connected to Test Cluster at 127.0.01:9042.
[cqlsh 5.0.1 | Cassandra 3.0.9 | CQL spec 3.4.0 | Native protocol v4]
Use HELP for help.
cqlsh>

On Windows, you can start cqlsh just the way you ran nodetool:

C:> cd %CASSANDRA_HOME%
C:> bin\cqlsh

Once you open it, you should see the same output we just saw.

主站蜘蛛池模板: 建阳市| 辽源市| 湘潭市| 昭觉县| 蕲春县| 金门县| 乐东| 雷山县| 宜城市| 河津市| 和田市| 上林县| 黄陵县| 石城县| 峨边| 樟树市| 故城县| 沈丘县| 延庆县| 宁德市| 岗巴县| 乐安县| 仲巴县| 大关县| 南和县| 呼玛县| 五家渠市| 贵州省| 呼伦贝尔市| 武鸣县| 洞口县| 揭阳市| 武功县| 越西县| 临沭县| 休宁县| 昆山市| 法库县| 屯留县| 阿坝县| 桂林市|