I am not sure yet if this is a good idea or not but we might want to
consider partitions on a per-namespace basis, e.g. prefixing row keys
with predefined namespaces. I understand that this might not be the
preferred course of action for those of you using one cassandra cluster
per application (SLAs, etc) but nothing prevents you from running a
partitioner per cluster under this scheme.

Here's how this could work:

In storage-conf.xml:

<partitioner ns="mynsp0">RandomPartitioner"</partitioner>
<partitioner ns="mynsp1">OrderPreservingPartitioner"</paritioner>

The row key would then be of the form "mynamespace:mykey" (namespace
would be optional). If no namespace is provided then the default
partitioner is used. In this way we could support ranges for those keys
that their namespace's partitioner supports it. Of course, namespaces
could also be used for other purposes.

I have discussed this with a friend who encouraged me to post here. I
hope I'm not way off with this one.

An alternative is to get multiple tables working and implement per-table
partitioner support. I think there is a conceptual distinction between
the two in the sense that a table would most likely be a grouping of
column families whereas namespaces could span different tables and, in
some occasions/applications, one might want to utilize the same column
families with different namespaces.

Any feedback is greatly appreciated.

- Neophytos

Reply via email to