You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "techpyaasa ." <te...@gmail.com> on 2017/05/23 13:25:41 UTC

How to find dataSize at client side?

* WARN [SharedPool-Worker-1] 2017-05-22 20:28:46,204 BatchStatement.java
(line 253) Batch of prepared statements for [site24x7.wm_rawstats_tb,
site24x7.wm_rawstats] is of size 6122, exceeding specified threshold of
5120 by 1002*
We are frequently getting this message in logs, so I wanted to restrict
inserts at client side by calculating *dataSize* of insert/batch statements
before sending it to c* servers.

We are using datastax java drivers , how can I get dataSize here??


Any ideas??

Thanks in advance
TechPyaasa

Re: How to find dataSize at client side?

Posted by Nicolas Guyomar <ni...@gmail.com>.
Hi,

The list is opened :
https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user,
feel free to subscribe.

Datastax is the main maintainer of the java driver, which is open source (
https://github.com/datastax/java-driver ) , which is not the same driver as
the DSE one : https://github.com/datastax/java-dse-driver



On 24 May 2017 at 10:53, techpyaasa . <te...@gmail.com> wrote:

> Hi Nicolas
>
> I think only DataStax Enterprise(paid) c* version can ask questions/get
> support from datastax :(
>
> On Tue, May 23, 2017 at 9:44 PM, techpyaasa . <te...@gmail.com>
> wrote:
>
>> Thanks for your reply..
>>
>> On Tue, May 23, 2017 at 7:40 PM, Nicolas Guyomar <
>> nicolas.guyomar@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> If you were to know the batch size on client side to make sure it does
>>> not get above the 5kb limit, so that you can "limit the number of
>>> statements in a batch", I would suspect you do not need batch at all right
>>> ? See  https://inoio.de/blog/2016/01/13/cassandra-to-batch-or-not-
>>> to-batch/
>>>
>>> As for your question, you might get an answer on the java driver ML :
>>> java-driver-user@lists.datastax.com
>>>
>>>
>>> On 23 May 2017 at 15:25, techpyaasa . <te...@gmail.com> wrote:
>>>
>>>>
>>>> * WARN [SharedPool-Worker-1] 2017-05-22 20:28:46,204
>>>> BatchStatement.java (line 253) Batch of prepared statements for
>>>> [site24x7.wm_rawstats_tb, site24x7.wm_rawstats] is of size 6122, exceeding
>>>> specified threshold of 5120 by 1002*
>>>> We are frequently getting this message in logs, so I wanted to restrict
>>>> inserts at client side by calculating *dataSize* of insert/batch
>>>> statements before sending it to c* servers.
>>>>
>>>> We are using datastax java drivers , how can I get dataSize here??
>>>>
>>>>
>>>> Any ideas??
>>>>
>>>> Thanks in advance
>>>> TechPyaasa
>>>>
>>>
>>>
>>
>

Re: How to find dataSize at client side?

Posted by "techpyaasa ." <te...@gmail.com>.
Hi Nicolas

I think only DataStax Enterprise(paid) c* version can ask questions/get
support from datastax :(

On Tue, May 23, 2017 at 9:44 PM, techpyaasa . <te...@gmail.com> wrote:

> Thanks for your reply..
>
> On Tue, May 23, 2017 at 7:40 PM, Nicolas Guyomar <
> nicolas.guyomar@gmail.com> wrote:
>
>> Hi,
>>
>> If you were to know the batch size on client side to make sure it does
>> not get above the 5kb limit, so that you can "limit the number of
>> statements in a batch", I would suspect you do not need batch at all right
>> ? See  https://inoio.de/blog/2016/01/13/cassandra-to-batch-or-not-
>> to-batch/
>>
>> As for your question, you might get an answer on the java driver ML :
>> java-driver-user@lists.datastax.com
>>
>>
>> On 23 May 2017 at 15:25, techpyaasa . <te...@gmail.com> wrote:
>>
>>>
>>> * WARN [SharedPool-Worker-1] 2017-05-22 20:28:46,204 BatchStatement.java
>>> (line 253) Batch of prepared statements for [site24x7.wm_rawstats_tb,
>>> site24x7.wm_rawstats] is of size 6122, exceeding specified threshold of
>>> 5120 by 1002*
>>> We are frequently getting this message in logs, so I wanted to restrict
>>> inserts at client side by calculating *dataSize* of insert/batch
>>> statements before sending it to c* servers.
>>>
>>> We are using datastax java drivers , how can I get dataSize here??
>>>
>>>
>>> Any ideas??
>>>
>>> Thanks in advance
>>> TechPyaasa
>>>
>>
>>
>

Re: How to find dataSize at client side?

Posted by Nicolas Guyomar <ni...@gmail.com>.
Hi,

If you were to know the batch size on client side to make sure it does not
get above the 5kb limit, so that you can "limit the number of statements in
a batch", I would suspect you do not need batch at all right ? See
https://inoio.de/blog/2016/01/13/cassandra-to-batch-or-not-to-batch/

As for your question, you might get an answer on the java driver ML :
java-driver-user@lists.datastax.com


On 23 May 2017 at 15:25, techpyaasa . <te...@gmail.com> wrote:

>
> * WARN [SharedPool-Worker-1] 2017-05-22 20:28:46,204 BatchStatement.java
> (line 253) Batch of prepared statements for [site24x7.wm_rawstats_tb,
> site24x7.wm_rawstats] is of size 6122, exceeding specified threshold of
> 5120 by 1002*
> We are frequently getting this message in logs, so I wanted to restrict
> inserts at client side by calculating *dataSize* of insert/batch
> statements before sending it to c* servers.
>
> We are using datastax java drivers , how can I get dataSize here??
>
>
> Any ideas??
>
> Thanks in advance
> TechPyaasa
>