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

CacheDirectives and CachePool operations should throw RetriableException in safemode

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      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.002.patch
          4 kB
          Haohui Mai
        2. HDFS-8321.001.patch
          4 kB
          Haohui Mai
        3. HDFS-8321.000.patch
          4 kB
          Haohui Mai

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: