Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6216417761 for ; Mon, 2 Mar 2015 15:55:44 +0000 (UTC) Received: (qmail 43167 invoked by uid 500); 2 Mar 2015 15:55:41 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 43129 invoked by uid 500); 2 Mar 2015 15:55:41 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 43119 invoked by uid 99); 2 Mar 2015 15:55:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2015 15:55:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ajay.garga@gmail.com designates 209.85.215.53 as permitted sender) Received: from [209.85.215.53] (HELO mail-la0-f53.google.com) (209.85.215.53) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2015 15:55:37 +0000 Received: by labgf13 with SMTP id gf13so6653373lab.5 for ; Mon, 02 Mar 2015 07:55:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6Nuu5+j+P5OWbx0zyPlkhPxByaHNhjT0jCBdNaEG76c=; b=rCKyOYeiBJcp5gfiUtw28VrGnghAyc5SJNqKQsF38RZnB2tYAqMpIqtKCxnK2RNX6z wABoOOQCY66K9DzDXRpiH4ve9W7m0NwLlDZNqptfNmtZSJlvlXo8zFPkuhkRInVe71uP Po/LSIdVbkTW6dn5iB5tmnr8H5j7Iv0s4+pcCf2ptBkDaOcd4uXk4E4SuP/1m9P+iIjQ CYB65nJIqHvcQbpGYiLiuchnEJgqB0z4TEGgDav8W+MduiaSZ2M1uIOfupmaldcNIrwv grV9RmsmZjC9VsrzFOtmLN/VXqcLmjVqN9u8MVb/XSYkm6LXGoWGxeM/IA81AlVtBomU Dq0A== MIME-Version: 1.0 X-Received: by 10.112.180.198 with SMTP id dq6mr8060669lbc.93.1425311716405; Mon, 02 Mar 2015 07:55:16 -0800 (PST) Received: by 10.25.88.75 with HTTP; Mon, 2 Mar 2015 07:55:16 -0800 (PST) Received: by 10.25.88.75 with HTTP; Mon, 2 Mar 2015 07:55:16 -0800 (PST) In-Reply-To: References: Date: Mon, 2 Mar 2015 21:25:16 +0530 Message-ID: Subject: Re: Optimal Batch size (Unlogged) for Java driver From: Ajay To: java-driver-user@lists.datastax.com Cc: user Content-Type: multipart/alternative; boundary=001a11c26b428cf9f50510503ece X-Virus-Checked: Checked by ClamAV on apache.org --001a11c26b428cf9f50510503ece Content-Type: text/plain; charset=UTF-8 I have a column family with 15 columns where there are timestamp, timeuuid, few text fields and rest int fields. If I calculate the size of its column name and it's value and divide 5kb (recommended max size for batch) with the value, I get result as 12. Is it correct?. Am I missing something? Thanks Ajay On 02-Mar-2015 12:13 pm, "Ankush Goyal" wrote: > Hi Ajay, > > I would suggest, looking at the approximate size of individual elements in > the batch, and based on that compute max size (chunk size). > > Its not really a straightforward calculation, so I would further suggest > making that chunk size a runtime parameter that you can tweak and play > around with until you reach stable state. > > On Sunday, March 1, 2015 at 10:06:55 PM UTC-8, Ajay Garga wrote: >> >> Hi, >> >> I am looking at a way to compute the optimal batch size in the client >> side similar to the below mentioned bug in the server side (generic as we >> are exposing REST APIs for Cassandra, the column family and the data are >> different each request). >> >> https://issues.apache.org/jira/browse/CASSANDRA-6487 >> >> >> How do we compute(approximately using ColumnDefintions or ColumnMetadata) >> the size of a row of a column family from the client side using Cassandra >> Java driver? >> >> Thanks >> Ajay >> > To unsubscribe from this group and stop receiving emails from it, send an > email to java-driver-user+unsubscribe@lists.datastax.com. > --001a11c26b428cf9f50510503ece Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I have a column family with 15 columns where there are times= tamp, timeuuid,=C2=A0 few text fields and rest int=C2=A0 fields.=C2=A0 If I= calculate the size of its column name=C2=A0 and it's value and divide = 5kb (recommended max size for batch) with the value,=C2=A0 I get result as = 12. Is it correct?. Am I missing=C2=A0 something?

Thanks
Ajay

On 02-Mar-2015 12:13 pm, "Ankush Goyal"= ; <ankgyl@gmail.com> wrote:
Hi A= jay,

I would suggest, looking at the approximate size of individual = elements in the batch, and based on that compute max size (chunk size).
=
Its not really a straightforward calculation, so I would further sugges= t making that chunk size a runtime parameter that you can tweak and play ar= ound with until you reach stable state.

On Sunday, March 1, 2015 at= 10:06:55 PM UTC-8, Ajay Garga wrote:
Hi,

I am looking at a w= ay to compute the optimal batch size in the client side similar to the belo= w mentioned bug in the server side (generic as we are exposing REST APIs fo= r Cassandra, the column family and the data are different each request).
https://= issues.apache.org/jira/browse/CASSANDRA-6487

How do= we compute(approximately using ColumnDefintions or ColumnMetadata) the siz= e of a row of a column family from the client side using Cassandra Java dri= ver?

Thanks
Ajay

To unsubscribe from this group and stop receiving emails from it, send an e= mail to java-driver-user+unsubscribe@lists.datastax.com.
--001a11c26b428cf9f50510503ece--