Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 52009 invoked from network); 24 Jul 2009 05:44:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jul 2009 05:44:17 -0000 Received: (qmail 23493 invoked by uid 500); 24 Jul 2009 05:45:21 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 23456 invoked by uid 500); 24 Jul 2009 05:45:21 -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 23447 invoked by uid 99); 24 Jul 2009 05:45:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2009 05:45:21 +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 (nike.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 05:45:12 +0000 Received: by pzk26 with SMTP id 26so934225pzk.32 for ; Thu, 23 Jul 2009 22:44:50 -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=hcGKle5MzKd273E3HJ0i38hqYGAEr3bWbqVo0seXQuI=; b=DRi90hFlIaGuRsGuV7prUNy221LBZoXw9a1UE+7uwDKK2i+ZQAU7yCtQlXNA0fH/+A 7+UW2hwX45TacHfjZojtni0bYgFDesPOKhLGbqMJPBAWBgibFctORpnCUWrlYvVH5b0h NVeHVq2mx6VGYCc3DuxgHErAjfONsLuaaI5wA= 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=vISjkZ8xIoh0V8MV/oxNFDXJpu10Q2YHZtrqr+IN+bVhq8ick9sHxwiWJRepYjCltC EB6ml+4Sx1DIkox2VVoRQU6sY2ZKVwT8vDuzQqkyFegRwGddYWfIIfiWce/x1IzwLomK rewXM5/7d9GqrYMtMa863Z1uBcAMszeKq4JtM= MIME-Version: 1.0 Received: by 10.142.216.11 with SMTP id o11mr447125wfg.159.1248414290642; Thu, 23 Jul 2009 22:44:50 -0700 (PDT) In-Reply-To: References: <6ff75cf20907230218o2efc35e5j9b82deaf1c199462@mail.gmail.com> <70254fc70907230359p5c8b19f7v86f7186ab2f09e1b@mail.gmail.com> <6ff75cf20907231854g4d9bc267q82fb770d7696762a@mail.gmail.com> <6ff75cf20907231913j43a30f14v8a3c5eee9c193f17@mail.gmail.com> Date: Fri, 24 Jul 2009 13:44:50 +0800 Message-ID: <6ff75cf20907232244v5928c9d0k492f0aad5b61ccb7@mail.gmail.com> Subject: Re: how to add table in storage-conf.xml From: =?GB2312?B?wO7pqg==?= To: cassandra-user@incubator.apache.org Content-Type: multipart/alternative; boundary=000e0cd30bd85388aa046f6d1a2f X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd30bd85388aa046f6d1a2f Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable firstly thanks Gasol and Michael, my problem solved. sencedly how to i solved? i find in default storage-conf.xml has a tag,and i add a new
tag,then i invoke with 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.java:50= 72) at org.apache.cassandra.service.Cassandra$Client.recv_insert(Cassandra.java:30= 3) at org.apache.cassandra.service.Cassandra$Client.insert(Cassandra.java:276) at com.chinaren.alumni4.cassandra.CClient.main(CClient.java:33) and then i delete
tag in storage-conf.xml, then i invoke with up program is ok. cassandra prohibit more than one
tag? 2009/7/24 Michael Greene > columnPath in 0.3 used to be defined as a composite string > "columnFamilyName:columnName" or > "columnFamilyName:superColumnName:columnName" > > Now in trunk/0.4 it is defined as a ColumnPath struct/object that can > be instanced as Gasol has written below. > > Michael > > 2009/7/23 =C0=EE=E9=AA : > > 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.m= box/%3Ce06563880907081147x57f2e4f2h5ae8f0f96dc81ebd@mail.gmail.com%3E > >>> > >>> On Thu, Jul 23, 2009 at 5:18 PM, =C0=EE=E9=AA = wrote: > >>>> > >>>> 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.java:= 5072) > >>>> at > >>>> > org.apache.cassandra.service.Cassandra$Client.recv_insert(Cassandra.java:= 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. > >> > > > > > --000e0cd30bd85388aa046f6d1a2f Content-Type: text/html; charset=GB2312 Content-Transfer-Encoding: quoted-printable firstly thanks Gasol and Michael, my problem solved.
sencedly how to i s= olved?
i find in default storage-conf.xml <Tables> has a <Table= Name=3D"Table1"> tag,and i add a new <Table Name=3D"u= sers"> tag,then i invoke with below program

client.insert("users", key_user_id, "content:name&q= uot;, "Chris Goffinet".getBytes("UTF-8"), timestamp, fa= lse);

and then throws exception:

Inv= alidRequestException(why:Column Family content is invalid.)
at org.apache.cassandra.service.Cassan= dra$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)

and then i delete <Table Na= me=3D"Table1"> tag in storage-conf.xml, then i invoke with up = program is ok. cassandra prohibit more than one <Table> tag?

2009/7/24 Michael Greene &= lt;michael.greene@gmail.com= >
columnPath in 0.3 used to be defined as a composite string
"columnFamilyName:columnName" or "columnFamilyName:superColu= mnName:columnName"

Now in trunk/0.4 it is defined as a ColumnPath struct/object that can
be instanced as Gasol has written below.

Michael

2009/7/23 =C0=EE=E9=AA <= qingnan.li@gmail.com= >:
> and
>
> package org.apache.cassandra.service;
>
> public void insert(String tablename, String key, String columnPath, by= te[]
> cellData, long timestamp, boolean block) throws InvalidRequestExceptio= n,
> UnavailableException, TException;
>
> columnPath type is String not ColumnPath class and i do not know how t= o do.
>
> thanks
>
> 2009/7/24 =C0=EE=E9=AA <qingnan.li@gmail.co= m>
>>
>> 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, &q= uot;name");
>>> client.insert("users", key_user_id, cp, "Chris<= br> >>> Goffinet".getBytes("UTF-8"), timestamp, false);=
>>>
>>> don't use trunk,unless you know what you are doing.
>>>
>>>
>>> http://mail-archives.apache.org/mod_mbo= x/incubator-cassandra-dev/200907.mbox/%3Ce06563880907081147x57f2e4f2h5ae8f0= f96dc81ebd@mail.gmail.com%3E
>>>
>>> On Thu, Jul 23, 2009 at 5:18 PM, =C0=EE=E9=AA <qingnan.li@gmail.com> wrote:
>>>>
>>>> i add table tag in storage-conf.xml:
>>>>  <Table Name=3D"users">
>>>>      <ColumnFamily ColumnSort=3D"Na= me" Name=3D"content"/>
>>>>  </Table>
>>>> and then invoke by below program:
>>>> client.insert("users", key_user_id, "conten= t:name", "Chris
>>>> Goffinet".getBytes("UTF-8"), timestamp, fal= se);
>>>> and then throws exception:
>>>> InvalidRequestException(why:Column Family content is inval= id.)
>>>> at
>>>> org.apache.cassandra.service.Cassandra$insert_result.read(= Cassandra.java:5072)
>>>> at
>>>> org.apache.cassandra.service.Cassandra$Client.recv_insert(= Cassandra.java:303)
>>>> at
>>>> org.apache.cassandra.service.Cassandra$Client.insert(Cassa= ndra.java:276)
>>>> at com.chinaren.alumni4.cassandra.CClient.main(CClient.jav= a:33)
>>>> please tell me why and how modify am i,thanks a lot.
>>
>
>

--000e0cd30bd85388aa046f6d1a2f--