Fixing TestRemoteTable and TestHRegionServerFileSystemFailure broken by D336813

Summary:
In D336813 I broke two unit tests, which was hard to notice because they failed
with time-outs. TestHRegionServerFileSystemFailure re-starts a master in the end
if it had crashed so that regionservers can shut down properly, but the
condition it uses to identify whether the master is still alive was no longer
valid, because there is now a thread object wrapping HMaster, and
master.isAlive() is meaningless. I replaced this with master.isClosed() and
removed hard-coded master class from the unit test.

TestRemoteTable started failing because of a bug in JVMClusterUtil.shutdown()
-- it did not call join() on master threads.

Also calling Thread.currentThread().interrupt() when handling
InterruptedException instead of simply ignoring it. This is recommended by Java
Concurrency in Practice as well as in other articles online as the proper way to
handle InterruptedException, but I must admit I don't fully understand why.

Test Plan: All 621 unit tests pass (compared to 614 without the patch).

Reviewers: pritam, kranganathan, pkhemani

Reviewed By: pritam

CC: hbase-eng@lists, pkhemani, pritam, mbautin

Differential Revision: 340934

Revert Plan: OK

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89@1182040 13f79535-47bb-0310-9956-ffa450edef68
3 files changed