You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "KannanM@gmail.com (Kannan Muthukkaruppan)" <ka...@gmail.com> on 2010/04/22 17:09:13 UTC

process based miniHBase cluster?

Has there been any discussion/thoughts/earlier work on doing a process-based
(instead of thread-based) version of miniHBaseCluster?

Currently, in the thread-based miniHBaseCluster unit tests, to simulate
various kill -9 scenarios of killing a specific region server or master is
trickier. There is a abortRegionServer()/expireRSSession etc. but those are
still somewhat of a controlled shutdown... and it is questionable if they
mimic the real scenarios accurately enough. Yesterday, Todd e.g. asked in
IRC if there was a simple way to kill/abort the master in this setup... and
I think the answer is there isn't currently a simple way to do that. Karthik
& I were trying to write a test where  we want to simulate kill of a RS, and
then restart an RS on the same server/port before the ZK expiry. But using
abortRegionServer() causes the ZK lease to expire right away... as it seems
to be doing a more controlled shutdown of the various threads associated
with that RS. If we went to a process-based setup, where Master and each RS
were each there own separate processes, simulating a lot of these scenarios
in a single-box unit test run env might be much easier.

Thoughts?

regards,
Kannan

Re: process based miniHBase cluster?

Posted by Stack <st...@duboce.net>.
I took a look at kill of RS inside minihbasecluster.  It'd be a flag
like abort is currently now and if set we'd skip cleanup on the way
out.  You'd have to close the socket at least on the way out if you
want to do wacky stuff like quickly start a regionserver on the same
port (to avoid bind failure).  It would not be same as a kill -9 but
might be of some utility.  I'll make a patch for it.

St.Ack

On Thu, Apr 22, 2010 at 8:09 AM, KannanM@gmail.com (Kannan
Muthukkaruppan) <ka...@gmail.com> wrote:
> Has there been any discussion/thoughts/earlier work on doing a process-based
> (instead of thread-based) version of miniHBaseCluster?
>
> Currently, in the thread-based miniHBaseCluster unit tests, to simulate
> various kill -9 scenarios of killing a specific region server or master is
> trickier. There is a abortRegionServer()/expireRSSession etc. but those are
> still somewhat of a controlled shutdown... and it is questionable if they
> mimic the real scenarios accurately enough. Yesterday, Todd e.g. asked in
> IRC if there was a simple way to kill/abort the master in this setup... and
> I think the answer is there isn't currently a simple way to do that. Karthik
> & I were trying to write a test where  we want to simulate kill of a RS, and
> then restart an RS on the same server/port before the ZK expiry. But using
> abortRegionServer() causes the ZK lease to expire right away... as it seems
> to be doing a more controlled shutdown of the various threads associated
> with that RS. If we went to a process-based setup, where Master and each RS
> were each there own separate processes, simulating a lot of these scenarios
> in a single-box unit test run env might be much easier.
>
> Thoughts?
>
> regards,
> Kannan
>

Re: process based miniHBase cluster?

Posted by Dhruba Borthakur <dh...@gmail.com>.
But in this case, you have to ensure that all the processes that a test
created are cleaned up when the test exists, this could be a problem.

HDFS uses a test called TestDatanodeDeath where certain datanodes are
killed. will a similar strategy work here?

dhruba

On Thu, Apr 22, 2010 at 8:09 AM, KannanM@gmail.com (Kannan Muthukkaruppan) <
kannanm@gmail.com> wrote:

> Has there been any discussion/thoughts/earlier work on doing a
> process-based
> (instead of thread-based) version of miniHBaseCluster?
>
> Currently, in the thread-based miniHBaseCluster unit tests, to simulate
> various kill -9 scenarios of killing a specific region server or master is
> trickier. There is a abortRegionServer()/expireRSSession etc. but those are
> still somewhat of a controlled shutdown... and it is questionable if they
> mimic the real scenarios accurately enough. Yesterday, Todd e.g. asked in
> IRC if there was a simple way to kill/abort the master in this setup... and
> I think the answer is there isn't currently a simple way to do that.
> Karthik
> & I were trying to write a test where  we want to simulate kill of a RS,
> and
> then restart an RS on the same server/port before the ZK expiry. But using
> abortRegionServer() causes the ZK lease to expire right away... as it seems
> to be doing a more controlled shutdown of the various threads associated
> with that RS. If we went to a process-based setup, where Master and each RS
> were each there own separate processes, simulating a lot of these scenarios
> in a single-box unit test run env might be much easier.
>
> Thoughts?
>
> regards,
> Kannan
>



-- 
Connect to me at http://www.facebook.com/dhruba