我有2个列系列,其数据是使用DataStax驱动程序版本1.0.4通过Java应用程序插入的。我使用cqlsh 4.1.1将CQLSH导入集群中的四个节点之一(Cassandra 2.0.5,CQL spec 3.1.1,Thrift protocol 19.39.0)。我可以从一个列族(“table_A”)执行SELECT *
但不能从另一个列(table_X)执行SELECT * FROM table_X
。我正在尝试执行TSocket read 0 bytes
查询。我得到ERROR [Thrift:16] 2015-01-24 02:26:40,761 CustomTThreadPoolServer.java (line 212) Error occurred during processing of message.
java.lang.ArrayIndexOutOfBoundsException
而不是结果。当我检查/var/log/cassandra/system.log时,我看到:
SELECT * FROM table_A
后续的CQL命令(DESCRIBE,SELECT,USE等)将返回相同的错误。如果我退出会话并将CQLSH返回到节点,那么我可以再次执行CQL命令。如果我向查询添加WHERE子句,它可以正常工作。当然,我还没有尝试查询每个可能的分区键以查看某些分区键是否失败。我怀疑列族中有一个损坏的行,但我想保留列族中的数据(我不想删除或截断列族)。
请注意,运行table_X
工作正常,只会在ERROR [Thrift:3] 2015-02-06 14:21:50,800 CustomTThreadPoolServer.java (line 212) Error occurred during processing of message.
java.lang.ArrayIndexOutOfBoundsException: 1
at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43)
at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31)
at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:130)
at org.apache.cassandra.cql3.statements.SelectStatement.processColumnFamily(SelectStatement.java:949)
at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:854)
at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:222)
at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:202)
at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:172)
at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:58)
at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:188)
at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:222)
at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:212)
at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1958)
at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
上出错。
有没有人见过这个或者知道原因是什么?
EDIT - 启用调试日志记录,并且能够获得此错误的堆栈跟踪:
CREATE KEYSPACE z WITH replication = {
'class': 'SimpleStrategy',
'replication_factor': '4'
};
USE z;
CREATE TABLE x (
a int,
b text,
c text,
d text,
e text,
f text,
g text,
h text,
PRIMARY KEY (a, b)
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
index_interval=128 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
default_time_to_live=0 AND
speculative_retry='99.0PERCENTILE' AND
memtable_flush_period_in_ms=0 AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'LZ4Compressor'};
CREATE TABLE y (
i text,
j text,
k text,
l text,
m text,
n int,
o text,
p text,
q text,
r text,
s text,
PRIMARY KEY (i)
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
index_interval=128 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
default_time_to_live=0 AND
speculative_retry='99.0PERCENTILE' AND
memtable_flush_period_in_ms=0 AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'LZ4Compressor'};
编辑 - 添加了描述键空间的结果:
{{1}}