Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C47489FBC for ; Wed, 6 Jun 2012 11:57:16 +0000 (UTC) Received: (qmail 17798 invoked by uid 500); 6 Jun 2012 11:57:11 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 17259 invoked by uid 500); 6 Jun 2012 11:57:11 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 16845 invoked by uid 99); 6 Jun 2012 11:57:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 11:57:10 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shelanrc@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-ob0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 11:57:06 +0000 Received: by obbeh20 with SMTP id eh20so2142427obb.31 for ; Wed, 06 Jun 2012 04:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=zuYkEwpf5C47n0gvxLYij4l7ICzVlZ18NhWctsmrO3I=; b=OKiay9zIUMhrsQHLR+AqtgdskGGDBRu8GEKTq5J34/5UbPCB/IXRpBmGuuWbs4eBFj tjXjoNR1WyMWPoJOie9Ddx7XYJM4e5vDzvZyxx66TkfkUTNDX6+22+YTq4FoERCDfxwc jHkQeRIpM+3eIXmpG6427mdcLP/PZfkfQ0pewnFCxiZeXiwaeo5DD4eH8Ww2LV25/dT9 vL9eQM3vJmL1bDZj/oqN+RbZ/sVgjtrIu0cmEhO49Uuj8NyupV/753AW6Et/cZ1zrAEQ L48Ik2kaBoU/jzmgWMtAr5O/Bb6M+7j6e3y+aTtdRGRDOxex3Z3PydGe4tzaJcqTItFO T/iA== Received: by 10.182.12.74 with SMTP id w10mr19830132obb.54.1338983805393; Wed, 06 Jun 2012 04:56:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.1.3 with HTTP; Wed, 6 Jun 2012 04:56:15 -0700 (PDT) In-Reply-To: References: From: shelan Perera Date: Wed, 6 Jun 2012 17:26:15 +0530 Message-ID: Subject: Re: Query To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d044468db149c4804c1cc76ed X-Virus-Checked: Checked by ClamAV on apache.org --f46d044468db149c4804c1cc76ed Content-Type: text/plain; charset=ISO-8859-1 Hi, You can find detailed info here [1] [1] https://github.com/hector-client/hector/wiki/User-Guide regards On Wed, Jun 6, 2012 at 3:38 PM, MOHD ARSHAD SALEEM < marshadsaleem@tataelxsi.co.in> wrote: > Hi, > After creating the keyspace successfully now i want to know how to read > write data using API,s > > Regards > Arshad > ------------------------------ > *From:* Filippo Diotalevi [filippo@ntoklo.com] > *Sent:* Wednesday, June 06, 2012 2:27 PM > *To:* user@cassandra.apache.org > *Subject:* Re: Query > > Hi, > the Javadoc (or source code) of > the me.prettyprint.hector.api.factory.HFactory class contains all the > examples to create keyspaces and column families. > > To create a keyspace: > > String testKeyspace = "testKeyspace"; > KeyspaceDefinition newKeyspace > = HFactory.createKeyspaceDefinition(testKeyspace); > cluster.addKeyspace(newKeyspace); > > > To create a column family and a keyspace: > > String keyspace = "testKeyspace"; > String column1 = "testcolumn"; > ColumnFamilyDefinition columnFamily1 > = HFactory.createColumnFamilyDefinition(keyspace, column1); > List columns = > new ArrayList(); > columns.add(columnFamily1); > > KeyspaceDefinition testKeyspace = > HFactory.createKeyspaceDefinition(keyspace, org.apache.cassandra.locator.SimpleStrategy.class.getName(), > 1, columns); > cluster.addKeyspace(testKeyspace); > > -- > Filippo Diotalevi > > > On Wednesday, 6 June 2012 at 07:05, MOHD ARSHAD SALEEM wrote: > > Hi All, > > I am using Hector client for cassandra . I wanted to know how to create > keyspace and column family using API's to read and write data. > or i have to create keyspace and column family manually using command > line interface. > > Regards > Arshad > > > -- Shelan Perera Home: http://www.shelan.org Blog : http://www.shelanlk.com Twitter: shelan skype :shelan.perera gtalk :shelanrc I am the master of my fate: I am the captain of my soul. *invictus* --f46d044468db149c4804c1cc76ed Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

You can find detailed info here [1]
regards

On Wed, Jun= 6, 2012 at 3:38 PM, MOHD ARSHAD SALEEM <marshadsaleem@tataelx= si.co.in> wrote:
Hi,
After creating the keyspace successfully now i want to know how to read wri= te data using API,s

Regards
Arshad

Fro= m: Filippo Diotalevi [filippo@ntoklo.com]
Sent: Wednesday, June 06, 2012 2:27 PM
To: u= ser@cassandra.apache.org
Subject: Re: Query

Hi,=A0
the Javadoc (or source code) of the=A0me.prettyprint.hector.api.factor= y.HFactory class contains all the examples to create keyspaces and column f= amilies.

To create a keyspace:

String testKeyspace =3D "testKeyspace";=A0
KeyspaceDefinition newKeyspace =3D=A0HFactory.createKeyspaceDefinition= (testKeyspace);
cluster.addKeyspace(newKeyspace);


To create a column family and a keyspace:

String keyspace =3D "testKeyspace";=A0
String column1 =3D "testcolumn";
ColumnFamilyDefinition columnFamily1 =3D=A0HFactory.createColumnFamily= Definition(keyspace, column1);
List<ColumnFamilyDefinition> columns =3D new=A0ArrayList<Colu= mnFamilyDefinition>();=A0
columns.add(columnFamily1);

KeyspaceDefinition testKeyspace =3D
HFactory.createKeyspaceDefinition(keyspace,=A0org.apache.cassandra.loc= ator.SimpleStrategy.class.getName(), 1, columns);
cluster.addKeyspace(testKeyspace);

--=A0
Filippo Diotalevi


On Wednesday, 6 June 2012 at 07:05, MOH= D ARSHAD SALEEM wrote:

Hi All,

I am using Hector client for cassandra . I wanted to know how to create key= space and column family using API's to read and write data.
or=A0 i have to create keyspace and column family manually using command li= ne interface.

Regards
Arshad




--
Shelan Perer= a

Home: http://= www.shelan.org
Blog=A0=A0 : http://www.shelanlk.com
Twitter: shelan
skype=A0 :shelan.perera
gtalk=A0=A0 :shelanrc

= =A0I am the master of my fate:
=A0I am the captain of my soul.
=A0 = =A0 =A0 =A0=A0 *invictus*







--f46d044468db149c4804c1cc76ed--