CQLSH:NoHostAvailable 错误 Cassandra 更新失败更新

CQLSH : NoHostAvailable error Cassandra update fails update


这是我的键空间

CREATE KEYSPACE db_space WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}  AND durable_writes = true;

这是我的TABLE

CREATE TABLE **db_space.user12** (
    id text PRIMARY KEY,
    details map<text, text>,
    services map<text, frozen<user_services>>
) WITH additional_write_policy = '99p'
    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': '16', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND default_time_to_live = 0
    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 = 'BLOCKING'
    AND speculative_retry = '99p';

以下查询有效

update user12 set details=details + {'name':'raj'} where id = '2';

但是当我尝试使用 UDT 更新字段时

update user12 set services = {'1298182':{'id':'2','title':'2','description':'2'}} where id = '2';

出现错误, 没有主机可用

这个问题只发生在这个特定的领域?我在网上搜索并尝试更改网络策略、集群名称、nodetool 修复和大量的 cassandra 重启.. This shows the error

您的查询不正确 - UDT 中的字段名称不应该被引用,所以它应该是这样的:

update user12 set services = {'1298182':{id:'2', title:'2', description:'2'}} 
   where id = '2';

虽然我不确定它为什么显示 NoHostAvailable - 您需要检查服务器端日志。查看节点的system.log