cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay <>
Subject Re: How to store tree structure in Cassandra
Date Thu, 29 Oct 2009 16:48:54 GMT
earlier, I was working on something similar to that... Some one has done
some work based on Hbase....

try this:
similar thing can be done on cassandra, if you looking at replacing the
persistence manager....

For remove instead of making it orphan you might want to remove it, unless
you want to write a map reduce job.


On Wed, Oct 28, 2009 at 12:35 AM, Mark Robson <> wrote:

> 2009/10/28 Brink <>
> Hi All,
>> For a DMS, I want to replace MySQL with Cassandra to store file/folder
>> nodes. Current I use adjacency list model to stores nodes hierarchy. The
>> shortage of the adjacency list model is the expensive traversal cost. While
>> I want to navigate the entire workspace or folder in hierarchy, I have to
>> execute multiple queries (for each sub folder). In addition, special care
>> must be taken when deleting nodes because of the potential for orphaning an
>> entire sub-tree in the process (delete a folder and all of its children may
>> be orphaned). How to design to store files/folders'node as tree structure in
>> Cassandra?
> Can you not use the entire path as a key? That would enable a recursive
> directory scan to become a simple range scan (which is supported provided
> you use the OrderedPartitioner)
> The downside is that if you want to scan the immediate children you get a
> lot of additional junk you have to discard.
> Storing redundant information in Cassandra (or any such database) is not an
> unusual solution - if you want very high scalability as well as good
> performance in competing cases (e.g. store the same thing under several
> keys)
> Mark

View raw message