ServerError: ErrorMessage code=0000 [Server error] message="java.lang.RuntimeEx ception: org.codehaus.jackson.map.JsonMappingException
ServerError: ErrorMessage code=0000 [Server error] message="java.lang.RuntimeEx ception: org.codehaus.jackson.map.JsonMappingException
我正在尝试创建一个列族
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 [Server error] message="java.lang.RuntimeEx
ception: org.codehaus.jackson.map.JsonMappingException: Can not deserialize inst
ance of java.util.LinkedHashMap out of VALUE_NUMBER_INT token
at [Source: java.io.StringReader@1e444c9; line: 1, column: 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
我正在尝试创建一个列族
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 [Server error] message="java.lang.RuntimeEx ception: org.codehaus.jackson.map.JsonMappingException: Can not deserialize inst ance of java.util.LinkedHashMap out of VALUE_NUMBER_INT token at [Source: java.io.StringReader@1e444c9; line: 1, column: 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