Generally if you foresee the partitions getting out of control in terms of size, a method often employed is to bucket according to some criteria. For example, if I have a time series use case, I might bucket by month or week. That presumes you can foresee it though. As far as limiting that capability, I can see that being in the ballpark of https://issues.apache.org/jira/browse/CASSANDRA-8303 <https://issues.apache.org/jira/browse/CASSANDRA-8303> but a bit trickier than the limits mentioned in that ticket.
> On Sep 12, 2016, at 12:17 PM, Anshu Vajpayee <anshu.vajpa...@gmail.com> wrote: > > Thanks Jeff. I got the answer now. > Is there any way to put guardrail to avoid large partition from cassandra > side? I know it is modeling problem and cassandra writes warning on system. > log for large partition. But I think there should be a way to put > restriction for it from Cassandra side. > > On 12 Sep 2016 9:50 p.m., "Jeff Jirsa" <jji...@apache.org > <mailto:jji...@apache.org>> wrote: > On 2016-09-08 18:53 (-0700), Anshu Vajpayee <anshu.vajpa...@gmail.com > <mailto:anshu.vajpa...@gmail.com>> wrote: > > Is there any way to get partition size for a partition key ? > > > > Anshu, > > The simple answer to your question is that it is not currently possible to > get a partition size for an arbitrary key without quite a lot of work > (basically you'd have to write a tool that iterated over the data on disk, > which is nontrivial). > > There exists a ticket to expose this: > https://issues.apache.org/jira/browse/CASSANDRA-12367 > <https://issues.apache.org/jira/browse/CASSANDRA-12367> > > It's not clear when that ticket will land, but I expect you'll see an API for > getting the size of a partition key in the near future. > >