From cassandra-user-return-23-apmail-incubator-cassandra-user-archive=incubator.apache.org@incubator.apache.org Thu Apr 09 21:38:58 2009 Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 25007 invoked from network); 9 Apr 2009 21:38:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Apr 2009 21:38:58 -0000 Received: (qmail 73631 invoked by uid 500); 9 Apr 2009 21:38:58 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 73597 invoked by uid 500); 9 Apr 2009 21:38:58 -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 73588 invoked by uid 99); 9 Apr 2009 21:38:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2009 21:38:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 209.85.221.108 as permitted sender) Received: from [209.85.221.108] (HELO mail-qy0-f108.google.com) (209.85.221.108) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2009 21:38:50 +0000 Received: by qyk6 with SMTP id 6so1429958qyk.32 for ; Thu, 09 Apr 2009 14:38:29 -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 :content-transfer-encoding; bh=i8ssSFzI8tWB2AdrHCrERDlh8KarIugZw7d4GsiNy9Y=; b=ro6NvAz0oePNc01vAKYe7hSxhTsSCC9jwfdWirOREsO2XQeYFjBJEVIOMD+6qqxCco ki6vg8HqWKnJkjRZYcZOO58AC+MJ51WnZAPyxl3W1QxATRQgngDnO5mXXy9pLAT+c35C yrUlWxILratvaKDBb+C1ZOQygQ9UwcbGQ933k= 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:content-transfer-encoding; b=rWy6pWpoqeaxxTLE84/cAbJEJGm+gTM1dW2eOLuhIsVqPgrllhye7ecoWx9plaRFI0 J9gQw7ORlNVNuotHOXIuhZbrPXvgtGlZORxhwQEQlP7pcxudlepU5Ak0/Wj7O1I+fMAn j9SycapTFBiYecoq2VkaW/77jNGODycE3EKsA= MIME-Version: 1.0 Received: by 10.229.85.4 with SMTP id m4mr1057358qcl.55.1239313109502; Thu, 09 Apr 2009 14:38:29 -0700 (PDT) In-Reply-To: <3317711b0904091431i2bedd99elab7039794fa70b46@mail.gmail.com> References: <3317711b0904091402l6c5e998wf310cd3934982074@mail.gmail.com> <3317711b0904091419r37f83ad7y9f62f171ea3a5a9e@mail.gmail.com> <3317711b0904091431i2bedd99elab7039794fa70b46@mail.gmail.com> Date: Thu, 9 Apr 2009 16:38:29 -0500 Message-ID: Subject: Re: Sample Client Code From: Jonathan Ellis To: cassandra-user@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org So content:xml is your ColumnFamily:column tuple. That looks right. That exception is from the client side, right? That looks to me like it can't connect to the server. Your connection code looks okay... port should be the thrift port, 9160 if you haven't changed it. On Thu, Apr 9, 2009 at 4:31 PM, Sam D wrote: > No, its not a supercolumn, how do I retrieve it if its not a supercolumn = ?. > > =A0=A0=A0=A0 > =A0=A0=A0=A0=A0=A0 > =A0=A0=A0=A0
> > I didn't notice it earlier, but yes, I am seeing the following exception = in > the log > > Exception in thread "main" > com.facebook.thrift.transport.TTransportException: Cannot write to null > outputStream > =A0=A0=A0 at com.facebook.thrift.transport.TIOStreamTransport.write(Unkno= wn > Source) > =A0=A0=A0 at com.facebook.thrift.protocol.TBinaryProtocol.writeI32(Unknow= n Source) > > Thanks > > On Thu, Apr 9, 2009 at 2:24 PM, Jonathan Ellis wrote: >> >> is content a supercolumn? =A0otherwise specifying a subcolumn isn't goin= g to >> work. >> >> did you check your log file for exceptions? >> >> On Thu, Apr 9, 2009 at 4:19 PM, Sam D wrote: >> > Thanks for the quick response, >> > >> > I have only one node. So the web client also should see the data, righ= t >> > ?. >> > Below is the code which I am using to read. >> > >> > =A0=A0 =A0=A0=A0 socket =3D new TSocket(machine,port); >> > =A0=A0=A0 =A0=A0=A0 TProtocol tp =3D new TBinaryProtocol(socket); >> > =A0=A0=A0 =A0=A0=A0 cl =3D new Cassandra.Client(tp); >> > =A0=A0=A0 =A0=A0=A0 socket.open(); >> > =A0=A0=A0=A0 =A0=A0 column_t u1 =3D cl.get_column("xmls","x1","content= :xml"); >> > =A0=A0=A0 =A0=A0=A0 System.out.println("xml : " + u1.value); >> > >> > Sam. >> > >> > On Thu, Apr 9, 2009 at 2:07 PM, Jonathan Ellis >> > wrote: >> >> >> >> That looks reasonable. =A0How are you reading the data back out? =A0T= he >> >> web interface only hits the local machine so it is not very useful in >> >> a clustered situation. >> >> >> >> -Jonathan >> >> >> >> On Thu, Apr 9, 2009 at 4:02 PM, Sam D wrot= e: >> >> > Hi, >> >> > >> >> > I am new to Cassandra, just installed the latest version on my >> >> > machine. >> >> > I >> >> > am able to insert rows using the web (@7002), but I am not able to >> >> > get a >> >> > java client to insert rows into a table. Below the piece of code I = am >> >> > using, >> >> > the insert call goes through fine without any exceptions, but I am >> >> > not >> >> > able >> >> > to see the row in the table, so I assume its not being inserted >> >> > properly. >> >> > >> >> > =A0=A0=A0 =A0=A0=A0 socket =3D new TSocket(machine,port); >> >> > =A0=A0=A0 =A0=A0=A0 TProtocol tp =3D new TBinaryProtocol(socket); >> >> > =A0=A0=A0 =A0=A0=A0 cl =3D new Cassandra.Client(tp); >> >> > =A0=A0=A0 =A0=A0=A0 socket.open(); >> >> > =A0=A0=A0 =A0=A0=A0 cl.insert("xmls", "x1", "content:xml", "xyz", 0= ); >> >> > >> >> > Can you please point me to any sample code available which I can >> >> > refer >> >> > to ?. >> >> > >> >> > Thanks >> >> > Sam. >> >> > >> > >> > > >