HBASE-7795 Race in the Restore Archiving (Matteo Bertozzi)

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/hbase-7290v2@1446157 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Hsieh 2013-02-14 13:06:17 +00:00
parent 851141a357
commit 3fc3bcf275
1 changed files with 8 additions and 1 deletions

View File

@ -255,7 +255,14 @@ public class HFileArchiver {
+ Bytes.toString(family) + ", deleting compacted files instead.");
}
fs.rename(storeFile, new Path(storeArchiveDir, storeFile.getName()));
// do the actual archive
long start = EnvironmentEdgeManager.currentTimeMillis();
File file = new FileablePath(fs, storeFile);
if (!resolveAndArchiveFile(storeArchiveDir, file, Long.toString(start))) {
throw new IOException("Failed to archive/delete the file for region:"
+ regionInfo.getRegionNameAsString() + ", family:" + Bytes.toString(family)
+ " into " + storeArchiveDir + ". Something is probably awry on the filesystem.");
}
}
/**