我有一个奇怪的问题.我的java应用程序通过astyanax将列放入cassandra.这似乎是暂时的,但是几个小时之后,如果我通过[row] [复合列],那么该列似乎就会消失.如果我获取整行,或者获取应该包含该列的一系列列,则返回该列.此行为发生在多个客户端,包括cassandra-cli和pycassa.例如:
get msg_metadata['someKey'];
=> (column=185779:completed, value={"timestamp":"1407777081","id":"167727"}, timestamp=1407777083241001)
Returned 1 results.
Elapsed time: 58 msec(s)
get msg_metadata['someKey']['185779:completed'];
=> (column=185779:completed, value={"timestamp":"1407777081","id":"167727"}, timestamp=1407777083241001)
Returned 1 results.
Elapsed time: 42 msec(s)
-- several hours later
get msg_metadata['someKey']['185779:completed'];
Value was not found
Elapsed time: 72 msec(s).
get msg_metadata['someKey'];
=> (column=185779:completed, value={"timestamp":"1407777081","id":"167727"}, timestamp=1407777083241001)
Returned 1 results.
Elapsed time: 107 msec(s)
Run Code Online (Sandbox Code Playgroud)
我在Cassandra 1.1.12集群中创建了以下列族:
create column family msg_metadata
with column_type = 'Standard'
and comparator = 'CompositeType(org.apache.cassandra.db.marshal.IntegerType,org.apache.cassandra.db.marshal.AsciiType)'
and default_validation_class = 'UTF8Type'
and key_validation_class = …Run Code Online (Sandbox Code Playgroud)