From cassandra-user-return-348-apmail-incubator-cassandra-user-archive=incubator.apache.org@incubator.apache.org Fri Jul 24 02:19:46 2009 Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 3476 invoked from network); 24 Jul 2009 02:19:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jul 2009 02:19:43 -0000 Received: (qmail 14400 invoked by uid 500); 24 Jul 2009 02:20:48 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 14390 invoked by uid 500); 24 Jul 2009 02:20:48 -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 14381 invoked by uid 99); 24 Jul 2009 02:20:48 -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:20:48 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.greene@gmail.com designates 209.85.210.190 as permitted sender) Received: from [209.85.210.190] (HELO mail-yx0-f190.google.com) (209.85.210.190) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2009 02:20:40 +0000 Received: by yxe28 with SMTP id 28so801498yxe.32 for ; Thu, 23 Jul 2009 19:20:20 -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:cc:content-type :content-transfer-encoding; bh=vGfHzp6ibYDt/A6B1zVS9hzmKdD43mZArT8Fdf9CjJk=; b=cbNz6QKt9wGHxsHJ85BWH/B8bFYaL7gTB+wb+FwsB5aNTVQCEa1ZAMiPooqiGVbXh4 cL5ezFa9U157bTzEoUfSISVPl8VFeBylMZPV4yPiV1+d9qebaRBmnP/So0EfFVt3Rcya SAS9nwrH1IIzCIVClqIE1NpqcgS4im9/R6/Ko= 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 :cc:content-type:content-transfer-encoding; b=E6OLCIvdmQf46gHjoAbEwmFaEq4JoqSsNdUdxjjGq0WQm5YIRtWOyIkkzOc0enhTjJ JpbZZ5pNG/7jG/NMGF6JMNGn1KWy1tNUdPG3TnKkAVxNJfViQwwW65ujw6b0O6SmTVXU ErPP59ONlizA+tShH9nHcokUZ2UWcCMQCHm0s= MIME-Version: 1.0 Received: by 10.100.144.6 with SMTP id r6mr3933602and.10.1248402019955; Thu, 23 Jul 2009 19:20:19 -0700 (PDT) In-Reply-To: <6ff75cf20907231913j43a30f14v8a3c5eee9c193f17@mail.gmail.com> References: <6ff75cf20907230218o2efc35e5j9b82deaf1c199462@mail.gmail.com> <70254fc70907230359p5c8b19f7v86f7186ab2f09e1b@mail.gmail.com> <6ff75cf20907231854g4d9bc267q82fb770d7696762a@mail.gmail.com> <6ff75cf20907231913j43a30f14v8a3c5eee9c193f17@mail.gmail.com> Date: Thu, 23 Jul 2009 21:20:19 -0500 Message-ID: Subject: Re: how to add table in storage-conf.xml From: Michael Greene To: cassandra-user@incubator.apache.org Cc: gasol.wu@gmail.com Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org columnPath in 0.3 used to be defined as a composite string "columnFamilyName:columnName" or "columnFamilyName:superColumnName:columnNa= me" 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 d= o. > > 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 wr= ote: >>>> >>>> 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.ja= va:5072) >>>> at >>>> org.apache.cassandra.service.Cassandra$Client.recv_insert(Cassandra.ja= va:303) >>>> at >>>> org.apache.cassandra.service.Cassandra$Client.insert(Cassandra.java:27= 6) >>>> at com.chinaren.alumni4.cassandra.CClient.main(CClient.java:33) >>>> please tell me why and how modify am i,thanks a lot. >> > >