HBASE-945 Be consistent in use of qualified/unqualified mapfile paths

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@706681 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-10-21 16:39:10 +00:00
parent fd5543190c
commit b5200e0ea6
2 changed files with 5 additions and 3 deletions

View File

@ -36,6 +36,7 @@ Release 0.19.0 - Unreleased
With J-D's one line patch, test cases now appear to work and
PerformanceEvaluation works as before.
HBASE-939 NPE in HStoreKey
HBASE-945 Be consistent in use of qualified/unqualified mapfile paths
IMPROVEMENTS
HBASE-901 Add a limit to key length, check key and value length on client side

View File

@ -459,16 +459,17 @@ public class HStore implements HConstants {
results.put(Long.valueOf(storeSeqId), curfile);
// Keep list of sympathetic data mapfiles for cleaning info dir in next
// section. Make sure path is fully qualified for compare.
mapfiles.add(mapfile);
mapfiles.add(this.fs.makeQualified(mapfile));
}
// List paths by experience returns fully qualified names -- at least when
// running on a mini hdfs cluster.
FileStatus datfiles[] = fs.listStatus(mapdir);
FileStatus [] datfiles = fs.listStatus(mapdir);
for (int i = 0; i < datfiles.length; i++) {
Path p = datfiles[i].getPath();
// If does not have sympathetic info file, delete.
if (!mapfiles.contains(fs.makeQualified(p))) {
Path qualifiedP = fs.makeQualified(p);
if (!mapfiles.contains(qualifiedP)) {
fs.delete(p, true);
}
}