Author: tedyu
Date: Fri Jul 29 06:42:11 2011
New Revision: 1152122

URL: http://svn.apache.org/viewvc?rev=1152122&view=rev
Log:
HBASE-4144  RS does not abort if the initialization of RS fails 
(ramkrishna.s.vasudevan)

Modified:
    hbase/trunk/CHANGES.txt
    
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1152122&r1=1152121&r2=1152122&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Fri Jul 29 06:42:11 2011
@@ -177,6 +177,7 @@ Release 0.91.0 - Unreleased
                (Prakash Khemani and ramkrishna.s.vasudevan)
    HBASE-4083  If Enable table is not completed and is partial, then scanning 
of
                the table is not working (ramkrishna.s.vasudevan)
+   HBASE-4144  RS does not abort if the initialization of RS fails 
(ramkrishna.s.vasudevan)
 
   IMPROVEMENTS
    HBASE-3290  Max Compaction Size (Nicolas Spiegelberg via Stack)  

Modified: 
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: 
http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1152122&r1=1152121&r2=1152122&view=diff
==============================================================================
--- 
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 (original)
+++ 
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 Fri Jul 29 06:42:11 2011
@@ -498,8 +498,7 @@ public class HRegionServer implements HR
    * @throws IOException
    * @throws InterruptedException
    */
-  private void preRegistrationInitialization()
-  throws IOException, InterruptedException {
+  private void preRegistrationInitialization(){
     try {
       initializeZooKeeper();
       initializeThreads();
@@ -510,8 +509,8 @@ public class HRegionServer implements HR
     } catch (Throwable t) {
       // Call stop if error or process will stick around for ever since server
       // puts up non-daemon threads.
-      LOG.error("Stopping HRS because failed initialize", t);
       this.rpcServer.stop();
+      abort("Initialization of RS failed.  Hence aborting RS.", t);
     }
   }
 
@@ -597,7 +596,7 @@ public class HRegionServer implements HR
     try {
       // Do pre-registration initializations; zookeeper, lease threads, etc.
       preRegistrationInitialization();
-    } catch (Exception e) {
+    } catch (Throwable e) {
       abort("Fatal exception during initialization", e);
     }
 


Reply via email to