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

WebHDFS getTrashRoot leads to OOM due to FileSystem object creation

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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9.0, 3.0.0-alpha2
    • 3.3.0, 3.1.4, 3.2.2, 2.10.1
    • webhdfs
    • None
    • Reviewed

    Description

      Quoting Daryn Sharp inĀ HDFS-10756 :

      Surprised nobody has discovered this will lead to an inevitable OOM in the NN. The NN should not be creating filesystems to itself, and must never create filesystems in a remote user's context or the cache will explode.

      I guess the problem lies in side NamenodeWebHdfsMethods#getTrashRoot

      	  private static String getTrashRoot(String fullPath,
      	      Configuration conf) throws IOException {
      	    FileSystem fs = FileSystem.get(conf != null ? conf : new Configuration());
      	    return fs.getTrashRoot(
      	        new org.apache.hadoop.fs.Path(fullPath)).toUri().getPath();
      	  }
      

      Attachments

        Issue Links

        Activity

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

          People

            iwasakims Masatake Iwasaki Assign to me
            weichiu Wei-Chiu Chuang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment