HBASE-1114 Weird NPEs compacting

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@733213 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2009-01-10 00:59:30 +00:00
parent 7acb2ad440
commit fc2157ae44
4 changed files with 17 additions and 13 deletions

View File

@ -137,6 +137,7 @@ Release 0.19.0 - Unreleased
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

View File

@ -696,8 +696,9 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
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;

View File

@ -866,8 +866,10 @@ public class HStore implements HConstants {
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;

View File

@ -15,13 +15,13 @@ Automatically created by Tomcat JspC.
</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>
@ -29,15 +29,15 @@ Automatically created by Tomcat JspC.
<url-pattern>/master.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-name>
<url-pattern>/table.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-mapping>
<servlet-mapping>
<servlet-name>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-name>
<url-pattern>/table.jsp</url-pattern>
</servlet-mapping>
</web-app>