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

DFSClient use of non-constant DFSConfigKeys pulls in WebHDFS classes at runtime

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0, 2.7.3, 3.0.0-alpha1
    • hdfs-client
    • None
    • Reviewed

    Description

      Previously, all references to DFSConfigKeys in DFSClient were compile time constants which meant that normal users of DFSClient wouldn't resolve DFSConfigKeys at run time. As of HDFS-7718, DFSClient has a reference to a member of DFSConfigKeys that isn't compile time constant (DFS_CLIENT_KEY_PROVIDER_CACHE_EXPIRY_DEFAULT).

      Since the class must be resolved now, this particular member

      public static final String  DFS_WEBHDFS_AUTHENTICATION_FILTER_DEFAULT = AuthFilter.class.getName();
      

      means that javax.servlet.Filter needs to be on the classpath.

      javax-servlet-api is one of the properly listed dependencies for HDFS, however if we replace AuthFilter.class.getName() with the equivalent String literal then downstream folks can avoid including it while maintaining compatibility.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            busbey Sean Busbey Assign to me
            busbey Sean Busbey
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment