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

HBase shell 'alter' command cannot set table properties to False

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.20.4
    • 0.90.0
    • scripts
    • None
    • CentOS

    • Reviewed
    • hirb shell alter table

    Description

      The alter table command in the HBase shell is broken. Specifically, attempting to set boolean table options like BLOCKCACHE to False does not result in the expected behavior.

      This is due to bugs in the file src/main/ruby/hbase/admin.rb, in the hcd() function. There many statements that look like this:

      arg[IN_MEMORY]? JBoolean.valueOf(arg[IN_MEMORY]): HColumnDescriptor::DEFAULT_IN_MEMORY

      The intent of this code is to 1) determine if a given parameter is present in the associative array, 2) use the supplied value if it exists, or 3) use the default value if it does not exist. However, in the case of boolean parameters that have been set to False this code instead evaluates the variable (to False) and then chooses the default parameter value, which is incorrect.

      The attached patch fixes the issue.

      Attachments

        1. hbase_shell_alter_v1.patch
          2 kB
          Christo Wilson

        Activity

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

          People

            Unassigned Unassigned
            bowlinearl Christo Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment