From cassandra-user-return-752-apmail-incubator-cassandra-user-archive=incubator.apache.org@incubator.apache.org Fri Oct 02 08:50:57 2009 Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 50094 invoked from network); 2 Oct 2009 08:50:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Oct 2009 08:50:57 -0000 Received: (qmail 12009 invoked by uid 500); 2 Oct 2009 08:50:57 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 11988 invoked by uid 500); 2 Oct 2009 08:50:57 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 11979 invoked by uid 99); 2 Oct 2009 08:50:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 08:50:57 +0000 X-ASF-Spam-Status: No, hits=-1.8 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rpuig@tid.es designates 195.235.93.200 as permitted sender) Received: from [195.235.93.200] (HELO correo-bck.tid.es) (195.235.93.200) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 08:50:47 +0000 Received: from vanvan (localhost [127.0.0.1]) by tid.hi.inet (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0KQV009U2PW28P@tid.hi.inet> for cassandra-user@incubator.apache.org; Fri, 02 Oct 2009 10:50:26 +0200 (MEST) Received: from correo.tid.es (mailhost.hi.inet [10.95.64.100]) by tid.hi.inet (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTPS id <0KQV009TZPW28P@tid.hi.inet> for cassandra-user@incubator.apache.org; Fri, 02 Oct 2009 10:50:26 +0200 (MEST) Received: from EXCLU2K7.hi.inet ([10.95.67.65]) by htcasmad1.hi.inet ([192.168.0.1]) with mapi; Fri, 02 Oct 2009 10:50:26 +0200 Date: Fri, 02 Oct 2009 10:50:24 +0200 From: ROGER PUIG GANZA Subject: client code supercolumn insertion from cassandra 0.3.0 to 0.4.0 To: "cassandra-user@incubator.apache.org" Message-id: <48123402268B2A44BA2ECFE8FAF0158D28CB50F950@EXCLU2K7.hi.inet> MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_ov3Fp082KgLRzg9edZRdTw)" Content-language: en-US Accept-Language: en-US Thread-topic: client code supercolumn insertion from cassandra 0.3.0 to 0.4.0 Thread-index: AcpDPWHEHFGYyXG3QZG5xxG5OaiCZA== acceptlanguage: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: X-Virus-Checked: Checked by ClamAV on apache.org --Boundary_(ID_ov3Fp082KgLRzg9edZRdTw) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Hi, I'm having problems with the translation of the client code for Cassandra 0.3.0 to the 0.4.0 My code for inserting columns is working properly but the one for the supercolumns is not working. Can anyone point me where the error is? I'm skipping the exception handling code. Code for Cassandra 0.3.0 is working properly, I can get the values with the client code using the get_superColumn method and throught Cassandra-cli using get .[][][] Map> sColMap = new HashMap>();; Map> colMap = new HashMap>();; List sCol = new ArrayList();; List columns= new ArrayList(); columns.add(new column_t(subColKey, "".getBytes("UTF-8"), timestamp)); sCol.add(new superColumn_t(columnName, columns)); sColMap.put(superColumnName, sCol); batch_mutation_super_t bms = new batch_mutation_super_t(keyspace, superColKey, sColMap); client.batch_insert_superColumn(bms, false); Code for Cassandra 0.4.0 . It's suppoded to be working but when I fetch a superColumn with using the superKey, it returns a NotFoundException and when using the Cassandra-cli, I get this InvalidRequestException(why:column parameter is not optional for super CF List colums = new ArrayList(); Map> map = new HashMap>(); List subColumns = new ArrayList(); columns.add(new Column(key.getBytes("UTF-8"), "".getBytes("UTF-8"), timestamp)); subColumns.add(new ColumnOrSuperColumn(null, new SuperColumn(InfoPerUserColNames.CFDevel.getBytes("UTF-8"), columns))); map.put(superColumnName, subColumns); client.batch_insert(keyspace, superKey, map, ConsistencyLevel.ZERO); thanks for your help. Roger Puig --Boundary_(ID_ov3Fp082KgLRzg9edZRdTw) Content-type: text/html; charset=us-ascii Content-transfer-encoding: 7BIT

Hi, I’m having problems with the translation of the client code for Cassandra 0.3.0 to the 0.4.0

My code for inserting columns is working properly but the one for the supercolumns is not working.

Can anyone point me where the error is?

 

I’m skipping the exception handling code.

 

Code for Cassandra 0.3.0  is working properly, I can get the values with the client code using the get_superColumn method and throught Cassandra-cli using get <tablename>.<CFName>[<key>][<col>][<subcol>]

 

Map<String, List<superColumn_t>> sColMap = new HashMap<String,List<superColumn_t>>();;

Map<String,List<column_t>> colMap = new HashMap<String,List<column_t>>();;

List<superColumn_t> sCol = new ArrayList<superColumn_t>();;

List<column_t> columns= new ArrayList<column_t>();

 

columns.add(new column_t(subColKey, "".getBytes("UTF-8"), timestamp));

 

sCol.add(new superColumn_t(columnName, columns));

 

sColMap.put(superColumnName, sCol);

 

batch_mutation_super_t bms = new batch_mutation_super_t(keyspace, superColKey, sColMap);

 

client.batch_insert_superColumn(bms, false);

 

 

Code for Cassandra 0.4.0 . It’s suppoded to be working but when I fetch a superColumn with using the superKey, it returns a NotFoundException and when using the Cassandra-cli, I get this

InvalidRequestException(why:column parameter is not optional for super CF <CFName>

 

List<Column> colums = new ArrayList<Column>();

Map<String,List<ColumnOrSuperColumn>> map = new HashMap<String, List<ColumnOrSuperColumn>>();

List<ColumnOrSuperColumn> subColumns = new ArrayList<ColumnOrSuperColumn>();

 

columns.add(new Column(key.getBytes("UTF-8"), "".getBytes("UTF-8"), timestamp));

subColumns.add(new ColumnOrSuperColumn(null, new SuperColumn(InfoPerUserColNames.CFDevel.getBytes("UTF-8"), columns)));

 

map.put(superColumnName, subColumns);

client.batch_insert(keyspace, superKey, map, ConsistencyLevel.ZERO);

 

 

thanks for your help.

 

Roger Puig

 

--Boundary_(ID_ov3Fp082KgLRzg9edZRdTw)--