YARN-4568. Fix message when NodeManager runs into errors initializing the recovery directory. (rchiang)

(cherry picked from commit 0a5def155e)
This commit is contained in:
Ray Chiang 2016-07-01 15:49:30 -07:00
parent 44e6ae8cc5
commit fb9327edae
1 changed files with 8 additions and 1 deletions

View File

@ -287,7 +287,14 @@ public class NodeManager extends CompositeService
.RM_WORK_PRESERVING_RECOVERY_ENABLED,
YarnConfiguration.DEFAULT_RM_WORK_PRESERVING_RECOVERY_ENABLED);
initAndStartRecoveryStore(conf);
try {
initAndStartRecoveryStore(conf);
} catch (IOException e) {
String recoveryDirName = conf.get(YarnConfiguration.NM_RECOVERY_DIR);
throw new
YarnRuntimeException("Unable to initialize recovery directory at "
+ recoveryDirName, e);
}
NMContainerTokenSecretManager containerTokenSecretManager =
new NMContainerTokenSecretManager(conf, nmStore);