thanks Xuan Gong for the review. Normally we won't see this issue, as you said the default value should not be empty string. But there is a usage case at LocalDirsHandlerService, we will change NM_LOCAL_DIRS/NM_LOG_DIRS after disk check.
List<String> localDirs = getLocalDirs();
List<String> logDirs = getLogDirs();
Potentially all disks can be full, although it should very rarely happen. But if it happens, NM_LOCAL_DIRS/NM_LOG_DIRS will be set to empty string and this issue my happen.
By the way, I find this issue when I worked on the patch at
YARN-3925, the test case at YARN-3925 can also reproduce this issue.
Since this issue rarely happens, I will change its priority to minor.