Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-26977

HMaster's ShutdownHook does not take effect, if tablesOnMaster is false

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
    • 1.7.1, 2.4.9
    • 1.7.2, 2.6.0
    • master
    • None
    • Reviewed

    Description

      Because we are going to upgrade the HBase kernel version, during the test, I found that the HMaster ShutdownHook of version 1.7.1 and 2.4.9 did not take effect if tablesOnMaster is false. After further confirmation, I found that all versions of HBase 1.x and 2.x have this problem.

      I analyzed the cause of the problem:

      Before HBase 3.x, HMaster registered ShutdownHook by calling the run() method of HRegionServer, but the run() method will be blocked on the waitForMasterActive() method of HMaster(before registering the shutdownhook) if tablesOnMaster is false. Eventually, the ShutdownHook of HMaster was not registered successfully.

      1. The code path of  HRegionServer's run() method:

       

      2.  The preRegistrationInitialization() method will be called first:

      3. The HMaster's waitForMasterActive() method will be blocked if tablesOnMaster is false:

      Finally, because the default value of tablesOnMaster is false, the ShutdownHook of HMaster was not registered successfully.

      Attachments

        Activity

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

          People

            heliangjun Liangjun He Assign to me
            heliangjun Liangjun He
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment