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 <
marshadsal...@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 [fili...@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<ColumnFamilyDefinition> columns =
> new ArrayList<ColumnFamilyDefinition>();
> 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*

Reply via email to