JMX sometimes doesn’t return any value when NN is under heavy load. However, that is when we would like to get metrics to help to diagnosis the issue.
When NN is under heavy load due to bad application or other reasons, it holds FSNamesystem's writer lock for a long period of time. Many of the FSNamesystem metrics require FSNamesystem's reader lock and thus can't be processed.
This is a special case to improve the overall NN concurrency.