deepujain opened a new pull request, #8336:
URL: https://github.com/apache/hadoop/pull/8336

   ## Summary
   
   NameNode.stop() called tracer.close() without a null check. If the NameNode 
is stopped before tracer is initialized (e.g. exception in parent constructor, 
or stopAtException() during failed startup), this caused an NPE at line 1116 
and obscured the original failure.
   
   ## Change
   
   - **NameNode.java**: In stop(), guard tracer.close() with `if (tracer != 
null)` so shutdown completes without NPE when tracer was never set.
   - **TestNameNodeReconfigure.java**: Added 
testStopWithNullTracerDoesNotThrow() which sets tracer to null via reflection 
and calls stop(); verifies no NPE (HDFS-17876).
   
   ## JIRA
   
   Fixes HDFS-17876
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to