(cherry picked from commit 85aec75ce53445e1abf840076d2e10f1e3c6d69b)
@@ -427,6 +427,9 @@ Release 2.7.0 - UNRELEASED
HDFS-5445. PacketReceiver populates the packetLen field in PacketHeader
incorrectly (Jonathan Mace via Colin P. McCabe)
+ HDFS-7470. SecondaryNameNode need twice memory when calling
+ reloadFromImageFile. (zhaoyunjiong via cnauroth)
+
Release 2.6.1 - UNRELEASED
INCOMPATIBLE CHANGES
@@ -3743,4 +3743,9 @@ public class BlockManager {
stopReplicationInitializer();
blocksMap.close();
}
+ public void clear() {
+ clearQueues();
+ blocksMap.clear();
+ }
@@ -86,9 +86,13 @@ class BlocksMap {
void close() {
+ clear();
+ blocks = null;
+ void clear() {
if (blocks != null) {
blocks.clear();
- blocks = null;
@@ -585,6 +585,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
snapshotManager.clearSnapshottableDirs();
cacheManager.clear();
setImageLoaded(false);
+ blockManager.clear();
@VisibleForTesting