HDFS-7570. SecondaryNameNode need twice memory when calling reloadFromImageFile. Contributed by zhaoyunjiong.
This commit is contained in:
parent
10ac5abb86
commit
85aec75ce5
@ -688,6 +688,9 @@ Release 2.7.0 - UNRELEASED
|
|||||||
HDFS-5445. PacketReceiver populates the packetLen field in PacketHeader
|
HDFS-5445. PacketReceiver populates the packetLen field in PacketHeader
|
||||||
incorrectly (Jonathan Mace via Colin P. McCabe)
|
incorrectly (Jonathan Mace via Colin P. McCabe)
|
||||||
|
|
||||||
|
HDFS-7470. SecondaryNameNode need twice memory when calling
|
||||||
|
reloadFromImageFile. (zhaoyunjiong via cnauroth)
|
||||||
|
|
||||||
Release 2.6.1 - UNRELEASED
|
Release 2.6.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -3741,4 +3741,9 @@ public void shutdown() {
|
|||||||
stopReplicationInitializer();
|
stopReplicationInitializer();
|
||||||
blocksMap.close();
|
blocksMap.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
clearQueues();
|
||||||
|
blocksMap.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,9 +86,13 @@ public Iterator<BlockInfo> iterator() {
|
|||||||
|
|
||||||
|
|
||||||
void close() {
|
void close() {
|
||||||
|
clear();
|
||||||
|
blocks = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
void clear() {
|
||||||
if (blocks != null) {
|
if (blocks != null) {
|
||||||
blocks.clear();
|
blocks.clear();
|
||||||
blocks = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -596,6 +596,7 @@ void clear() {
|
|||||||
snapshotManager.clearSnapshottableDirs();
|
snapshotManager.clearSnapshottableDirs();
|
||||||
cacheManager.clear();
|
cacheManager.clear();
|
||||||
setImageLoaded(false);
|
setImageLoaded(false);
|
||||||
|
blockManager.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
Loading…
Reference in New Issue
Block a user