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

   ### Description of PR
   Refer to HDFS-17368. 
   
   The NameNodeResourceMonitor automatically enters safemode when it detects 
that the resources are not suffcient. NNRM is only in ANN. If both ANN and SNN 
enter SM due to low resources, and later SNN's disk space is restored, SNN 
willl become ANN and ANN will become SNN. However, at this point, SNN will not 
exit the SM, even if the disk is recovered.
   
   Consider the following scenario:
   
   - Initially, nn-1 is active and nn-2 is standby. The insufficient resources 
of both nn-1 and nn-2 in dfs.namenode.name.dir, the NameNodeResourceMonitor 
detects the resource issue and puts nn01 into safemode.
   - At this point, nn-1 is in safemode (ON) and active, while nn-2 is in 
safemode (OFF) and standby.
   - After a period of time, the resources in nn-2's dfs.namenode.name.dir 
recover, triggering failover.
   - Now, nn-1 is in safe mode (ON) and standby, while nn-2 is in safe mode 
(OFF) and active.
   - Afterward, the resources in nn-1's dfs.namenode.name.dir recover.
   - However, since nn-1 is standby but in safemode (ON), it unable to exit 
safe mode automatically.
   
   If SNN is detected to be in SM(because low resource), it will exit. 
   
   ### How was this patch tested?
   Test in a production environment
   
   ### For code changes:
   
   - [ ] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   


-- 
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