HDFS-17099. Fix Null Pointer Exception when stop namesystem in HDFS.(#6034). Contributed by ConfX.

Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
This commit is contained in:
ConfX 2024-05-14 11:14:55 +08:00 committed by GitHub
parent 4cb4d5dd08
commit 8d9d58dfc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1531,10 +1531,10 @@ void stopActiveServices() {
if (dir != null && getFSImage() != null) {
if (getFSImage().editLog != null) {
getFSImage().editLog.close();
// Update the fsimage with the last txid that we wrote
// so that the tailer starts from the right spot.
getFSImage().updateLastAppliedTxIdFromWritten();
}
// Update the fsimage with the last txid that we wrote
// so that the tailer starts from the right spot.
getFSImage().updateLastAppliedTxIdFromWritten();
}
if (dir != null) {
dir.ezManager.stopReencryptThread();