全部,以下是我的架构:
CREATE TABLE test.lookup_provider_id (
provider_id text,
provider_source text,
gufi text,
PRIMARY KEY (provider_id, provider_source)
) WITH CLUSTERING ORDER BY (provider_source ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 604800
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
使用Java驱动程序,我执行这种查询:
SELECT gufi FROM test.lookup_provider_id WHERE provider_id = 'id' AND provider_source = 'source';
我得到了这个例外:
java.util.concurrent.ExecutionException:com.datastax.driver.core.exceptions.ReadTimeoutException:在一致性LOCAL_ONE读取查询期间的Cassandra超时(需要1个响应,但仅响应0个副本) 在com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:476) 在com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:455) 在com.thales.ecosystem.common.hazelcast.mapstore.LookupProviderIDMapStore.load(LookupProviderIDMapStore.java:145) 在com.thales.ecosystem.common.hazelcast.mapstore.LookupProviderIDMapStore.load(LookupProviderIDMapStore.java:42) 在com.hazelcast.map.impl.MapStoreWrapper.load(MapStoreWrapper.java:152) 在com.hazelcast.map.impl.mapstore.writebehind.WriteBehindStore.load(WriteBehindStore.java:205) 在com.hazelcast.map.impl.mapstore.writebehind.WriteBehindStore.load(WriteBehindStore.java:55) 在com.hazelcast.map.impl.recordstore.DefaultRecordStore.loadRecordOrNull(DefaultRecordStore.java:398) 在com.hazelcast.map.impl.recordstore.DefaultRecordStore.get(DefaultRecordStore.java:612) 在com.hazelcast.map.impl.operation.GetOperation.run(GetOperation.java:43) 在com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:186) 在com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl.run(OperationExecutorImpl.java:382) at com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl.runOrExecute(OperationExecutorImpl.java:409) 在com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvokeLocal(Invocation.java:534) 在com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvoke(Invocation.java:519) 在com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke0(Invocation.java:490) 在com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke(Invocation.java:200) 在com.hazelcast.spi.impl.operationservice.impl.InvocationBuilderImpl.invoke(InvocationBuilderImpl.java:59) at com.hazelcast.client.impl.protocol.task.AbstractPartitionMessageTask.processMessage(AbstractPartitionMessageTask.java:67) at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.initializeAndProcessMessage(AbstractMessageTask.java:123) 在com.hazelcast.client.impl.protocol.task.AbstractMessageTask.run(AbstractMessageTask.java:103) 在com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:142) 在com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:127) 在com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:102) 引起:com.datastax.driver.core.exceptions.ReadTimeoutException:一致性LOCAL_ONE读取查询期间的Cassandra超时(需要1个响应但只响应0个副本)
我正在使用部署在不同VM(CentOS)上的9个Cassandra 3.10节点的集群。 使用nodetool状态显示一切似乎都可以。我无法在日志中看到任何可以提供正在发生的事情的线索。
我有点失落,所以感谢任何帮助!