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

DataNode runs async disk checks maybe throws NullPointerException, and DataNode failed to register to NameSpace.

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.8.0, 3.0.0
    • 3.3.0, 3.2.1, 3.1.3
    • hdfs
    • hadoop-2.7.3, hadoop-2.8.0

    • Reviewed
    • HDFS, DiskChecks
    • Patch

    Description

      In ThrottledAsyncChecker class,it members of the completedChecks is WeakHashMap, its definition is as follows:
           this.completedChecks = new WeakHashMap<>();

      and one of its uses is as follows in schedule method:
          if (completedChecks.containsKey(target)) 

      {         // here may be happen garbage collection,and result may be null.        final LastCheckResult<V> result = completedChecks.get(target);                  final long msSinceLastCheck = timer.monotonicNow() - result.completedAt;            。。。。 }

      after  "completedChecks.containsKey(target)",  may be happen garbage collection,  and result may be null.

      the solution is:

      this.completedChecks = new ReferenceMap(1, 1);
      or
      this.completedChecks = new HashMap<>();

       

      Attachments

        1. HDFS-14074-latest.patch
          1 kB
          guangyi lu
        2. HDFS-14074.patch
          2 kB
          guangyi lu
        3. WechatIMG83.jpeg
          88 kB
          guangyi lu

        Issue Links

        Activity

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

          People

            luguangyi guangyi lu Assign to me
            luguangyi guangyi lu
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 48h
              48h
              Remaining:
              Remaining Estimate - 48h
              48h
              Logged:
              Time Spent - Not Specified
              Not Specified

              Slack

                Issue deployment