You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2008/12/31 23:33:43 UTC
svn commit: r730490 -
/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java
Author: stack
Date: Wed Dec 31 14:33:43 2008
New Revision: 730490
URL: http://svn.apache.org/viewvc?rev=730490&view=rev
Log:
HBASE-1092 FileNotFoundException trying to get index file size for metrics; fix the build
Modified:
hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java
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=730490&r1=730489&r2=730490&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 Wed Dec 31 14:33:43 2008
@@ -457,14 +457,15 @@
"Cleaned up info file. Continuing...Probable DATA LOSS!!!");
continue;
}
- if (isEmptyDataFile(mapfile)) {
+ // References don't have data or index components under mapfile.
+ if (!isReference && isEmptyDataFile(mapfile)) {
curfile.delete();
// We can have empty data file if data loss in hdfs.
LOG.warn("Mapfile " + mapfile.toString() + " has empty data. " +
"Deleting. Continuing...Probable DATA LOSS!!! See HBASE-646.");
continue;
}
- if (isEmptyIndexFile(mapfile)) {
+ if (!isReference && isEmptyIndexFile(mapfile)) {
try {
// Try fixing this file.. if we can. Use the hbase version of fix.
// Need to remove the old index file first else fix won't go ahead.
@@ -552,8 +553,8 @@
}
/*
- * @param mapfile
- * @return True if the passed mapfile has a zero-length index component (its
+ * @param f
+ * @return True if the passed file does not exist or is zero-length (its
* broken).
* @throws IOException
*/