HBASE-1092 FileNotFoundException trying to get index file size for metrics; fix the build
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@730490 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0bbcc18c60
commit
c6a0ee0e83
|
@ -457,14 +457,15 @@ public class HStore implements HConstants {
|
||||||
"Cleaned up info file. Continuing...Probable DATA LOSS!!!");
|
"Cleaned up info file. Continuing...Probable DATA LOSS!!!");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (isEmptyDataFile(mapfile)) {
|
// References don't have data or index components under mapfile.
|
||||||
|
if (!isReference && isEmptyDataFile(mapfile)) {
|
||||||
curfile.delete();
|
curfile.delete();
|
||||||
// We can have empty data file if data loss in hdfs.
|
// We can have empty data file if data loss in hdfs.
|
||||||
LOG.warn("Mapfile " + mapfile.toString() + " has empty data. " +
|
LOG.warn("Mapfile " + mapfile.toString() + " has empty data. " +
|
||||||
"Deleting. Continuing...Probable DATA LOSS!!! See HBASE-646.");
|
"Deleting. Continuing...Probable DATA LOSS!!! See HBASE-646.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (isEmptyIndexFile(mapfile)) {
|
if (!isReference && isEmptyIndexFile(mapfile)) {
|
||||||
try {
|
try {
|
||||||
// Try fixing this file.. if we can. Use the hbase version of fix.
|
// 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.
|
// Need to remove the old index file first else fix won't go ahead.
|
||||||
|
@ -552,8 +553,8 @@ public class HStore implements HConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @param mapfile
|
* @param f
|
||||||
* @return True if the passed mapfile has a zero-length index component (its
|
* @return True if the passed file does not exist or is zero-length (its
|
||||||
* broken).
|
* broken).
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue