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

RBF: NullPointerException when setQuota through routers with quota disabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.1
    • 3.4.0, 3.3.2
    • rbf
    • None
    • Reviewed
    • RBF

    Description

      When we started routers with dfs.federation.router.quota.enable=false, and try to setQuota through them, NullPointerException caught.

      The cuase of NPE is that the Router#quotaManager not initialized when dfs.federation.router.quota.enable=false,
      but when executing setQuota rpc request inside router, we wolud use it in method Quota#isMountEntry without null check .

      I think it's better to check whether Router#isQuotaEnabled is true before use Router#quotaManager, and throw an IOException with readable message if need.

      Attachments

        1. HDFS-16271.001.patch
          3 kB
          Chengwei Wang
        2. HDFS-16271.002.patch
          3 kB
          Chengwei Wang

        Activity

          People

            smarthan Chengwei Wang
            smarthan Chengwei Wang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: