You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by John Grogan <Va...@dir-uk.org> on 2013/03/03 12:06:38 UTC

Migrating from mySQL to Cassandra

Hi,

We have decided to explore moving our database from mySQL to Cassandra. I am now installing it on my machine (OSX system) and need to think about how to do a data export from mySQL. Using phpmyAdmin, I have a range of different options to export the database.

However, the crux is figuring out an easy way to import the data into Cassandra. Does anyone have any thoughts they can share? In addition, are there any GUI tools like phpmyAdmin for Cassandra?

Thanks,
John.

Re: Migrating from mySQL to Cassandra

Posted by "Hiller, Dean" <De...@nrel.gov>.
Definitely read up on patterns out there.  The more info you gather, the easier it goes in designs.

http://buffalosw.com/wiki/Patterns-Page/

From: Tyler Hobbs <ty...@datastax.com>>
Reply-To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <us...@cassandra.apache.org>>
Date: Monday, March 4, 2013 9:47 AM
To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <us...@cassandra.apache.org>>
Subject: Re: Migrating from mySQL to Cassandra


On Mon, Mar 4, 2013 at 5:08 AM, John Grogan <Va...@dir-uk.org>> wrote:

A quick question for you - I am completely new to noSQL databases and the architecture of Cassandra. So, I'm still way down the learning curve.

I downloaded and installed the OpsCenter last night, but I first need to configure it. I want to install 2 nodes on my laptop and then start building some code around it to move my DB from mySQL. I've had a look at the DataStax website for some info on the very basics - setting up nodes, configuration etc, but couldn't see anything. Is there anything there that you can point me at? Or alternatively, any other sites that provide a good overview with examples?

This page should be helpful: http://www.datastax.com/docs/1.2/index

Steven's suggestion to use ccm to run a small cluster on your laptop is also good; that's a very easy way to go.  If you go with ccm, there's a little work that needs to be done with OpsCenter to get it working: http://www.datastax.com/dev/blog/running-opscenter-with-a-local-development-cluster


I see that Jonathan Ellis is in London Wednesday at the Cassandra group's talk so will try to drop by and say hello.

Cool, I hope the meetup goes well.

--
Tyler Hobbs
DataStax<http://datastax.com/>

Re: Migrating from mySQL to Cassandra

Posted by Tyler Hobbs <ty...@datastax.com>.
On Mon, Mar 4, 2013 at 5:08 AM, John Grogan <Va...@dir-uk.org> wrote:

>
> A quick question for you - I am completely new to noSQL databases and the
> architecture of Cassandra. So, I'm still way down the learning curve.
>
> I downloaded and installed the OpsCenter last night, but I first need to
> configure it. I want to install 2 nodes on my laptop and then start
> building some code around it to move my DB from mySQL. I've had a look at
> the DataStax website for some info on the very basics - setting up nodes,
> configuration etc, but couldn't see anything. Is there anything there that
> you can point me at? Or alternatively, any other sites that provide a good
> overview with examples?
>

This page should be helpful: http://www.datastax.com/docs/1.2/index

Steven's suggestion to use ccm to run a small cluster on your laptop is
also good; that's a very easy way to go.  If you go with ccm, there's a
little work that needs to be done with OpsCenter to get it working:
http://www.datastax.com/dev/blog/running-opscenter-with-a-local-development-cluster


>
> I see that Jonathan Ellis is in London Wednesday at the Cassandra group's
> talk so will try to drop by and say hello.
>

Cool, I hope the meetup goes well.

-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Re: Migrating from mySQL to Cassandra

Posted by John Grogan <Va...@dir-uk.org>.
Thanks Steven - I will take a look.


On 4 Mar 2013, at 11:41, Steven Siebert wrote:

