HDFS-7570. SecondaryNameNode need twice memory when calling reloadFromImageFile. Contributed by zhaoyunjiong.
(cherry picked from commit85aec75ce5
) (cherry picked from commit27eecaef10
)
This commit is contained in:
parent
33537078a8
commit
c3928b3068
|
@ -169,6 +169,9 @@ Release 2.6.1 - UNRELEASED
|
||||||
HDFS-8846. Add a unit test for INotify functionality across a layout
|
HDFS-8846. Add a unit test for INotify functionality across a layout
|
||||||
version upgrade (Zhe Zhang via Colin P. McCabe)
|
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
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -3811,4 +3811,9 @@ public class BlockManager {
|
||||||
stopReplicationInitializer();
|
stopReplicationInitializer();
|
||||||
blocksMap.close();
|
blocksMap.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
clearQueues();
|
||||||
|
blocksMap.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,9 +85,13 @@ class BlocksMap {
|
||||||
|
|
||||||
|
|
||||||
void close() {
|
void close() {
|
||||||
|
clear();
|
||||||
|
blocks = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
void clear() {
|
||||||
if (blocks != null) {
|
if (blocks != null) {
|
||||||
blocks.clear();
|
blocks.clear();
|
||||||
blocks = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -651,6 +651,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
snapshotManager.clearSnapshottableDirs();
|
snapshotManager.clearSnapshottableDirs();
|
||||||
cacheManager.clear();
|
cacheManager.clear();
|
||||||
setImageLoaded(false);
|
setImageLoaded(false);
|
||||||
|
blockManager.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
|
Loading…
Reference in New Issue