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

New exception thrown by DFSClient#isHDFSEncryptionEnabled broke hacky hive code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha4, 2.8.1
    • 2.9.0, 3.0.0-alpha4, 2.8.2
    • None
    • None

    Description

      Though Hive should be fixed not to access DFSClient which is private to HADOOP, removing the throws added by HADOOP-14104 is a quicker solution to unblock hive.

      Hive code

      private boolean isEncryptionEnabled(DFSClient client, Configuration conf) {
        try {
          DFSClient.class.getMethod("isHDFSEncryptionEnabled");
        } catch (NoSuchMethodException e) {
          // the method is available since Hadoop-2.7.1
          // if we run with an older Hadoop, check this ourselves
          return !conf.getTrimmed(DFSConfigKeys.DFS_ENCRYPTION_KEY_PROVIDER_URI, "").isEmpty();
        }
        return client.isHDFSEncryptionEnabled();
      }
      

      Attachments

        1. HADOOP-14333.001.patch
          3 kB
          Yongjun Zhang
        2. HADOOP-14333.002.patch
          3 kB
          Yongjun Zhang
        3. HADOOP-14333.003.patch
          2 kB
          Yongjun Zhang
        4. HDFS-11689.001.patch
          2 kB
          Yongjun Zhang

        Issue Links

          Activity

            People

              yzhangal Yongjun Zhang
              yzhangal Yongjun Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: