首页 > 解决方案 > Cassandra:使用 CQL 获取表分区器名称

问题描述

Cassandra 有 3 个分区器:

Murmur3Partitioner
RandomPartitioner
ByteOrderedPartitioner

这可以使用 YAML 文件进行设置,但是我是否触发了任何 cql 查询来找出表使用哪个分区器来生成令牌。

标签: cassandra-3.0

解决方案


A) 使用下面的 cqlsh 命令。

cqlsh:ah300001> 描述集群;

集群:Cluster1

分区:org.apache.cassandra.dht.Murmur3Partitioner

B) ah300001> nodetool describecluster

集群信息:

Name: Cluster1
Snitch: org.apache.cassandra.locator.DynamicEndpointSnitch
**Partitioner**: org.apache.cassandra.dht.Murmur3Partitioner

推荐阅读