HDFS-7570. SecondaryNameNode need twice memory when calling reloadFromImageFile. Contributed by zhaoyunjiong.

(cherry picked from commit 85aec75ce5)
(cherry picked from commit 27eecaef10)
This commit is contained in:
cnauroth 2015-01-13 16:10:28 -08:00 committed by Vinod Kumar Vavilapalli
parent 33537078a8
commit c3928b3068
4 changed files with 14 additions and 1 deletions

View File

@ -169,6 +169,9 @@ Release 2.6.1 - UNRELEASED
HDFS-8846. Add a unit test for INotify functionality across a layout
version upgrade (Zhe Zhang via Colin P. McCabe)
HDFS-7470. SecondaryNameNode need twice memory when calling
reloadFromImageFile. (zhaoyunjiong via cnauroth)
Release 2.6.0 - 2014-11-18
INCOMPATIBLE CHANGES

View File

@ -3811,4 +3811,9 @@ public class BlockManager {
stopReplicationInitializer();
blocksMap.close();
}
public void clear() {
clearQueues();
blocksMap.clear();
}
}

View File

@ -85,9 +85,13 @@ class BlocksMap {
void close() {
clear();
blocks = null;
}
void clear() {
if (blocks != null) {
blocks.clear();
blocks = null;
}
}

View File

@ -651,6 +651,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
snapshotManager.clearSnapshottableDirs();
cacheManager.clear();
setImageLoaded(false);
blockManager.clear();
}
@VisibleForTesting