hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-8321) CacheDirectives and CachePool operations should throw RetriableException in safemode
Date Mon, 04 May 2015 22:44:06 GMT
Haohui Mai created HDFS-8321:
--------------------------------

             Summary: CacheDirectives and CachePool operations should throw RetriableException
in safemode
                 Key: HDFS-8321
                 URL: https://issues.apache.org/jira/browse/HDFS-8321
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: Haohui Mai
            Assignee: Haohui Mai


Operations such as {{addCacheDirectives()}} throws {{SafeModeException}} when the NN is in
safemode:

{code}
      if (isInSafeMode()) {
        throw new SafeModeException(
            "Cannot add cache directive", safeMode);
      }
{code}

While other NN operations throws {{RetriableException}} when HA is enabled:

{code}
  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;
      }
    }
  }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message