Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8321

CacheDirectives and CachePool operations should throw RetriableException in safemode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • 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;
            }
          }
        }
      

      Attachments

        1. HDFS-8321.000.patch
          4 kB
          Haohui Mai
        2. HDFS-8321.001.patch
          4 kB
          Haohui Mai
        3. HDFS-8321.002.patch
          4 kB
          Haohui Mai

        Activity

          People

            wheat9 Haohui Mai
            wheat9 Haohui Mai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: