Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 1619 invoked from network); 24 Jul 2009 02:13:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jul 2009 02:13:12 -0000 Received: (qmail 12670 invoked by uid 500); 24 Jul 2009 02:14:17 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 12655 invoked by uid 500); 24 Jul 2009 02:14:17 -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 12646 invoked by uid 99); 24 Jul 2009 02:14:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2009 02:14:17 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of qingnan.li@gmail.com designates 209.85.222.188 as permitted sender) Received: from [209.85.222.188] (HELO mail-pz0-f188.google.com) (209.85.222.188) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2009 02:14:10 +0000 Received: by pzk26 with SMTP id 26so858165pzk.32 for ; Thu, 23 Jul 2009 19:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=5q2HZWatJr/OofFZlFSBIakM9Th9R4Lo6CIcYcnAQHk=; b=rrt0wZB3UYxDSLzwfZhKYazQobWm58Ifj7hfZtVZ3axZoutAJSL9ej63tfdP3NQnbb KikOjJQ2WYBJgprjhHd9q82UHA2WPl6CsJPUO+gJmrYYQKMfahu/WJg3r8c2bx9UwwyD Gy/YA5j74CNJ1+9SVDHCpC0R8CqbmoGF7P7OY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=obyJ6FX8phqz/M1D9c3g3VRl2jzbtOdkuSY78TDEPTkJ7FAN5EK/UpIZEPsRc/Rng8 gTphJQVerwaYhbIBmE4qgsgGTuFaLtIylVANrkiUSgNSg5N1OiPN/GrcbAvbUiwUyXDd Bo/lrB+digCKA063zAW29kOZbGbXGCuIC8TSg= MIME-Version: 1.0 Received: by 10.142.58.20 with SMTP id g20mr525511wfa.79.1248401629907; Thu, 23 Jul 2009 19:13:49 -0700 (PDT) In-Reply-To: <6ff75cf20907231854g4d9bc267q82fb770d7696762a@mail.gmail.com> References: <6ff75cf20907230218o2efc35e5j9b82deaf1c199462@mail.gmail.com> <70254fc70907230359p5c8b19f7v86f7186ab2f09e1b@mail.gmail.com> <6ff75cf20907231854g4d9bc267q82fb770d7696762a@mail.gmail.com> Date: Fri, 24 Jul 2009 10:13:49 +0800 Message-ID: <6ff75cf20907231913j43a30f14v8a3c5eee9c193f17@mail.gmail.com> Subject: Re: how to add table in storage-conf.xml From: =?GB2312?B?wO7pqg==?= To: cassandra-user@incubator.apache.org, gasol.wu@gmail.com Content-Type: multipart/alternative; boundary=001636e8ffd2b00cee046f6a2728 X-Virus-Checked: Checked by ClamAV on apache.org --001636e8ffd2b00cee046f6a2728 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable and package org.apache.cassandra.service; public void insert(String tablename, String key, String columnPath, byte[] cellData, long timestamp, boolean block) throws InvalidRequestException, UnavailableException, TException; columnPath type is String not ColumnPath class and i do not know how to do. thanks 2009/7/24 =C0=EE=E9=AA > i use apache-cassandra-incubating-0.3.0.jar and not find ColumnPath > class. > > 2009/7/23 Gasol Wu > > ColumnPath cp =3D new ColumnPath("content", null, "name"); >> client.insert("users", key_user_id, cp, "Chris >> Goffinet".getBytes("UTF-8"), timestamp, false); >> >> don't use trunk,unless you know what you are doing. >> >> >> http://mail-archives.apache.org/mod_mbox/incubator-cassandra-dev/200907.= mbox/%3Ce06563880907081147x57f2e4f2h5ae8f0f96dc81ebd@mail.gmail.com%3E >> >> >> On Thu, Jul 23, 2009 at 5:18 PM, =C0=EE=E9=AA wro= te: >> >>> i add table tag in storage-conf.xml: >>> >>> >>>
>>> >>> and then invoke by below program: >>> >>> client.insert("users", key_user_id, "content:name", "Chris >>> Goffinet".getBytes("UTF-8"), timestamp, false); >>> >>> and then throws exception: >>> >>> InvalidRequestException(why:Column Family content is invalid.) >>> at >>> org.apache.cassandra.service.Cassandra$insert_result.read(Cassandra.jav= a:5072) >>> at >>> org.apache.cassandra.service.Cassandra$Client.recv_insert(Cassandra.jav= a:303) >>> at >>> org.apache.cassandra.service.Cassandra$Client.insert(Cassandra.java:276= ) >>> at com.chinaren.alumni4.cassandra.CClient.main(CClient.java:33) >>> >>> please tell me why and how modify am i,thanks a lot. >>> >> >> > --001636e8ffd2b00cee046f6a2728 Content-Type: text/html; charset=GB2312 Content-Transfer-Encoding: quoted-printable and

package org.apache.cassandra.service;

public void insert= (String tablename, String key, String columnPath, byte[] cellData, long tim= estamp, boolean block) throws InvalidRequestException, UnavailableException= , TException;

columnPath type is String not ColumnPath class and i do not know how to= do.

thanks

2009/7/24 =C0=EE=E9=AA= <qingnan.li@gmail.com>
i use apache-cassandra-incubating-0.3.0.jar and not find  Col= umnPath class.

2009/7/23 Gasol Wu <gasol.wu@gmail.com= >

ColumnPath cp =3D= new ColumnPath("content", null, "name");
client.ins= ert("users", key_user_id, cp, "Chris Goffinet".getBytes= ("UTF-8"), timestamp, false);

don't use trunk,unless you know what you are doing.

http://mail-archives.apache.org/mod_mbox/incubat= or-cassandra-dev/200907.mbox/%3Ce06563880907081147x57f2e4f2h5ae8f0f96dc81eb= d@mail.gmail.com%3E


On Thu, Jul 23, 2009 at 5:18 PM, =C0=EE=E9= =AA <q= ingnan.li@gmail.com&= gt; wrote:
i add table tag in storage-conf.xml:

 <Table Name= =3D"users">
     <ColumnFamily Col= umnSort=3D"Name" Name=3D"content"/>
 = </Table>

and then invoke by below program:

clien= t.insert("users", key_user_id, "content:name", "Ch= ris Goffinet".getBytes("UTF-8"), timestamp, false);

and then throws exception:

InvalidRequestException(why:Column Family content is invalid.)
= at org.apache.cassandra.service.C= assandra$insert_result.read(Cassandra.java:5072)
at org.apache.cassandra.serv= ice.Cassandra$Client.recv_insert(Cassandra.java:303)
at org.apache.cassandra.service.Cassandra$Cl= ient.insert(Cassandra.java:276)
at com.chinaren.alumni4.cass= andra.CClient.main(CClient.java:33)

please tell me= why and how modify am i,thanks a lot.



--001636e8ffd2b00cee046f6a2728--