saintstack commented on a change in pull request #1959:
URL: https://github.com/apache/hbase/pull/1959#discussion_r444538705



##########
File path: hbase-shell/src/main/ruby/hbase/admin.rb
##########
@@ -25,6 +25,8 @@
 java_import org.apache.hadoop.hbase.util.Bytes
 java_import org.apache.hadoop.hbase.ServerName
 java_import org.apache.hadoop.hbase.TableName
+java_import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder

Review comment:
       Are there imports you can drop now after doing this work? e.g. the 
HTableDescriptor import?

##########
File path: hbase-shell/src/main/ruby/hbase/admin.rb
##########
@@ -701,40 +703,40 @@ def alter(table_name_str, wait = true, *args)
           # Delete column family
           if method == 'delete'
             raise(ArgumentError, 'NAME parameter missing for delete method') 
unless name
-            htd.removeFamily(name.to_java_bytes)
+            tdb.removeColumnFamily(name.to_java_bytes)
             hasTableUpdate = true
           # Unset table attributes
           elsif method == 'table_att_unset'
             raise(ArgumentError, 'NAME parameter missing for table_att_unset 
method') unless name
             if name.is_a?(Array)
               name.each do |key|
-                if htd.getValue(key).nil?
+                if tdb.build.getValue(key).nil?
                   raise ArgumentError, "Could not find attribute: #{key}"
                 end
-                htd.remove(key)
+                tdb.setValue(key, nil)

Review comment:
       No 'remove' for CF?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to