You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Dan Harvey <da...@mendeley.com> on 2009/10/12 10:46:32 UTC
Standalone to distributed migration
Hi,
I'm working at Mendeley.com and we are just looking into the ways in which
to store a large collection of document metadata that we need to process and
update our live site with. HBase is one of the systems we are looking at as
it integrates with Hadoop which we will definitely be using in the near
future.
One question I have for this is if we start using the standalone operation
on a single server initially whilst we setup and test ours systems, is
possible to migrate from this to the distributed system without having to
rebuild the data store?
A second question is more tying to understand the way in which to use HBase.
If we have documents that have many authors, which themselves have a
varying amount of metadata, how is a good approach to store this? From
reading about HBase I see it could be done using a column family on the
document for say author_name:, author_email: but if there are an unknown
number of author properties this probably isn't the best way.. Would using
a separate table be better to store the author data in?
My last question is using Map/Reduce on top of HBase, is the Map/Reduce code
still location aware for where the data is stored in HDFS or does using
Map/Reduce create a larger I/O bottleneck than using HDFS normally?
If we choose to use HBase I hope to start being more active in the community
here soon!
Thanks,
Dan Harvey
Re: Standalone to distributed migration
Posted by Jonathan Gray <jl...@streamy.com>.
One recommendation. Be sure to put the documents in a separate family
from the meta data. This will prevent you from having to rewrite the
documents during compactions (since you expect high updates to meta and
not documents).
stack wrote:
> On Wed, Oct 14, 2009 at 2:44 AM, Dan Harvey <da...@mendeley.com> wrote:
>
>> 2009/10/12 stack <st...@duboce.net>
>>
>
>
>> One other question about performance, we are looking to use the system
>> to store all
>> documents that users upload or enter so we will also need to continually
>> update
>> document metadata when a user edits it. The edits will be a lot less
>> frequent than new
>> documents added. How well does HBase perform with updating cell
>> values? and how well
>> does adding rows and updating them scale as the cluster grows?
>>
>>
> Individual writes are fast and writes scale roughly linearly as you scale
> the cluster; e.g. doubling your nodes doubles the amount of writes you can
> take on.
> St.Ack
>
Re: Standalone to distributed migration
Posted by stack <st...@duboce.net>.
On Wed, Oct 14, 2009 at 2:44 AM, Dan Harvey <da...@mendeley.com> wrote:
> 2009/10/12 stack <st...@duboce.net>
>
> One other question about performance, we are looking to use the system
> to store all
> documents that users upload or enter so we will also need to continually
> update
> document metadata when a user edits it. The edits will be a lot less
> frequent than new
> documents added. How well does HBase perform with updating cell
> values? and how well
> does adding rows and updating them scale as the cluster grows?
>
>
Individual writes are fast and writes scale roughly linearly as you scale
the cluster; e.g. doubling your nodes doubles the amount of writes you can
take on.
St.Ack
Re: Standalone to distributed migration
Posted by Dan Harvey <da...@mendeley.com>.
2009/10/12 stack <st...@duboce.net>
>
> (Mendeley looks great).
>
> See below:
>
> On Mon, Oct 12, 2009 at 1:46 AM, Dan Harvey <da...@mendeley.com> wrote:
>
> >
> > One question I have for this is if we start using the standalone operation
> > on a single server initially whilst we setup and test ours systems, is
> > possible to migrate from this to the distributed system without having to
> > rebuild the data store?
> >
>
> Should just be a matter of copy from local disk up to hdfs. It wouldn't be
> hard to confirm this for yourself.
>
> Running a single instance of hbase in anything but a test setup is not
> really recommended. Or rather, we've not spent any time on making sure this
> sort of deploy is performant.
If we think HBase is a possibility then I will look into testing this to see
how well it works, but we've chosen to stick with mysql for a little
bit longer so
we will probably just go to a cluster straight away when we start
using something
else so this may not be a problem.
>
>
> > A second question is more tying to understand the way in which to use
> > HBase.
> > If we have documents that have many authors, which themselves have a
> > varying amount of metadata, how is a good approach to store this? From
> > reading about HBase I see it could be done using a column family on the
> > document for say author_name:, author_email: but if there are an unknown
> > number of author properties this probably isn't the best way.. Would using
> > a separate table be better to store the author data in?
> >
>
> How do you think you will be accessing the data? Will you be doing lookups
> on the attribute or by author or both?
In the near future we will only be needing to do lookups by a document id to get
all the meta data for a document. We will also be running over all the
data offline
to process and work on it. Eventually we may need to look up by the author
as well but I think HBase may be used to just store all the data then
we can build
indexes for unique authors we can derive from this data. I guess that would be a
good way to go about it?
>
>
> >
> > My last question is using Map/Reduce on top of HBase, is the Map/Reduce
> > code
> > still location aware for where the data is stored in HDFS or does using
> > Map/Reduce create a larger I/O bottleneck than using HDFS normally?
> >
>
>
> The TableInputFormat in hbase passes the mapreduce framework the address of
> running regionservers. In our experience, the mapreduce framework will near
> always run tasks on the tasktracker that is running on the same machine as
> the regionserver hosting the task source region.
>
>
> >
> > If we choose to use HBase I hope to start being more active in the
> > community
> > here soon!
> >
>
> Let us know if there is anything we can do to help you with your evaluation.
One other question about performance, we are looking to use the system
to store all
documents that users upload or enter so we will also need to continually update
document metadata when a user edits it. The edits will be a lot less
frequent than new
documents added. How well does HBase perform with updating cell
values? and how well
does adding rows and updating them scale as the cluster grows?
>
> St.Ack
>
>
> >
> > Thanks,
> > Dan Harvey
> >
Re: Standalone to distributed migration
Posted by stack <st...@duboce.net>.
(Mendeley looks great).
See below:
On Mon, Oct 12, 2009 at 1:46 AM, Dan Harvey <da...@mendeley.com> wrote:
>
> One question I have for this is if we start using the standalone operation
> on a single server initially whilst we setup and test ours systems, is
> possible to migrate from this to the distributed system without having to
> rebuild the data store?
>
Should just be a matter of copy from local disk up to hdfs. It wouldn't be
hard to confirm this for yourself.
Running a single instance of hbase in anything but a test setup is not
really recommended. Or rather, we've not spent any time on making sure this
sort of deploy is performant.
> A second question is more tying to understand the way in which to use
> HBase.
> If we have documents that have many authors, which themselves have a
> varying amount of metadata, how is a good approach to store this? From
> reading about HBase I see it could be done using a column family on the
> document for say author_name:, author_email: but if there are an unknown
> number of author properties this probably isn't the best way.. Would using
> a separate table be better to store the author data in?
>
How do you think you will be accessing the data? Will you be doing lookups
on the attribute or by author or both?
>
> My last question is using Map/Reduce on top of HBase, is the Map/Reduce
> code
> still location aware for where the data is stored in HDFS or does using
> Map/Reduce create a larger I/O bottleneck than using HDFS normally?
>
The TableInputFormat in hbase passes the mapreduce framework the address of
running regionservers. In our experience, the mapreduce framework will near
always run tasks on the tasktracker that is running on the same machine as
the regionserver hosting the task source region.
>
> If we choose to use HBase I hope to start being more active in the
> community
> here soon!
>
Let us know if there is anything we can do to help you with your evaluation.
St.Ack
>
> Thanks,
> Dan Harvey
>
Re: Standalone to distributed migration
Posted by Kevin Peterson <kp...@biz360.com>.
On Mon, Oct 12, 2009 at 1:46 AM, Dan Harvey <da...@mendeley.com> wrote:
>
> A second question is more tying to understand the way in which to use
> HBase.
> If we have documents that have many authors, which themselves have a
> varying amount of metadata, how is a good approach to store this? From
> reading about HBase I see it could be done using a column family on the
> document for say author_name:, author_email: but if there are an unknown
> number of author properties this probably isn't the best way.. Would using
> a separate table be better to store the author data in?
>
>
I think something like this would likely work best for you:
column family author
column qualifier is the key to the author in the authors table
data is the denormalized data about the author you are likely to need when
you read the document, encoded any way you like (comma separated values,
JSON, etc)
So you have
column: author:1234
value: {name:"John Smith",email:"js@example.com"}
column: author:1268
value: {name:"Dan Harvey",email:"dan.harvey@mendeley.com",webpage:"..."}