Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 7919 invoked from network); 9 Apr 2009 21:19:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Apr 2009 21:19:31 -0000 Received: (qmail 56975 invoked by uid 500); 9 Apr 2009 21:19:31 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 56939 invoked by uid 500); 9 Apr 2009 21:19:31 -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 56930 invoked by uid 99); 9 Apr 2009 21:19:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2009 21:19:31 +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 technologylist@gmail.com designates 74.125.44.152 as permitted sender) Received: from [74.125.44.152] (HELO yx-out-1718.google.com) (74.125.44.152) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2009 21:19:24 +0000 Received: by yx-out-1718.google.com with SMTP id 36so634811yxh.0 for ; Thu, 09 Apr 2009 14:19:03 -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=ViEjPoJ63GF6YbtYitdXOUWNr27eAv+Y+lEMFPiVJCI=; b=r31lyuUOLJAP/hWxLl5foHCyGMRJJ/pxNZtI5ma2qsax8ExWB4ksSvPDP4wMT1lCrl GDdQ7VFqa1EXZ0jPLv0RSASwitkkngpZHBzB1b8lEco/AVfK05Ulf2M9c8KW8XDnBGgp IpR5s8K7U1TXdpoMTeyZXstmSWl6tLwM/MgL8= 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=rEN4dYUy9kXGc6PsfizXqEGhwdmSJjtZlny6DoguPQvucfHRexRTlK7OQX51t2T3Mp 3BCf03UtxPf4tLV9d0Ufwwz9jxcYAdXsfa64B0sEpxV7owrOTX0gtxgv1q62fKkRCOG9 440qmAbvQMnAU0smB4m9or6K0Xe9V9gk8Gg9M= MIME-Version: 1.0 Received: by 10.100.122.12 with SMTP id u12mr910884anc.99.1239311942288; Thu, 09 Apr 2009 14:19:02 -0700 (PDT) In-Reply-To: References: <3317711b0904091402l6c5e998wf310cd3934982074@mail.gmail.com> Date: Thu, 9 Apr 2009 14:19:02 -0700 Message-ID: <3317711b0904091419r37f83ad7y9f62f171ea3a5a9e@mail.gmail.com> Subject: Re: Sample Client Code From: Sam D To: cassandra-user@incubator.apache.org Content-Type: multipart/alternative; boundary=0016e642d64a160726046725cc9e X-Virus-Checked: Checked by ClamAV on apache.org --0016e642d64a160726046725cc9e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks for the quick response, I have only one node. So the web client also should see the data, right ?. Below is the code which I am using to read. socket = new TSocket(machine,port); TProtocol tp = new TBinaryProtocol(socket); cl = new Cassandra.Client(tp); socket.open(); column_t u1 = cl.get_column("xmls","x1","content:xml"); System.out.println("xml : " + u1.value); Sam. On Thu, Apr 9, 2009 at 2:07 PM, Jonathan Ellis wrote: > That looks reasonable. How are you reading the data back out? The > 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 wrote: > > 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. > > > > socket = new TSocket(machine,port); > > TProtocol tp = new TBinaryProtocol(socket); > > cl = new Cassandra.Client(tp); > > socket.open(); > > 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. > > > --0016e642d64a160726046725cc9e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for the quick response,

I have only one node. So the web clie= nt also should see the data, right ?. 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 =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 <j= bellis@gmail.com> wrote:
That looks reasonable. =A0How are you reading the data back out? =A0The
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 <technologylist@gmail.com> wrote:
> Hi,
>
> I am new to Cassandra, just installed the latest version on my machine= .=A0 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 proper= ly.
>
> =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.
>

--0016e642d64a160726046725cc9e--