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, kann...@gmail.com (Kannan
Muthukkaruppan) <kann...@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
>

Reply via email to