2

在 AWS 上的 Amazon Keyspaces 上,我无法截断我的表。你知道为什么吗?该指令似乎存在于 CQL 上,但即使在 MCS 上的 CQL 编辑器上也不起作用。

 ...:~/.cassandra$ cqlsh ... ... -u "...." -p "..." --ssl
 
 Connected to Amazon Managed Apache Cassandra Service at ....
 
 [cqlsh 5.0.1 | Cassandra 3.11.2 | CQL spec 3.4.4 | Native protocol v4]
 
 Use HELP for help.
 
 ...@cqlsh> TRUNCATE sfd.countries_tbl;
 
 InvalidRequest: Error from server: code=2200 [Invalid query]
 message="Unsupported statement:
 org.apache.cassandra.cql3.statements.TruncateStatement@f2c4a18"
 
 ...@cqlsh> TRUNCATE TABLE sfd.countries_tbl; InvalidRequest: Error
 from server: code=2200 [Invalid query] message="Unsupported statement:
 org.apache.cassandra.cql3.statements.TruncateStatement@55cfc2f8"
 
 ...@cqlsh> USE sfd;
 
 ...@cqlsh:sfd> TRUNCATE sfd.countries_tbl;
 
 InvalidRequest: Error from server: code=2200 [Invalid query]
 message="Unsupported statement:
 org.apache.cassandra.cql3.statements.TruncateStatement@3530b57a"
 
 ...@cqlsh:sfd> TRUNCATE TABLE sfd.countries_tbl; InvalidRequest: Error
 from server: code=2200 [Invalid query] message="Unsupported statement:
 org.apache.cassandra.cql3.statements.TruncateStatement@4e4c59b"
 
 ...@cqlsh:sfd> TRUNCATE TABLE countries_tbl; InvalidRequest: Error
 from server: code=2200 [Invalid query] message="Unsupported statement:
 org.apache.cassandra.cql3.statements.TruncateStatement@764173fa"
 
 ...@cqlsh:sfd> TRUNCATE countries_tbl; InvalidRequest: Error from
 server: code=2200 [Invalid query] message="Unsupported statement:
 org.apache.cassandra.cql3.statements.TruncateStatement@9a42377"
4

2 回答 2

4

MCS 中不支持截断操作。查看此处支持/不支持的内容:https ://docs.aws.amazon.com/mcs/latest/devguide/cassandra-apis.html

于 2019-12-16T02:53:10.777 回答
0

柯克说得对,这个名单会不断缩小。

于 2019-12-21T18:24:16.910 回答