@@ -300,7 +300,7 @@ public Configuration getConfiguration() {
300
300
* Wait for the specified region server to stop. Removes this thread from list of running threads.
301
301
* @return Name of region server that just went down.
302
302
*/
303
- public String waitOnRegionServer (int serverNumber ) {
303
+ public String waitOnRegionServer (int serverNumber ) throws InterruptedException {
304
304
JVMClusterUtil .RegionServerThread regionServerThread = this .regionThreads .get (serverNumber );
305
305
return waitOnRegionServer (regionServerThread );
306
306
}
@@ -309,14 +309,11 @@ public String waitOnRegionServer(int serverNumber) {
309
309
* Wait for the specified region server to stop. Removes this thread from list of running threads.
310
310
* @return Name of region server that just went down.
311
311
*/
312
- public String waitOnRegionServer (JVMClusterUtil .RegionServerThread rst ) {
312
+ public String waitOnRegionServer (JVMClusterUtil .RegionServerThread rst )
313
+ throws InterruptedException {
313
314
while (rst .isAlive ()) {
314
- try {
315
- LOG .info ("Waiting on " + rst .getRegionServer ().toString ());
316
- rst .join ();
317
- } catch (InterruptedException e ) {
318
- e .printStackTrace ();
319
- }
315
+ LOG .info ("Waiting on " + rst .getRegionServer ().toString ());
316
+ rst .join ();
320
317
}
321
318
regionThreads .remove (rst );
322
319
return rst .getName ();
@@ -372,7 +369,7 @@ public List<JVMClusterUtil.MasterThread> getLiveMasters() {
372
369
* Wait for the specified master to stop. Removes this thread from list of running threads.
373
370
* @return Name of master that just went down.
374
371
*/
375
- public String waitOnMaster (int serverNumber ) {
372
+ public String waitOnMaster (int serverNumber ) throws InterruptedException {
376
373
JVMClusterUtil .MasterThread masterThread = this .masterThreads .get (serverNumber );
377
374
return waitOnMaster (masterThread );
378
375
}
@@ -381,14 +378,10 @@ public String waitOnMaster(int serverNumber) {
381
378
* Wait for the specified master to stop. Removes this thread from list of running threads.
382
379
* @return Name of master that just went down.
383
380
*/
384
- public String waitOnMaster (JVMClusterUtil .MasterThread masterThread ) {
381
+ public String waitOnMaster (JVMClusterUtil .MasterThread masterThread ) throws InterruptedException {
385
382
while (masterThread .isAlive ()) {
386
- try {
387
- LOG .info ("Waiting on " + masterThread .getMaster ().getServerName ().toString ());
388
- masterThread .join ();
389
- } catch (InterruptedException e ) {
390
- e .printStackTrace ();
391
- }
383
+ LOG .info ("Waiting on " + masterThread .getMaster ().getServerName ().toString ());
384
+ masterThread .join ();
392
385
}
393
386
masterThreads .remove (masterThread );
394
387
return masterThread .getName ();
0 commit comments