Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
Operations such as addCacheDirectives() throws SafeModeException when the NN is in safemode:
if (isInSafeMode()) { throw new SafeModeException( "Cannot add cache directive", safeMode); }
While other NN operations throws RetriableException when HA is enabled:
void checkNameNodeSafeMode(String errorMsg) throws RetriableException, SafeModeException { if (isInSafeMode()) { SafeModeException se = new SafeModeException(errorMsg, safeMode); if (haEnabled && haContext != null && haContext.getState().getServiceState() == HAServiceState.ACTIVE && shouldRetrySafeMode(this.safeMode)) { throw new RetriableException(se); } else { throw se; } } }