hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r733213 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java src/java/org/apache/hadoop/hbase/regionserver/HStore.java src/webapps/master/WEB-INF/web.xml
Date Sat, 10 Jan 2009 00:59:30 GMT
Author: stack
Date: Fri Jan  9 16:59:30 2009
New Revision: 733213

URL: http://svn.apache.org/viewvc?rev=733213&view=rev
Log:
HBASE-1114 Weird NPEs compacting

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java
    hadoop/hbase/trunk/src/webapps/master/WEB-INF/web.xml

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=733213&r1=733212&r2=733213&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Fri Jan  9 16:59:30 2009
@@ -137,6 +137,7 @@
                IllegalStateException: Cannot set a region to be closed it it was
                not already marked as closing, Does not recover if HRS carrying 
                -ROOT- goes down
+   HBASE-1114  Weird NPEs compacting
 
   IMPROVEMENTS
    HBASE-901   Add a limit to key length, check key and value length on client side

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=733213&r1=733212&r2=733213&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Fri
Jan  9 16:59:30 2009
@@ -696,8 +696,9 @@
   private boolean checkOOME(final Throwable e) {
     boolean stop = false;
     if (e instanceof OutOfMemoryError ||
-        (e.getCause()!= null && e.getCause() instanceof OutOfMemoryError) ||
-        e.getMessage().contains("java.lang.OutOfMemoryError")) {
+      (e.getCause() != null && e.getCause() instanceof OutOfMemoryError) ||
+      (e.getMessage() != null &&
+        e.getMessage().contains("java.lang.OutOfMemoryError"))) {
       LOG.fatal("OutOfMemoryError, aborting.", e);
       abort();
       stop = true;

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java?rev=733213&r1=733212&r2=733213&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java Fri Jan 
9 16:59:30 2009
@@ -866,8 +866,10 @@
           return null;
         }
         int len = 0;
-        for (FileStatus fstatus:fs.listStatus(path)) {
-          len += fstatus.getLen();
+        // listStatus can come back null.
+        FileStatus [] fss = this.fs.listStatus(path);
+        for (int ii = 0; fss != null && i < fss.length; ii++) {
+          len += fss[ii].getLen();
         }
         fileSizes[i] = len;
         totalSize += len;

Modified: hadoop/hbase/trunk/src/webapps/master/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/webapps/master/WEB-INF/web.xml?rev=733213&r1=733212&r2=733213&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/webapps/master/WEB-INF/web.xml (original)
+++ hadoop/hbase/trunk/src/webapps/master/WEB-INF/web.xml Fri Jan  9 16:59:30 2009
@@ -15,13 +15,13 @@
     </servlet>
 
     <servlet>
-        <servlet-name>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-name>
-        <servlet-class>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-class>
+        <servlet-name>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-name>
+        <servlet-class>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-class>
     </servlet>
 
     <servlet>
-        <servlet-name>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-name>
-        <servlet-class>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-class>
+        <servlet-name>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-name>
+        <servlet-class>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-class>
     </servlet>
 
     <servlet-mapping>
@@ -30,13 +30,13 @@
     </servlet-mapping>
 
     <servlet-mapping>
-        <servlet-name>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-name>
-        <url-pattern>/table.jsp</url-pattern>
+        <servlet-name>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-name>
+        <url-pattern>/regionhistorian.jsp</url-pattern>
     </servlet-mapping>
 
     <servlet-mapping>
-        <servlet-name>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-name>
-        <url-pattern>/regionhistorian.jsp</url-pattern>
+        <servlet-name>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-name>
+        <url-pattern>/table.jsp</url-pattern>
     </servlet-mapping>
 
 </web-app>



Mime
View raw message