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

Two Shell 'close_region' Example Syntaxes Don't Work

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
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • shell
    • None
    • Reviewed

    Description

      The close_region shell command's help message lists the following usage syntaxes:

      hbase> close_region 'REGIONNAME'
      hbase> close_region 'REGIONNAME', 'SERVER_NAME'
      hbase> close_region 'ENCODED_REGIONNAME'
      hbase> close_region 'ENCODED_REGIONNAME', 'SERVER_NAME'
      

      admin.rb's current code (with close_region method being the entry point) is:

      def close_region(region_name, server)
        if (server == nil || !closeEncodedRegion?(region_name, server))
          @admin.closeRegion(region_name, server)
        end
      end
      
      def closeEncodedRegion?(region_name, server)
         @admin.closeRegionWithEncodedRegionName(region_name, server)
      end
      

      The close_region 'ENCODED_REGIONNAME' syntax currently will not work because when server = nil the closeEncodedRegion method call is skipped.

      The close_region 'REGIONNAME', 'SERVER_NAME' syntax currently will not work because @admin.closeRegionWithEncodedRegionName throws an NotServingRegionException (for the non-encoded region_name) that is uncaught in and prevents execution from returning to close_region and the correct call of HBaseAdmin.closeRegion.

      Attachments

        Activity

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

          People

            mwarhaftig Matt Warhaftig Assign to me
            mwarhaftig Matt Warhaftig
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment