Details
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.