What is mutation in cassandra?

会有一股神秘感。 提交于 2019-12-07 07:32:46

问题


What is mutation in cassandra? What is it doing? i didnt find any full information about it... Can you answer or share the link with manual or description Thanks


回答1:


From http://wiki.apache.org/cassandra/API:

Mutation

A Mutation encapsulates either a column to insert, or a deletion to execute for a key. Like ColumnOrSuperColumn, the two properties are mutually exclusive - you may only set one on a Mutation.




回答2:


Mutation is a thrift-generated class defined in the cassandra.thrift file. You can find this file in the interface folder under your cassandra folder:

/**
    A Mutation is either an insert (represented by filling column_or_supercolumn)
    or a deletion (represented by filling the deletion attribute).
    @param column_or_supercolumn. An insert to a column or supercolumn
        (possibly counter column or supercolumn)
    @param deletion. A deletion of a column or supercolumn
*/
struct Mutation {
    1: optional ColumnOrSuperColumn column_or_supercolumn,
    2: optional Deletion deletion,
}

where ColumnOrSuperColumn and Deletion are also thrift objects, defined in the same file.



来源:https://stackoverflow.com/questions/7573106/what-is-mutation-in-cassandra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!