> Since your just starting out and it seems like you want to get past the admin hurdles and start coding, may I suggest you use https://github.com/pcmanus/ccm to get your local test environment setup.
> 
> Setting up a production Cassandra cluster takes a fair amount of planning (before) and tuning (during/after) in my experience.  Both need to be done once you decide Cassandra is "right" for your data....ccm is nice in that you don't need to invest a lot in Cassandra to figure that out :-)
> 
> Hope this helps,
> 
> S
> 
> On Mar 4, 2013 6:08 AM, "John Grogan" <Va...@dir-uk.org> wrote:
> Tyler,
> 
> A quick question for you - I am completely new to noSQL databases and the architecture of Cassandra. So, I'm still way down the learning curve.
> 
> I downloaded and installed the OpsCenter last night, but I first need to configure it. I want to install 2 nodes on my laptop and then start building some code around it to move my DB from mySQL. I've had a look at the DataStax website for some info on the very basics - setting up nodes, configuration etc, but couldn't see anything. Is there anything there that you can point me at? Or alternatively, any other sites that provide a good overview with examples?
> 
> I see that Jonathan Ellis is in London Wednesday at the Cassandra group's talk so will try to drop by and say hello.
> 
> Best,
> John.
> 
> 
> On 3 Mar 2013, at 17:06, Tyler Hobbs wrote:
> 
>> 
>> On Sun, Mar 3, 2013 at 5:06 AM, John Grogan <Va...@dir-uk.org> wrote:
>> 
>> However, the crux is figuring out an easy way to import the data into Cassandra. Does anyone have any thoughts they can share?
>> 
>> If you don't have a very large dataset and you're not pressed for time, just iterating over your existing data with a normal mysql client and inserting into Cassandra with a normal Cassandra client is the easiest option.  Using multiple threads or processes can make this pretty quick.
>> 
>> For larger datasets, loading through a map/reduce job is typical.
>>  
>> In addition, are there any GUI tools like phpmyAdmin for Cassandra?
>> 
>> There's DataStax OpsCenter, which has a free Community Edition: http://www.datastax.com/products/opscenter
>> 
>> (Disclosure: I work at DataStax.)
>> 
>> -- 
>> Tyler Hobbs
>> DataStax
> 


Re: Migrating from mySQL to Cassandra

Posted by Steven Siebert <sm...@gmail.com>.
Since your just starting out and it seems like you want to get past the
admin hurdles and start coding, may I suggest you use
https://github.com/pcmanus/ccm to get your local test environment setup.

Setting up a production Cassandra cluster takes a fair amount of planning
(before) and tuning (during/after) in my experience.  Both need to be done
once you decide Cassandra is "right" for your data....ccm is nice in that
you don't need to invest a lot in Cassandra to figure that out :-)

Hope this helps,

S
On Mar 4, 2013 6:08 AM, "John Grogan" <Va...@dir-uk.org> wrote:

> Tyler,
>
> A quick question for you - I am completely new to noSQL databases and the
> architecture of Cassandra. So, I'm still way down the learning curve.
>
> I downloaded and installed the OpsCenter last night, but I first need to
> configure it. I want to install 2 nodes on my laptop and then start
> building some code around it to move my DB from mySQL. I've had a look at
> the DataStax website for some info on the very basics - setting up nodes,
> configuration etc, but couldn't see anything. Is there anything there that
> you can point me at? Or alternatively, any other sites that provide a good
> overview with examples?
>
> I see that Jonathan Ellis is in London Wednesday at the Cassandra group's
> talk so will try to drop by and say hello.
>
> Best,
> John.
>
>
> On 3 Mar 2013, at 17:06, Tyler Hobbs wrote:
>
>
> On Sun, Mar 3, 2013 at 5:06 AM, John Grogan <Va...@dir-uk.org> wrote:
>
>>
>> However, the crux is figuring out an easy way to import the data into
>> Cassandra. Does anyone have any thoughts they can share?
>
>
> If you don't have a very large dataset and you're not pressed for time,
> just iterating over your existing data with a normal mysql client and
> inserting into Cassandra with a normal Cassandra client is the easiest
> option.  Using multiple threads or processes can make this pretty quick.
>
> For larger datasets, loading through a map/reduce job is typical.
>
>
>> In addition, are there any GUI tools like phpmyAdmin for Cassandra?
>
>
> There's DataStax OpsCenter, which has a free Community Edition:
> http://www.datastax.com/products/opscenter
>
> (Disclosure: I work at DataStax.)
>
> --
> Tyler Hobbs
> DataStax <http://datastax.com/>
>
>
>

Re: Migrating from mySQL to Cassandra

Posted by John Grogan <Va...@dir-uk.org>.
Tyler,

