【问题标题】:ServerError: ErrorMessage code=0000 [Server error] message="java.lang.RuntimeEx ception: org.codehaus.jackson.map.JsonMappingExceptionServerError: ErrorMessage code=0000 [服务器错误] message="java.lang.RuntimeException: org.codehaus.jackson.map.JsonMappingException
【发布时间】:2016-06-06 16:34:19
【问题描述】:

我正在尝试创建一个列族

cqlsh:testkeyspace> CREATE COLUMNFAMILY testcolumnfamily (rowkey text, ts timest
amp, PRIMARY KEY(rowkey)) with caching=200000 and read_repair_chance=0.4;

ServerError: ErrorMessage code=0000 [服务器错误] message="java.lang.RuntimeEx 接收:org.codehaus.jackson.map.JsonMappingException:无法反序列化 inst java.util.LinkedHashMap 超出 VALUE_NUMBER_INT 令牌 在 [来源:java.io.StringReader@1e444c9;行:1,列:1]"

我无法理解为什么 cassandra 会出现此错误。

编辑:您至少应该在提问之前阅读官方文档

【问题讨论】:

    标签: cassandra datastax


    【解决方案1】:

    对于 Cassandra 2.0.x

    CREATE TABLE testcolumnfamily (rowkey text, ts timest amp, PRIMARY KEY(rowkey)) with caching='keys_only'and read_repair_chance=0.4;
    

    对于 Cassandra 2.1.0 及更高版本:

    CREATE TABLE testcolumnfamily (rowkey text, ts timest amp, PRIMARY KEY(rowkey)) with caching='{"keys":"ALL", "rows_per_partition":"10"}' and read_repair_chance=0.4;
    

    其中 rows_per_partition 是要为分区缓存的行数 Create Table in Cassandra

    【讨论】:

      猜你喜欢
      • 2016-06-06
      • 2022-01-10
      • 1970-01-01
      • 2022-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-18
      • 1970-01-01
      相关资源
      最近更新 更多