因此,当我尝试启动Cassandra时遇到问题,出现以下错误。
org.apache.cassandra.exceptions.SyntaxException: line 1:32 no viable alternative at input 'primary' (... id, name, path, [primary]...)
at org.apache.cassandra.cql3.ErrorCollector.throwFirstSyntaxError(ErrorCollector.java:101) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.cql3.CQLFragmentParser.parseAnyUnhandled(CQLFragmentParser.java:80) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.cql3.QueryProcessor.parseStatement(QueryProcessor.java:526) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.schema.SchemaKeyspace.fetchView(SchemaKeyspace.java:1118) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.schema.SchemaKeyspace.fetchViews(SchemaKeyspace.java:1082) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:893) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:869) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:857) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:136) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:126) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:247) [apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:581) [apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:710) [apache-cassandra-3.6.jar:3.6]
我想,问题是因为我使用的是列名primary
,并且它没有用单引号引起来。除了删除Cassandra的数据文件夹之外,还有什么快速的方法可以解决此问题?我所有的节点都关闭了,我无法启动它们中的任何一个。