You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Dop Sun <su...@dopsun.com> on 2010/05/06 14:51:46 UTC

How to initialize the Cassandra

Hi,

 

I just discovered that the json file exported by sstable2json contains more
than the data itself, like deletedAt values. 

 

I'm thinking whether there is a tool can import some initial data?

 

When we are doing the typical RDBMS system, this is how we are doing:

1)      Define the schema

2)      Initialize the database with initial data using Insert statements

3)      Running the application

 

If following these steps in Cassandra:

1)      Define the schema: this is done by define the KeySpace

2)      Initialize the data with initial data:  This is currently not there.
We can import data exported from existing installation, but not from nothing

3)      Running the application

 

Thanks,

Regards,

Dop


Re: How to initialize the Cassandra

Posted by Jonathan Ellis <jb...@gmail.com>.
what you see in bin/ is pretty much what you get.

On Thu, May 6, 2010 at 9:39 AM, Dop Sun <su...@dopsun.com> wrote:
> Is this feedback for my request on initializing data for Cassandra? :-)
>
> Basically, my question is whether there is a tool, like json2sstable, which
> can import some data in a format which can be easily manual created. I don't
> know the experience of other people, but what I'm currently doing is writing
> a small application to write the data in.
>
> Dop
>
> -----Original Message-----
> From: Jonathan Ellis [mailto:jbellis@gmail.com]
> Sent: Thursday, May 06, 2010 10:25 PM
> To: user@cassandra.apache.org
> Subject: Re: How to initialize the Cassandra
>
> The simplest way is to just use thrift batch_mutate.
>
> If Cassandra CPU is your bottleneck then using the binary load method
> from StorageProxy can help (see contrib/bmt_example).
>
> If Casssandra disk or network is your bottleneck then binary load
> won't really help.
>
> On Thu, May 6, 2010 at 7:51 AM, Dop Sun <su...@dopsun.com> wrote:
>> Hi,
>>
>>
>>
>> I just discovered that the json file exported by sstable2json contains
> more
>> than the data itself, like deletedAt values.
>>
>>
>>
>> I’m thinking whether there is a tool can import some initial data?
>>
>>
>>
>> When we are doing the typical RDBMS system, this is how we are doing:
>>
>> 1)      Define the schema
>>
>> 2)      Initialize the database with initial data using Insert statements
>>
>> 3)      Running the application
>>
>>
>>
>> If following these steps in Cassandra:
>>
>> 1)      Define the schema: this is done by define the KeySpace
>>
>> 2)      Initialize the data with initial data:  This is currently not
> there.
>> We can import data exported from existing installation, but not from
> nothing
>>
>> 3)      Running the application
>>
>>
>>
>> Thanks,
>>
>> Regards,
>>
>> Dop
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Re: How to initialize the Cassandra

Posted by Vick Khera <vi...@khera.org>.
On Thu, May 6, 2010 at 10:39 AM, Dop Sun <su...@dopsun.com> wrote:
> Basically, my question is whether there is a tool, like json2sstable, which
> can import some data in a format which can be easily manual created. I don't
> know the experience of other people, but what I'm currently doing is writing
> a small application to write the data in.

Seems to me if you wrote this script to read a data file, say in json
format, and that it deduced the schema from that json file, then it
could be generic and usable by others.

RE: How to initialize the Cassandra

Posted by Dop Sun <su...@dopsun.com>.
Is this feedback for my request on initializing data for Cassandra? :-)

Basically, my question is whether there is a tool, like json2sstable, which
can import some data in a format which can be easily manual created. I don't
know the experience of other people, but what I'm currently doing is writing
a small application to write the data in.

Dop

-----Original Message-----
From: Jonathan Ellis [mailto:jbellis@gmail.com] 
Sent: Thursday, May 06, 2010 10:25 PM
To: user@cassandra.apache.org
Subject: Re: How to initialize the Cassandra

The simplest way is to just use thrift batch_mutate.

If Cassandra CPU is your bottleneck then using the binary load method
from StorageProxy can help (see contrib/bmt_example).

If Casssandra disk or network is your bottleneck then binary load
won't really help.

On Thu, May 6, 2010 at 7:51 AM, Dop Sun <su...@dopsun.com> wrote:
> Hi,
>
>
>
> I just discovered that the json file exported by sstable2json contains
more
> than the data itself, like deletedAt values.
>
>
>
> I’m thinking whether there is a tool can import some initial data?
>
>
>
> When we are doing the typical RDBMS system, this is how we are doing:
>
> 1)      Define the schema
>
> 2)      Initialize the database with initial data using Insert statements
>
> 3)      Running the application
>
>
>
> If following these steps in Cassandra:
>
> 1)      Define the schema: this is done by define the KeySpace
>
> 2)      Initialize the data with initial data:  This is currently not
there.
> We can import data exported from existing installation, but not from
nothing
>
> 3)      Running the application
>
>
>
> Thanks,
>
> Regards,
>
> Dop



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com



Re: How to initialize the Cassandra

Posted by Jonathan Ellis <jb...@gmail.com>.
The simplest way is to just use thrift batch_mutate.

If Cassandra CPU is your bottleneck then using the binary load method
from StorageProxy can help (see contrib/bmt_example).

If Casssandra disk or network is your bottleneck then binary load
won't really help.

On Thu, May 6, 2010 at 7:51 AM, Dop Sun <su...@dopsun.com> wrote:
> Hi,
>
>
>
> I just discovered that the json file exported by sstable2json contains more
> than the data itself, like deletedAt values.
>
>
>
> I’m thinking whether there is a tool can import some initial data?
>
>
>
> When we are doing the typical RDBMS system, this is how we are doing:
>
> 1)      Define the schema
>
> 2)      Initialize the database with initial data using Insert statements
>
> 3)      Running the application
>
>
>
> If following these steps in Cassandra:
>
> 1)      Define the schema: this is done by define the KeySpace
>
> 2)      Initialize the data with initial data:  This is currently not there.
> We can import data exported from existing installation, but not from nothing
>
> 3)      Running the application
>
>
>
> Thanks,
>
> Regards,
>
> Dop



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com