A quick question for you - I am completely new to noSQL databases and the architecture of Cassandra. So, I'm still way down the learning curve.

I downloaded and installed the OpsCenter last night, but I first need to configure it. I want to install 2 nodes on my laptop and then start building some code around it to move my DB from mySQL. I've had a look at the DataStax website for some info on the very basics - setting up nodes, configuration etc, but couldn't see anything. Is there anything there that you can point me at? Or alternatively, any other sites that provide a good overview with examples?

I see that Jonathan Ellis is in London Wednesday at the Cassandra group's talk so will try to drop by and say hello.

Best,
John.


On 3 Mar 2013, at 17:06, Tyler Hobbs wrote:

> 
> On Sun, Mar 3, 2013 at 5:06 AM, John Grogan <Va...@dir-uk.org> wrote:
> 
> However, the crux is figuring out an easy way to import the data into Cassandra. Does anyone have any thoughts they can share?
> 
> If you don't have a very large dataset and you're not pressed for time, just iterating over your existing data with a normal mysql client and inserting into Cassandra with a normal Cassandra client is the easiest option.  Using multiple threads or processes can make this pretty quick.
> 
> For larger datasets, loading through a map/reduce job is typical.
>  
> In addition, are there any GUI tools like phpmyAdmin for Cassandra?
> 
> There's DataStax OpsCenter, which has a free Community Edition: http://www.datastax.com/products/opscenter
> 
> (Disclosure: I work at DataStax.)
> 
> -- 
> Tyler Hobbs
> DataStax


Re: Migrating from mySQL to Cassandra

Posted by Tyler Hobbs <ty...@datastax.com>.
On Sun, Mar 3, 2013 at 11:38 AM, Marco Matarazzo <
marco.matarazzo@hexkeep.com> wrote:

> Is OpsCenter working with cassandra 1.2 with vnodes already ?


Yes, it's compatible with vnode-enabled clusters, but doesn't support
vnode-specific things like running shuffle.  For now, it basically randomly
picks one token from each node and uses that, so some token-related things
are a bit off, but everything else should work normally.  We're working on
more complete support for vnodes.

-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Re: Migrating from mySQL to Cassandra

Posted by Jabbar Azam <aj...@gmail.com>.
No,  it doesn't work with vnodes.  However it's useful for monitoring the
cluster or individual node performance.
On 3 Mar 2013 17:39, "Marco Matarazzo" <ma...@hexkeep.com> wrote:

> > There's DataStax OpsCenter, which has a free Community Edition:
> http://www.datastax.com/products/opscenter
>
> Is OpsCenter working with cassandra 1.2 with vnodes already ?
>
> --
> Marco Matarazzo
>
>
>

Re: Migrating from mySQL to Cassandra

Posted by Marco Matarazzo <ma...@hexkeep.com>.
> There's DataStax OpsCenter, which has a free Community Edition: http://www.datastax.com/products/opscenter

Is OpsCenter working with cassandra 1.2 with vnodes already ?

--
Marco Matarazzo



Re: Migrating from mySQL to Cassandra

Posted by Tyler Hobbs <ty...@datastax.com>.
On Sun, Mar 3, 2013 at 5:06 AM, John Grogan <Va...@dir-uk.org> wrote:

>
> However, the crux is figuring out an easy way to import the data into
> Cassandra. Does anyone have any thoughts they can share?


If you don't have a very large dataset and you're not pressed for time,
just iterating over your existing data with a normal mysql client and
inserting into Cassandra with a normal Cassandra client is the easiest
option.  Using multiple threads or processes can make this pretty quick.

For larger datasets, loading through a map/reduce job is typical.


> In addition, are there any GUI tools like phpmyAdmin for Cassandra?


There's DataStax OpsCenter, which has a free Community Edition:
http://www.datastax.com/products/opscenter

(Disclosure: I work at DataStax.)

-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Re: Migrating from mySQL to Cassandra

Posted by Marco Matarazzo <ma...@hexkeep.com>.
> In addition, are there any GUI tools like phpmyAdmin for Cassandra?


Something similar is : https://github.com/sebgiroux/Cassandra-Cluster-Admin

--
Marco Matarazzo