每当查询特定表中的任何内容时,我都会收到错误消息“ ServerError:java.lang.IllegalArgumentException:null”。
我尝试过的示例查询:
select * from audit;
select * from audit limit 2;
select SPECIFIC_COLUMN from audit WHERE ID = '123456' ALLOW FILTERING;
存在数据:
nodetool cfstats -- keyspace_name.audit
Total number of tables: 55
----------------
Keyspace : keyspace_name
Read Count: 0
Read Latency: NaN ms
Write Count: 0
Write Latency: NaN ms
Pending Flushes: 0
Table: audit
SSTable count: 2
Space used (live): 99745
Space used (total): 99745
Space used by snapshots (total): 0
Off heap memory used (total): 1456
SSTable Compression Ratio: 0.2623552456457625
Number of partitions (estimate): 900
Memtable cell count: 0
Memtable data size: 0
Memtable off heap memory used: 0
Memtable switch count: 0
Local read count: 0
Local read latency: NaN ms
Local write count: 0
Local write latency: NaN ms
Pending flushes: 0
Percent repaired: 100.0
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used: 1160
使用sstabledump进行转储时,没有任何明显的变化:
sstabledump /opt/company/data/cassandra/data/keyspace_name/audit-501e5910887811e98345e1aa09bd5db5/mc-1-big-Data.db > test_dump
运行查询时来自:
/opt/company/data/cassandra/logs/system.log
ERROR [Native-Transport-Requests-1] 2019-08-13 00:34:49,708 ErrorMessage.java:384 - Unexpected exception during request
java.lang.IllegalArgumentException: null
at java.nio.Buffer.limit(Buffer.java:275) ~[na:1.8.0_162]
at org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:620) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.utils.ByteBufferUtil.readBytesWithShortLength(ByteBufferUtil.java:629) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.db.marshal.CompositeType.split(CompositeType.java:188) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.cql3.statements.SelectStatement.getComponents(SelectStatement.java:809) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.cql3.statements.SelectStatement.processPartition(SelectStatement.java:829) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:791) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:439) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:417) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:290) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:118) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:224) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:255) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:240) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116) ~[apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517) [apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410) [apache-cassandra-3.11.2.jar:3.11.2]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [netty-all-4.0.44.Final.jar:4.0.44.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:357) [netty-all-4.0.44.Final.jar:4.0.44.Final]
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35) [netty-all-4.0.44.Final.jar:4.0.44.Final]
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:348) [netty-all-4.0.44.Final.jar:4.0.44.Final]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_162]
at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) [apache-cassandra-3.11.2.jar:3.11.2]
at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [apache-cassandra-3.11.2.jar:3.11.2]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_162]
/ var / log / messages中没有内容。
/var/log/cassandra/cassandra.log在启动时不存在。
nodetool修复,nodetool修复--trace entpor_access审核(修复中没有问题,它成功完成,重新启动节点,它存在于所有副本中,没有可用的备份,并且不确定如何恢复。
答案 0 :(得分:0)
我非常确定IllegalArgumentException意味着您没有正确编写函数调用,或者忘记了在函数调用中指定参数。尽管我在Java领域没有特别的经验,但请查看Cassandra的文档,看看是否在代码中缺少参数。