From user-return-27430-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Thu Jul 5 14:39:30 2012 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 4BA239DAC for ; Thu, 5 Jul 2012 14:39:30 +0000 (UTC) Received: (qmail 62621 invoked by uid 500); 5 Jul 2012 14:39:28 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 62387 invoked by uid 500); 5 Jul 2012 14:39:27 -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 62368 invoked by uid 99); 5 Jul 2012 14:39:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jul 2012 14:39:27 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lilyevsky@mooncapital.com designates 38.105.147.185 as permitted sender) Received: from [38.105.147.185] (HELO mcm-exch-hc.MoonCapital.Corp) (38.105.147.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jul 2012 14:39:19 +0000 Received: from mcm-exch-mb.MoonCapital.Corp ([::1]) by mcm-exch-hc.MoonCapital.Corp ([10.5.1.85]) with mapi; Thu, 5 Jul 2012 10:38:51 -0400 From: Leonid Ilyevsky To: "'user@cassandra.apache.org'" Date: Thu, 5 Jul 2012 10:38:50 -0400 Subject: batch_mutate Thread-Topic: batch_mutate Thread-Index: Ac1ZGEVTEpL7qWhWSRSGYCO/Jud4agBoVM2w Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_A663AF0EC22BAB47966CA61D63C01B385606D22FmcmexchmbMoonCa_" MIME-Version: 1.0 --_000_A663AF0EC22BAB47966CA61D63C01B385606D22FmcmexchmbMoonCa_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable My current way of inserting rows one by one is too slow (I use cql3 prepare= d statements) , so I want to try batch_mutate. Could anybody give me more details about the interface? In the javadoc it s= ays: public void batch_mutate(java.util.Map>>> mutation_map, ConsistencyLevel consisten= cy_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException Description copied from interface: Cassandra.Iface Mutate many columns or super columns for many row keys. See also: Mutation.= mutation_map maps key to column family to a list of Mutation objects to ta= ke place at that scope. * I need to understand the meaning of the elements of mutation_map parameter. My guess is, the key in the outer map is columnfamily name, is this correct= ? The key in the inner map is, probably, a key to the columnfamily (it is som= ewhat confusing that it is String while the outer key is ByteBuffer, I wond= er what is the rational). If this is correct, how should I do it if my key = is a composite one. Does anybody have an example? Thanks, Leonid ________________________________ This email, along with any attachments, is confidential and may be legally = privileged or otherwise protected from disclosure. Any unauthorized dissemi= nation, copying or use of the contents of this email is strictly prohibited= and may be in violation of law. If you are not the intended recipient, any= disclosure, copying, forwarding or distribution of this email is strictly = prohibited and this email and any attachments should be deleted immediately= . This email and any attachments do not constitute an offer to sell or a so= licitation of an offer to purchase any interest in any investment vehicle s= ponsored by Moon Capital Management LP ("Moon Capital"). Moon Capital does = not provide legal, accounting or tax advice. Any statement regarding legal,= accounting or tax matters was not intended or written to be relied upon by= any person as advice. Moon Capital does not waive confidentiality or privi= lege as a result of this email. --_000_A663AF0EC22BAB47966CA61D63C01B385606D22FmcmexchmbMoonCa_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

My current way of inserting rows one by one is too slow (I u= se cql3 prepared statements) , so I want to try batch_mutate.

 

Could anybody give me more details about the interface? In t= he javadoc it says:

 

public void batch_mutate(java.util.Map<java.nio.ByteBuffer,java.util.Map<j= ava.lang.String,java.util.List<Mutation>>> mutation_map= ,

         &nbs= p;            &= nbsp;  ConsistencyLevel consistency_level)

         &nbs= p;        throws InvalidRequestException,

         &nbs= p;            &= nbsp;  UnavailableException,

         &nbs= p;            &= nbsp;  TimedOutException,

         &nbs= p;            &= nbsp;  org.apache.thrift.TException

Description copied fro= m interface: Cassandra.Iface=

Mutate many columns or su= per columns for many row keys. See also: Mutation. mutation_map maps key to= column family to a list of Mutation objects to take place at that scope. *

 

 

I need to understand the meaning of the elements of mutation= _map parameter.

My guess is, the key in the outer map is columnfamily name, = is this correct?

The key in the inner map is, probably, a key to the columnfa= mily (it is somewhat confusing that it is String while the outer key is Byt= eBuffer, I wonder what is the rational). If this is correct, how should I do it if my key is a co= mposite one. Does anybody have an example?

 

Thanks,

 

Leonid



This email, along with any a= ttachments, is confidential and may be legally privileged or otherwise prot= ected from disclosure. Any unauthorized dissemination, copying or use of th= e contents of this email is strictly prohibited and may be in violation of law. If you are not the intended recipient, any= disclosure, copying, forwarding or distribution of this email is strictly = prohibited and this email and any attachments should be deleted immediately= . This email and any attachments do not constitute an offer to sell or a solicitation of an offer to purcha= se any interest in any investment vehicle sponsored by Moon Capital Managem= ent LP (“Moon Capital”). Moon Capital does not provide legal, a= ccounting or tax advice. Any statement regarding legal, accounting or tax matters was not intended or written to be relied = upon by any person as advice. Moon Capital does not waive confidentiality o= r privilege as a result of this email.
--_000_A663AF0EC22BAB47966CA61D63C01B385606D22FmcmexchmbMoonCa_--