Cassandra sstablesplit在拆分SST文件时抛出错误“Unknown Keyspace”

ddhy6vgd  于 2023-10-18  发布在  Cassandra
关注(0)|答案(1)|浏览(138)

执行ssablesplit命令如下抛出以下错误:

root@cas-sleep-pod:/data/cassandra/public# /opt/cassandra/tools/bin/sstablesplit -s 30720 --no-snapshot /data/cassandra/public/timebucket_auditlog_primary-b275e92070a511eda32ced63d2298aec/me-1172-big-Data.db
WARN  12:43:44,036 Only 14.359GiB free across all data volumes. Consider adding more capacity to your cluster or removing obsolete snapshots
Exception in thread "main" java.lang.AssertionError: Unknown keyspace public
        at org.apache.cassandra.db.Keyspace.<init>(Keyspace.java:316)
        at org.apache.cassandra.db.Keyspace.open(Keyspace.java:129)
        at org.apache.cassandra.db.Keyspace.openWithoutSSTables(Keyspace.java:112)
        at org.apache.cassandra.tools.StandaloneSplitter.main(StandaloneSplitter.java:114)

我实际上是在停止cassandra pod并将cassandra“data”目录的hostPath挂载到另一个pod之后执行此命令的。(与Cassandra图像相同)

root@cas-sleep-pod:/data/cassandra/public# ls -ld timebucket_auditlog_primary-b275e92070a511eda32ced63d2298aec/
drwxr-xr-x 3 cassandra cassandra 16384 Aug 23 07:47 timebucket_auditlog_primary-b275e92070a511eda32ced63d2298aec/
zsbz8rwp

zsbz8rwp1#

这里我的假设是,您的cassandra.yaml数据目录设置可能是/data/cassandra/<keyspace>/<table>,因此 sstablesplit 正在查找该路径,而不是您当前在那里的public目录。您应该能够模仿相同的路径,或者将cassandra.yaml data_directory路径(无需重新启动,以便它永远不会实际生效)修改为您正在用于 sstablesplit 命令的路径。我想这对你应该有用。

相关问题