You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@whirr.apache.org by Bruno Dumon <br...@outerthought.org> on 2011/07/11 11:03:06 UTC

CDH HBase & Whirr

Hi,

This is a follow-up on the thread of a few days ago (can't reply since I'm
just subscribed) where Andrei wrote (
http://markmail.org/message/kbwopyh6zk572dgz):

The following patch could also be useful to you:
> https://issues.apache.org/jira/browse/WHIRR-334
>
> There is still a service start race condition that we need to address
> before committing (e.g. the HBase region server does not start if HDFS is
> not available).
>

I'm very much interested in seeing CDH Hadoop & HBase work with Whirr.

Is there anyone already working on making WHIRR-221 (order of starting
services) compatible with trunk? If not, I would (try to) look into that.

Also, should the region server startup issue hold back WHIRR-334 from being
applied? With the patch applied, it completes the configuration phase
without errors, which seems already a huge improvement to me.

Thanks,

Bruno.

-- 
Bruno Dumon
Outerthought
http://outerthought.org/

Re: CDH HBase & Whirr

Posted by Andrei Savu <sa...@gmail.com>.
Thanks for making things clear.

-- Andrei

On Wednesday, July 13, 2011, Andrew Purtell <ap...@apache.org> wrote:
> You may not have to wait for BigTop. HBase 0.92 will support 0.20-append (the problematic unrelease under discussion here) and also 0.22. Since 0.23 has the same append pipeline and API as 0.22, when 0.23 is released we can support it trivially. Now I can't say if you would actually want to run those versions, but there will be compatible ASF release artifacts finally.
> I admit the situation with ASF HBase 0.90 and Hadoop 0.20 release artifacts is unacceptable, but our hands are tied, we are not going to get -append
>  branch changes into an 0.20 release any time soon if ever. Best regards,
>
>   - Andy
> From: Andrei Savu <sa...@gmail.com>
> To: whirr-user@incubator.apache.org
> Sent: Wednesday, July 13, 2011 11:07 AM
> Subject: Re: CDH HBase & Whirr
>
> On Wed, Jul 13, 2011 at 12:20 AM, Eric Charles
> <er...@u-mangate.com> wrote:
>> Don't know if it can work out this way for Whirr?
>
> It could but I would wait for a better way. Hopefully we will be able
> to address this in the first release of Bigtop.
>
> -- Andrei
>
>
>

-- 
-- Andrei Savu / andreisavu.ro

Re: CDH HBase & Whirr

Posted by Andrew Purtell <ap...@apache.org>.
You may not have to wait for BigTop. HBase 0.92 will support 0.20-append (the problematic unrelease under discussion here) and also 0.22. Since 0.23 has the same append pipeline and API as 0.22, when 0.23 is released we can support it trivially. Now I can't say if you would actually want to run those versions, but there will be compatible ASF release artifacts finally.

I admit the situation with ASF HBase 0.90 and Hadoop 0.20 release artifacts is unacceptable, but our hands are tied, we are not going to get -append branch changes into an 0.20 release any time soon if ever.
 
Best regards,


  - Andy

From: Andrei Savu <sa...@gmail.com>
>To: whirr-user@incubator.apache.org
>Sent: Wednesday, July 13, 2011 11:07 AM
>Subject: Re: CDH HBase & Whirr
>
>On Wed, Jul 13, 2011 at 12:20 AM, Eric Charles
><er...@u-mangate.com> wrote:
>> Don't know if it can work out this way for Whirr?
>
>It could but I would wait for a better way. Hopefully we will be able
>to address this in the first release of Bigtop.
>
>-- Andrei
>
>
>

Re: CDH HBase & Whirr

Posted by Andrei Savu <sa...@gmail.com>.
On Wed, Jul 13, 2011 at 12:20 AM, Eric Charles
<er...@u-mangate.com> wrote:
> Don't know if it can work out this way for Whirr?

It could but I would wait for a better way. Hopefully we will be able
to address this in the first release of Bigtop.

-- Andrei

Re: CDH HBase & Whirr

Posted by Eric Charles <er...@u-mangate.com>.
On 12/07/11 19:38, Jim R. Wilson wrote:
<snip>
>
> I'm not sure whether the problems are the same.  After failing to get
> 0.90.3 working I reached out to the community.  Digging through the
> error logs, it looked like I had a mismatch between hadoop versions.
> (The one that HBase required was newer that the one Whirr uses by
> default, and the one that HBase prefers is not publically available
> anywhere).

For 0.90.3, you need an hadoop built from 
https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-append/

The maven artifacts for this branch can be found on 
http://people.apache.org/~rawson/repo/ but i guess it won't help for Whirr.

A known workaround is to copy the hadoop jar distributed in hbase to the 
official hadoop 0.20 distribution (so simply "replacing" the jar). This 
allows to rely on official distribution and "hack" a bit after 
extracting the tarballs (documented on 
http://hbase.apache.org/book/hadoop.html).

Don't know if it can work out this way for Whirr?

-- 
Eric

Re: CDH HBase & Whirr

Posted by Andrei Savu <sa...@gmail.com>.
> What would be the alternative for a public URL? (for tarballs)

Whirr 0.5.0 can publish local artifacts before starting a cluster. You
just have to use a local URL for the tarball (e.g.
whirr.hadoop.tarball.url=file:///my/local/hadoop-build.tar.gz). For
EC2 Whirr will automatically use S3 to create a temporary container.

Keep in mind that when extracted the name of folder should be the same
as the name of the archive (without extension).

> The best case would be if Apache made the correct version of hadoop available for each release of HBase.  That seems like the responsible thing for them to do.  I believe BigTop will eventually move things in that direction.

I also hope this will happen. As you can see we are having a hard time
getting this right in Whirr.

> Regardless of this, I think it is still interesting to run the configuration phase for all templates in parallel. I have a patch for this ready, any interest in this?

@Bruno Sounds good to me. Concurrency should not break anything if we
are limiting the scope to only one phase of the process.

Cheers,

-- Andrei

On Tue, Jul 12, 2011 at 10:38 AM, Jim R. Wilson <wi...@gmail.com> wrote:
>
>
> On Tue, Jul 12, 2011 at 12:21 PM, Bruno Dumon <br...@outerthought.org>
> wrote:
>>
>> On Tue, Jul 12, 2011 at 5:51 PM, Jim R. Wilson <wi...@gmail.com>
>> wrote:
>>>
>>> What version? The de-facto HBase version is 0.89.xxxxxx (as of Whirr
>>> 0.5.0).  When I change the "whirr.hbase.tarball.url" to point at HBase
>>> 0.90.3, I get the Master won't start error of the other email thread.
>>
>> I didn't specify a version so it was likely the 0.89 one. Maybe I'll give
>> it another try tomorrow with 0.90.3. If the problem is the same as with CDH
>> (wait with starting the HBase services until the namenode is available),
>> then it is easy to apply my fix to the stock hbase configure script as well.
>
> I'm not sure whether the problems are the same.  After failing to get 0.90.3
> working I reached out to the community.  Digging through the error logs, it
> looked like I had a mismatch between hadoop versions. (The one that HBase
> required was newer that the one Whirr uses by default, and the one that
> HBase prefers is not publically available anywhere).
>
>>
>>
>>>
>>> One complication is that HBase 0.90.3 needs an unreleased version of
>>> Hadoop.  I thought I could use the CDH hadoop 0.20.2 with stock HBase
>>> 0.90.3, but that didn't help matters.  I thought my problem was just hadoop
>>> versioning, but after asking around here, it seems there are other problems.
>>> The fact that Whirr requires a public URL to download these things from
>>> is also problematic.  I could roll my own hadoop at the version level that
>>> HBase expects, but then I'd have to host it somewhere.  My use-case,
>>> however, is that I'm writing a book, and hoping to make it easy  for readers
>>> to play with a cluster of latest HBase (so I'd prefer not to host a binary
>>> since I'd have to make in internet public).
>>
>> What would be the alternative for a public URL? Upload it from the user's
>> workstation? While it would be possible to implement that, it would require
>> serious upload capacity from the user, especially when doing a naive upload
>> of the .tar.gz to every node that needs it.
>
> Right, it's not ideal.  It /would/ support the case where someone rolls
> their own trunk version of HBase/hadoop, but I don't expect this to be a
> common use case.
> The best case would be if Apache made the correct version of hadoop
> available for each release of HBase.  That seems like the responsible thing
> for them to do.  I believe BigTop will eventually move things in that
> direction.
> In any case, I'm about ready to concede that CDH is my best bet, even though
> they're two versions behind.
>
>>
>>
>>>
>>> For me, CDH (0.90.1) is better than 0.89.x, but I really want 0.90.3.  If
>>> we can get CDH working, I'd probably be willing to back off of 0.90.3 and
>>> change the book to use 0.90.1.  I'd really prefer not to use 0.89 though
>>> since it's now several releases back.
>>> -- Jim
>>
>>
>> --
>> Bruno Dumon
>> Outerthought
>> http://outerthought.org/
>
> -- Jim

Re: CDH HBase & Whirr

Posted by "Jim R. Wilson" <wi...@gmail.com>.
On Tue, Jul 12, 2011 at 12:21 PM, Bruno Dumon <br...@outerthought.org>wrote:

> On Tue, Jul 12, 2011 at 5:51 PM, Jim R. Wilson <wi...@gmail.com>wrote:
>
>> What version? The de-facto HBase version is 0.89.xxxxxx (as of Whirr
>> 0.5.0).  When I change the "whirr.hbase.tarball.url" to point at HBase
>> 0.90.3, I get the Master won't start error of the other email thread.
>
>
> I didn't specify a version so it was likely the 0.89 one. Maybe I'll give
> it another try tomorrow with 0.90.3. If the problem is the same as with CDH
> (wait with starting the HBase services until the namenode is available),
> then it is easy to apply my fix to the stock hbase configure script as well.
>

I'm not sure whether the problems are the same.  After failing to get 0.90.3
working I reached out to the community.  Digging through the error logs, it
looked like I had a mismatch between hadoop versions. (The one that HBase
required was newer that the one Whirr uses by default, and the one that
HBase prefers is not publically available anywhere).


>
>
>
>>
>> One complication is that HBase 0.90.3 needs an unreleased version of
>> Hadoop.  I thought I could use the CDH hadoop 0.20.2 with stock HBase
>> 0.90.3, but that didn't help matters.  I thought my problem was just hadoop
>> versioning, but after asking around here, it seems there are other problems.
>>
>> The fact that Whirr requires a public URL to download these things from is
>> also problematic.  I could roll my own hadoop at the version level that
>> HBase expects, but then I'd have to host it somewhere.  My use-case,
>> however, is that I'm writing a book, and hoping to make it easy  for readers
>> to play with a cluster of latest HBase (so I'd prefer not to host a binary
>> since I'd have to make in internet public).
>>
>
> What would be the alternative for a public URL? Upload it from the user's
> workstation? While it would be possible to implement that, it would require
> serious upload capacity from the user, especially when doing a naive upload
> of the .tar.gz to every node that needs it.
>

Right, it's not ideal.  It /would/ support the case where someone rolls
their own trunk version of HBase/hadoop, but I don't expect this to be a
common use case.

The best case would be if Apache made the correct version of hadoop
available for each release of HBase.  That seems like the responsible thing
for them to do.  I believe BigTop will eventually move things in that
direction.

In any case, I'm about ready to concede that CDH is my best bet, even though
they're two versions behind.


>
>
>>
>> For me, CDH (0.90.1) is better than 0.89.x, but I really want 0.90.3.  If
>> we can get CDH working, I'd probably be willing to back off of 0.90.3 and
>> change the book to use 0.90.1.  I'd really prefer not to use 0.89 though
>> since it's now several releases back.
>>
>> -- Jim
>>
>>
> --
> Bruno Dumon
> Outerthought
> http://outerthought.org/
>

-- Jim

Re: CDH HBase & Whirr

Posted by Bruno Dumon <br...@outerthought.org>.
On Tue, Jul 12, 2011 at 5:51 PM, Jim R. Wilson <wi...@gmail.com>wrote:

> What version? The de-facto HBase version is 0.89.xxxxxx (as of Whirr
> 0.5.0).  When I change the "whirr.hbase.tarball.url" to point at HBase
> 0.90.3, I get the Master won't start error of the other email thread.


I didn't specify a version so it was likely the 0.89 one. Maybe I'll give it
another try tomorrow with 0.90.3. If the problem is the same as with CDH
(wait with starting the HBase services until the namenode is available),
then it is easy to apply my fix to the stock hbase configure script as well.



>
> One complication is that HBase 0.90.3 needs an unreleased version of
> Hadoop.  I thought I could use the CDH hadoop 0.20.2 with stock HBase
> 0.90.3, but that didn't help matters.  I thought my problem was just hadoop
> versioning, but after asking around here, it seems there are other problems.
>
> The fact that Whirr requires a public URL to download these things from is
> also problematic.  I could roll my own hadoop at the version level that
> HBase expects, but then I'd have to host it somewhere.  My use-case,
> however, is that I'm writing a book, and hoping to make it easy  for readers
> to play with a cluster of latest HBase (so I'd prefer not to host a binary
> since I'd have to make in internet public).
>

What would be the alternative for a public URL? Upload it from the user's
workstation? While it would be possible to implement that, it would require
serious upload capacity from the user, especially when doing a naive upload
of the .tar.gz to every node that needs it.


>
> For me, CDH (0.90.1) is better than 0.89.x, but I really want 0.90.3.  If
> we can get CDH working, I'd probably be willing to back off of 0.90.3 and
> change the book to use 0.90.1.  I'd really prefer not to use 0.89 though
> since it's now several releases back.
>
> -- Jim
>
>
-- 
Bruno Dumon
Outerthought
http://outerthought.org/

Re: CDH HBase & Whirr

Posted by "Jim R. Wilson" <wi...@gmail.com>.
What version? The de-facto HBase version is 0.89.xxxxxx (as of Whirr 0.5.0).
 When I change the "whirr.hbase.tarball.url" to point at HBase 0.90.3, I get
the Master won't start error of the other email thread.

One complication is that HBase 0.90.3 needs an unreleased version of Hadoop.
 I thought I could use the CDH hadoop 0.20.2 with stock HBase 0.90.3, but
that didn't help matters.  I thought my problem was just hadoop versioning,
but after asking around here, it seems there are other problems.

The fact that Whirr requires a public URL to download these things from is
also problematic.  I could roll my own hadoop at the version level that
HBase expects, but then I'd have to host it somewhere.  My use-case,
however, is that I'm writing a book, and hoping to make it easy  for readers
to play with a cluster of latest HBase (so I'd prefer not to host a binary
since I'd have to make in internet public).

For me, CDH (0.90.1) is better than 0.89.x, but I really want 0.90.3.  If we
can get CDH working, I'd probably be willing to back off of 0.90.3 and
change the book to use 0.90.1.  I'd really prefer not to use 0.89 though
since it's now several releases back.

-- Jim

On Tue, Jul 12, 2011 at 11:14 AM, Bruno Dumon <br...@outerthought.org>wrote:

> Good point, but I thought the stock HBase did not have this problem? I did
> a quick test and it seems to start up fine.
>
>
> On Tue, Jul 12, 2011 at 4:52 PM, Jim R. Wilson <wi...@gmail.com>wrote:
>
>> This thread's title refers to CDH - would the proposed solutions also
>> allow running stock HBase 0.90.3?
>>
>> So far I've been using Whirr 0.5.0.  I'll go get the latest from the repo,
>> at which time I'll be available to help with patches.
>>
>> -- Jim R. Wilson (jimbojw)
>>
>>
>> On Tue, Jul 12, 2011 at 9:32 AM, Bruno Dumon <br...@outerthought.org>wrote:
>>
>>> On Tue, Jul 12, 2011 at 11:22 AM, Bruno Dumon <br...@outerthought.org>wrote:
>>>
>>>> On Mon, Jul 11, 2011 at 6:10 PM, Andrei Savu <sa...@gmail.com>wrote:
>>>>
>>>>> On Mon, Jul 11, 2011 at 8:03 AM, Tom White <to...@cloudera.com> wrote:
>>>>> > That would be great. The issues is assigned to Andrei, so it would be
>>>>> > worth seeing if he's currently working on it.
>>>>> >
>>>>>
>>>>> Unfortunately I'm quite busy now and I'm not going to be able to work
>>>>> on that. Feel free to join! :)
>>>>>
>>>>
>>>> ok, cool. In the meantime I thought of first looking into making it work
>>>> with a wait, see below.
>>>>
>>>>
>>>>>
>>>>> > Yes, I think WHIRR-334 could go in if tests for other services that
>>>>> > may be affected still pass.
>>>>>
>>>>> I will test that and commit if everything is fine. How about adding a
>>>>> delay (sleep) to the configure_cdh_hbase before "service
>>>>> hadoop-hbase-master start" and "service hadoop-hbase-regionserver
>>>>> start". That should make the start-up process a bit more predictable
>>>>> (most of the time) until we have a good alternative in place.
>>>>>
>>>>>
>>>> I tried to do something more reliable than a simple sleep by adding the
>>>> following loop to configure_cdh_hbase.sh, before starting the services. It
>>>> sleeps until it can connect to the namenode web ui:
>>>>
>>>>   until wget $MASTER_HOST:50070 -O /dev/null -o /dev/null
>>>>   do
>>>>     echo "hbase start: waiting for namenode to be available -- $(date)"
>>>>     sleep 2
>>>>   done
>>>>
>>>>
>>>> It did not quite work as I expected, since (afaics) the instances for
>>>> different templates are not handled concurrently.
>>>>
>>>> I use the following templates:
>>>>
>>>> whirr.instance-templates=1
>>>> zookeeper+hadoop-namenode+hadoop-jobtracker+hbase-master,1
>>>> hadoop-datanode+hadoop-tasktracker+hbase-regionserver
>>>>
>>>> and on each run I tried, it always first runs the configure for the
>>>> template involving the regionserver. Because of the until-loop I added, the
>>>> configure script actually never finishes, but somewhere it is decided after
>>>> 10 minutes that it is done (while it's not), and then Whirr runs the
>>>> configure script on the other node. Once that's done, the until-loop
>>>> finishes and the regionserver starts successfully.
>>>>
>>>> So it seems like this approach would work, if we added concurrent
>>>> execution of the configure script for different templates. Seems like this
>>>> is also part of the WHIRR-221 (startup order) patch. Maybe it makes sense to
>>>> first integrate that part of that patch? Or do you expect the concurrency
>>>> might break other things?
>>>>
>>>
>>> Thinking further about this: if the wait-for-namenode-loop would be part
>>> of HBase, the 'service hadoop-hbase restart' would return as soon as the JVM
>>> is launched, and not wait for HBase to be completely ready. Following this
>>> reasoning, we can as well run the script-based loop in the background too.
>>> I'm trying this out now, I'll update the WHIRR-334 patch when done.
>>>
>>> Regardless of this, I think it is still interesting to run the
>>> configuration phase for all templates in parallel. I have a patch for this
>>> ready, any interest in this?
>>>
>>>
>>> --
>>> Bruno Dumon
>>> Outerthought
>>> http://outerthought.org/
>>>
>>
>>
>
>
> --
> Bruno Dumon
> Outerthought
> http://outerthought.org/
>

Re: CDH HBase & Whirr

Posted by Bruno Dumon <br...@outerthought.org>.
Good point, but I thought the stock HBase did not have this problem? I did a
quick test and it seems to start up fine.

On Tue, Jul 12, 2011 at 4:52 PM, Jim R. Wilson <wi...@gmail.com>wrote:

> This thread's title refers to CDH - would the proposed solutions also allow
> running stock HBase 0.90.3?
>
> So far I've been using Whirr 0.5.0.  I'll go get the latest from the repo,
> at which time I'll be available to help with patches.
>
> -- Jim R. Wilson (jimbojw)
>
>
> On Tue, Jul 12, 2011 at 9:32 AM, Bruno Dumon <br...@outerthought.org>wrote:
>
>> On Tue, Jul 12, 2011 at 11:22 AM, Bruno Dumon <br...@outerthought.org>wrote:
>>
>>> On Mon, Jul 11, 2011 at 6:10 PM, Andrei Savu <sa...@gmail.com>wrote:
>>>
>>>> On Mon, Jul 11, 2011 at 8:03 AM, Tom White <to...@cloudera.com> wrote:
>>>> > That would be great. The issues is assigned to Andrei, so it would be
>>>> > worth seeing if he's currently working on it.
>>>> >
>>>>
>>>> Unfortunately I'm quite busy now and I'm not going to be able to work
>>>> on that. Feel free to join! :)
>>>>
>>>
>>> ok, cool. In the meantime I thought of first looking into making it work
>>> with a wait, see below.
>>>
>>>
>>>>
>>>> > Yes, I think WHIRR-334 could go in if tests for other services that
>>>> > may be affected still pass.
>>>>
>>>> I will test that and commit if everything is fine. How about adding a
>>>> delay (sleep) to the configure_cdh_hbase before "service
>>>> hadoop-hbase-master start" and "service hadoop-hbase-regionserver
>>>> start". That should make the start-up process a bit more predictable
>>>> (most of the time) until we have a good alternative in place.
>>>>
>>>>
>>> I tried to do something more reliable than a simple sleep by adding the
>>> following loop to configure_cdh_hbase.sh, before starting the services. It
>>> sleeps until it can connect to the namenode web ui:
>>>
>>>   until wget $MASTER_HOST:50070 -O /dev/null -o /dev/null
>>>   do
>>>     echo "hbase start: waiting for namenode to be available -- $(date)"
>>>     sleep 2
>>>   done
>>>
>>>
>>> It did not quite work as I expected, since (afaics) the instances for
>>> different templates are not handled concurrently.
>>>
>>> I use the following templates:
>>>
>>> whirr.instance-templates=1
>>> zookeeper+hadoop-namenode+hadoop-jobtracker+hbase-master,1
>>> hadoop-datanode+hadoop-tasktracker+hbase-regionserver
>>>
>>> and on each run I tried, it always first runs the configure for the
>>> template involving the regionserver. Because of the until-loop I added, the
>>> configure script actually never finishes, but somewhere it is decided after
>>> 10 minutes that it is done (while it's not), and then Whirr runs the
>>> configure script on the other node. Once that's done, the until-loop
>>> finishes and the regionserver starts successfully.
>>>
>>> So it seems like this approach would work, if we added concurrent
>>> execution of the configure script for different templates. Seems like this
>>> is also part of the WHIRR-221 (startup order) patch. Maybe it makes sense to
>>> first integrate that part of that patch? Or do you expect the concurrency
>>> might break other things?
>>>
>>
>> Thinking further about this: if the wait-for-namenode-loop would be part
>> of HBase, the 'service hadoop-hbase restart' would return as soon as the JVM
>> is launched, and not wait for HBase to be completely ready. Following this
>> reasoning, we can as well run the script-based loop in the background too.
>> I'm trying this out now, I'll update the WHIRR-334 patch when done.
>>
>> Regardless of this, I think it is still interesting to run the
>> configuration phase for all templates in parallel. I have a patch for this
>> ready, any interest in this?
>>
>>
>> --
>> Bruno Dumon
>> Outerthought
>> http://outerthought.org/
>>
>
>


-- 
Bruno Dumon
Outerthought
http://outerthought.org/

Re: CDH HBase & Whirr

Posted by "Jim R. Wilson" <wi...@gmail.com>.
This thread's title refers to CDH - would the proposed solutions also allow
running stock HBase 0.90.3?

So far I've been using Whirr 0.5.0.  I'll go get the latest from the repo,
at which time I'll be available to help with patches.

-- Jim R. Wilson (jimbojw)

On Tue, Jul 12, 2011 at 9:32 AM, Bruno Dumon <br...@outerthought.org> wrote:

> On Tue, Jul 12, 2011 at 11:22 AM, Bruno Dumon <br...@outerthought.org>wrote:
>
>> On Mon, Jul 11, 2011 at 6:10 PM, Andrei Savu <sa...@gmail.com>wrote:
>>
>>> On Mon, Jul 11, 2011 at 8:03 AM, Tom White <to...@cloudera.com> wrote:
>>> > That would be great. The issues is assigned to Andrei, so it would be
>>> > worth seeing if he's currently working on it.
>>> >
>>>
>>> Unfortunately I'm quite busy now and I'm not going to be able to work
>>> on that. Feel free to join! :)
>>>
>>
>> ok, cool. In the meantime I thought of first looking into making it work
>> with a wait, see below.
>>
>>
>>>
>>> > Yes, I think WHIRR-334 could go in if tests for other services that
>>> > may be affected still pass.
>>>
>>> I will test that and commit if everything is fine. How about adding a
>>> delay (sleep) to the configure_cdh_hbase before "service
>>> hadoop-hbase-master start" and "service hadoop-hbase-regionserver
>>> start". That should make the start-up process a bit more predictable
>>> (most of the time) until we have a good alternative in place.
>>>
>>>
>> I tried to do something more reliable than a simple sleep by adding the
>> following loop to configure_cdh_hbase.sh, before starting the services. It
>> sleeps until it can connect to the namenode web ui:
>>
>>   until wget $MASTER_HOST:50070 -O /dev/null -o /dev/null
>>   do
>>     echo "hbase start: waiting for namenode to be available -- $(date)"
>>     sleep 2
>>   done
>>
>>
>> It did not quite work as I expected, since (afaics) the instances for
>> different templates are not handled concurrently.
>>
>> I use the following templates:
>>
>> whirr.instance-templates=1
>> zookeeper+hadoop-namenode+hadoop-jobtracker+hbase-master,1
>> hadoop-datanode+hadoop-tasktracker+hbase-regionserver
>>
>> and on each run I tried, it always first runs the configure for the
>> template involving the regionserver. Because of the until-loop I added, the
>> configure script actually never finishes, but somewhere it is decided after
>> 10 minutes that it is done (while it's not), and then Whirr runs the
>> configure script on the other node. Once that's done, the until-loop
>> finishes and the regionserver starts successfully.
>>
>> So it seems like this approach would work, if we added concurrent
>> execution of the configure script for different templates. Seems like this
>> is also part of the WHIRR-221 (startup order) patch. Maybe it makes sense to
>> first integrate that part of that patch? Or do you expect the concurrency
>> might break other things?
>>
>
> Thinking further about this: if the wait-for-namenode-loop would be part of
> HBase, the 'service hadoop-hbase restart' would return as soon as the JVM is
> launched, and not wait for HBase to be completely ready. Following this
> reasoning, we can as well run the script-based loop in the background too.
> I'm trying this out now, I'll update the WHIRR-334 patch when done.
>
> Regardless of this, I think it is still interesting to run the
> configuration phase for all templates in parallel. I have a patch for this
> ready, any interest in this?
>
>
> --
> Bruno Dumon
> Outerthought
> http://outerthought.org/
>

Re: CDH HBase & Whirr

Posted by Bruno Dumon <br...@outerthought.org>.
On Tue, Jul 12, 2011 at 11:22 AM, Bruno Dumon <br...@outerthought.org>wrote:

> On Mon, Jul 11, 2011 at 6:10 PM, Andrei Savu <sa...@gmail.com>wrote:
>
>> On Mon, Jul 11, 2011 at 8:03 AM, Tom White <to...@cloudera.com> wrote:
>> > That would be great. The issues is assigned to Andrei, so it would be
>> > worth seeing if he's currently working on it.
>> >
>>
>> Unfortunately I'm quite busy now and I'm not going to be able to work
>> on that. Feel free to join! :)
>>
>
> ok, cool. In the meantime I thought of first looking into making it work
> with a wait, see below.
>
>
>>
>> > Yes, I think WHIRR-334 could go in if tests for other services that
>> > may be affected still pass.
>>
>> I will test that and commit if everything is fine. How about adding a
>> delay (sleep) to the configure_cdh_hbase before "service
>> hadoop-hbase-master start" and "service hadoop-hbase-regionserver
>> start". That should make the start-up process a bit more predictable
>> (most of the time) until we have a good alternative in place.
>>
>>
> I tried to do something more reliable than a simple sleep by adding the
> following loop to configure_cdh_hbase.sh, before starting the services. It
> sleeps until it can connect to the namenode web ui:
>
>   until wget $MASTER_HOST:50070 -O /dev/null -o /dev/null
>   do
>     echo "hbase start: waiting for namenode to be available -- $(date)"
>     sleep 2
>   done
>
>
> It did not quite work as I expected, since (afaics) the instances for
> different templates are not handled concurrently.
>
> I use the following templates:
>
> whirr.instance-templates=1
> zookeeper+hadoop-namenode+hadoop-jobtracker+hbase-master,1
> hadoop-datanode+hadoop-tasktracker+hbase-regionserver
>
> and on each run I tried, it always first runs the configure for the
> template involving the regionserver. Because of the until-loop I added, the
> configure script actually never finishes, but somewhere it is decided after
> 10 minutes that it is done (while it's not), and then Whirr runs the
> configure script on the other node. Once that's done, the until-loop
> finishes and the regionserver starts successfully.
>
> So it seems like this approach would work, if we added concurrent execution
> of the configure script for different templates. Seems like this is also
> part of the WHIRR-221 (startup order) patch. Maybe it makes sense to first
> integrate that part of that patch? Or do you expect the concurrency might
> break other things?
>

Thinking further about this: if the wait-for-namenode-loop would be part of
HBase, the 'service hadoop-hbase restart' would return as soon as the JVM is
launched, and not wait for HBase to be completely ready. Following this
reasoning, we can as well run the script-based loop in the background too.
I'm trying this out now, I'll update the WHIRR-334 patch when done.

Regardless of this, I think it is still interesting to run the configuration
phase for all templates in parallel. I have a patch for this ready, any
interest in this?

-- 
Bruno Dumon
Outerthought
http://outerthought.org/

Re: CDH HBase & Whirr

Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, Jul 11, 2011 at 6:10 PM, Andrei Savu <sa...@gmail.com> wrote:

> On Mon, Jul 11, 2011 at 8:03 AM, Tom White <to...@cloudera.com> wrote:
> > That would be great. The issues is assigned to Andrei, so it would be
> > worth seeing if he's currently working on it.
> >
>
> Unfortunately I'm quite busy now and I'm not going to be able to work
> on that. Feel free to join! :)
>

ok, cool. In the meantime I thought of first looking into making it work
with a wait, see below.


>
> > Yes, I think WHIRR-334 could go in if tests for other services that
> > may be affected still pass.
>
> I will test that and commit if everything is fine. How about adding a
> delay (sleep) to the configure_cdh_hbase before "service
> hadoop-hbase-master start" and "service hadoop-hbase-regionserver
> start". That should make the start-up process a bit more predictable
> (most of the time) until we have a good alternative in place.
>
>
I tried to do something more reliable than a simple sleep by adding the
following loop to configure_cdh_hbase.sh, before starting the services. It
sleeps until it can connect to the namenode web ui:

  until wget $MASTER_HOST:50070 -O /dev/null -o /dev/null
  do
    echo "hbase start: waiting for namenode to be available -- $(date)"
    sleep 2
  done


It did not quite work as I expected, since (afaics) the instances for
different templates are not handled concurrently.

I use the following templates:

whirr.instance-templates=1
zookeeper+hadoop-namenode+hadoop-jobtracker+hbase-master,1
hadoop-datanode+hadoop-tasktracker+hbase-regionserver

and on each run I tried, it always first runs the configure for the template
involving the regionserver. Because of the until-loop I added, the configure
script actually never finishes, but somewhere it is decided after 10 minutes
that it is done (while it's not), and then Whirr runs the configure script
on the other node. Once that's done, the until-loop finishes and the
regionserver starts successfully.

So it seems like this approach would work, if we added concurrent execution
of the configure script for different templates. Seems like this is also
part of the WHIRR-221 (startup order) patch. Maybe it makes sense to first
integrate that part of that patch? Or do you expect the concurrency might
break other things?

-- 
Bruno Dumon
Outerthought
http://outerthought.org/

Re: CDH HBase & Whirr

Posted by Andrei Savu <sa...@gmail.com>.
On Mon, Jul 11, 2011 at 8:03 AM, Tom White <to...@cloudera.com> wrote:
> That would be great. The issues is assigned to Andrei, so it would be
> worth seeing if he's currently working on it.
>

Unfortunately I'm quite busy now and I'm not going to be able to work
on that. Feel free to join! :)

> Yes, I think WHIRR-334 could go in if tests for other services that
> may be affected still pass.

I will test that and commit if everything is fine. How about adding a
delay (sleep) to the configure_cdh_hbase before "service
hadoop-hbase-master start" and "service hadoop-hbase-regionserver
start". That should make the start-up process a bit more predictable
(most of the time) until we have a good alternative in place.

-- Andrei

Re: CDH HBase & Whirr

Posted by Tom White <to...@cloudera.com>.
On Mon, Jul 11, 2011 at 10:03 AM, Bruno Dumon <br...@outerthought.org> wrote:
> Hi,
>
> This is a follow-up on the thread of a few days ago (can't reply since I'm
> just subscribed) where Andrei wrote
> (http://markmail.org/message/kbwopyh6zk572dgz):
>
>> The following patch could also be useful to you:
>> https://issues.apache.org/jira/browse/WHIRR-334
>>
>> There is still a service start race condition that we need to address
>> before committing (e.g. the HBase region server does not start if HDFS is
>> not available).
>
> I'm very much interested in seeing CDH Hadoop & HBase work with Whirr.
>
> Is there anyone already working on making WHIRR-221 (order of starting
> services) compatible with trunk? If not, I would (try to) look into that.

That would be great. The issues is assigned to Andrei, so it would be
worth seeing if he's currently working on it.

>
> Also, should the region server startup issue hold back WHIRR-334 from being
> applied? With the patch applied, it completes the configuration phase
> without errors, which seems already a huge improvement to me.

Yes, I think WHIRR-334 could go in if tests for other services that
may be affected still pass.

Cheers,
Tom

>
> Thanks,
>
> Bruno.
>
> --
> Bruno Dumon
> Outerthought
> http://outerthought.org/
>