我正在我的桌子上执行一些查询,当我执行此查询时:
select o_type from basic_data where oid4 = 1;
我有来自Cassandra的答案:
Traceback (most recent call last):
File "/usr/bin/cqlsh.py", line 1277, in perform_simple_statement
result = future.result()
File "cassandra/cluster.py", line 3822, in cassandra.cluster.ResponseFuture.result (cassandra/cluster.c:74332)
raise self._final_exception
ReadFailure: Error from server: code=1300 [Replica(s) failed to execute read] message="Operation failed - received 0 responses and 1 failures" info={'failures': 1, 'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'}
但是当我执行此查询时:
select o_type from basic_data where oid4 = 12192;
我有我应该得到的东西:
o_type
----------------------------------------------------------------
otype:G ,otype_bin:-268435456;otype:GiC,otype_bin:-234881024;
我不知道为什么我只能对某些行执行查询,你有什么建议吗?
编辑:
我的system.log中有错误
ERROR [CompactionExecutor:3] 2017-05-24 13:40:50,901 CassandraDaemon.java:213 - Exception in thread Thread[CompactionExecutor:3,1,main]
java.lang.AssertionError: null
at org.apache.cassandra.db.rows.Rows.collectStats(Rows.java:70) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.io.sstable.format.big.BigTableWriter$StatsCollector.applyToRow(BigTableWriter.java:223) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:99) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:89) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.transform.Transformation.add(Transformation.java:142) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:108) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.io.sstable.format.big.BigTableWriter.append(BigTableWriter.java:156) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.io.sstable.SSTableRewriter.append(SSTableRewriter.java:129) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.compaction.writers.DefaultCompactionWriter.realAppend(DefaultCompactionWriter.java:65) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.compaction.writers.CompactionAwareWriter.append(CompactionAwareWriter.java:141) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:187) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:82) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:60) ~[apache-cassandra-3.6.jar:3.6]
at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionCandidate.run(CompactionManager.java:264) ~[apache-cassandra-3.6.jar:3.6]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_131]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
答案 0 :(得分:0)
可能是由于读取花了很多时间,尝试以更高的超时运行,在cqlsh中,例如,使用此选项运行cqlsh:
cqlsh --request-timeout = 3600