From user-return-26745-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Jun 6 10:09:51 2012 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 0C9E991DA for ; Wed, 6 Jun 2012 10:09:51 +0000 (UTC) Received: (qmail 62830 invoked by uid 500); 6 Jun 2012 10:09:48 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 62793 invoked by uid 500); 6 Jun 2012 10:09:48 -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 62782 invoked by uid 99); 6 Jun 2012 10:09:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 10:09:48 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of marshadsaleem@tataelxsi.co.in designates 65.55.88.12 as permitted sender) Received: from [65.55.88.12] (HELO tx2outboundpool.messaging.microsoft.com) (65.55.88.12) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 10:09:39 +0000 Received: from mail157-tx2-R.bigfish.com (10.9.14.235) by TX2EHSOBE010.bigfish.com (10.9.40.30) with Microsoft SMTP Server id 14.1.225.23; Wed, 6 Jun 2012 10:08:32 +0000 Received: from mail157-tx2 (localhost [127.0.0.1]) by mail157-tx2-R.bigfish.com (Postfix) with ESMTP id 954BA260217 for ; Wed, 6 Jun 2012 10:08:32 +0000 (UTC) X-Forefront-Antispam-Report: CIP:111.221.116.181;KIP:(null);UIP:(null);IPV:NLI;H:SIXPRD0410HT002.apcprd04.prod.outlook.com;RD:none;EFVD:NLI X-SpamScore: -5 X-BigFish: PS-5(zz9371I14ffIc85dh98dKzz1202hzz8275dhz2fh2a8h668h839hd25hf0ah) Received-SPF: pass (mail157-tx2: domain of tataelxsi.co.in designates 111.221.116.181 as permitted sender) client-ip=111.221.116.181; envelope-from=marshadsaleem@tataelxsi.co.in; helo=SIXPRD0410HT002.apcprd04.prod.outlook.com ;.outlook.com ; Received: from mail157-tx2 (localhost.localdomain [127.0.0.1]) by mail157-tx2 (MessageSwitch) id 1338977310640636_12742; Wed, 6 Jun 2012 10:08:30 +0000 (UTC) Received: from TX2EHSMHS019.bigfish.com (unknown [10.9.14.248]) by mail157-tx2.bigfish.com (Postfix) with ESMTP id 901C13A00F7 for ; Wed, 6 Jun 2012 10:08:30 +0000 (UTC) Received: from SIXPRD0410HT002.apcprd04.prod.outlook.com (111.221.116.181) by TX2EHSMHS019.bigfish.com (10.9.99.119) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 6 Jun 2012 10:08:29 +0000 Received: from SIXPRD0410MB358.apcprd04.prod.outlook.com ([169.254.1.213]) by SIXPRD0410HT002.apcprd04.prod.outlook.com ([10.255.23.165]) with mapi id 14.16.0164.004; Wed, 6 Jun 2012 10:08:52 +0000 From: MOHD ARSHAD SALEEM To: "user@cassandra.apache.org" Subject: RE: Query Thread-Topic: Query Thread-Index: Ac1DqlbPXy0mhX2mRPiKeaMSouhaqAAGBl2AAAJv/0o= Date: Wed, 6 Jun 2012 10:08:52 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [59.160.207.20] Content-Type: multipart/alternative; boundary="_000_A6B669C7F1A5E24E86309ADDDC970C200DD2980CSIXPRD0410MB358_" MIME-Version: 1.0 X-OriginatorOrg: tataelxsi.co.in --_000_A6B669C7F1A5E24E86309ADDDC970C200DD2980CSIXPRD0410MB358_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, After creating the keyspace successfully now i want to know how to read wri= te 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.HFact= ory class contains all the examples to create keyspaces and column families= . To create a keyspace: String testKeyspace =3D "testKeyspace"; KeyspaceDefinition newKeyspace =3D HFactory.createKeyspaceDefinition(testKe= yspace); cluster.addKeyspace(newKeyspace); To create a column family and a keyspace: String keyspace =3D "testKeyspace"; String column1 =3D "testcolumn"; ColumnFamilyDefinition columnFamily1 =3D HFactory.createColumnFamilyDefinit= ion(keyspace, column1); List columns =3D new ArrayList(); columns.add(columnFamily1); KeyspaceDefinition testKeyspace =3D HFactory.createKeyspaceDefinition(keyspace, org.apache.cassandra.locator.Si= mpleStrategy.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 key= space 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 --_000_A6B669C7F1A5E24E86309ADDDC970C200DD2980CSIXPRD0410MB358_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
After creating the keyspace successfully now i want to know how to read wri= te data using API,s

Regards
Arshad

From: Filippo Diotalevi [filippo@ntoklo.c= om]
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.fac= tory.HFactory class contains all the examples to create keyspaces and colum= n families.

To create a keyspace:

String testKeyspace =3D "testKeyspace"; 
KeyspaceDefinition newKeyspace =3D HFactory.createKeyspaceDefinit= ion(testKeyspace);
cluster.addKeyspace(newKeyspace);


To create a column family and a keyspace:

String keyspace =3D "testKeyspace"; 
String column1 =3D "testcolumn";
ColumnFamilyDefinition columnFamily1 =3D HFactory.createColumnFam= ilyDefinition(keyspace, column1);
List<ColumnFamilyDefinition> columns =3D new ArrayList<C= olumnFamilyDefinition>(); 
columns.add(columnFamily1);

KeyspaceDefinition testKeyspace =3D
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 key= space 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

--_000_A6B669C7F1A5E24E86309ADDDC970C200DD2980CSIXPRD0410MB358_--