[GitHub] [hbase] busbey commented on a change in pull request #1959: HBASE-20819 Use TableDescriptor to replace HTableDescriptor in hbase-shell module

2020-06-26 Thread GitBox


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



##
File path: hbase-shell/src/main/ruby/hbase_constants.rb
##
@@ -109,8 +109,8 @@ def self.promote_constants(constants)
 end
   end
 
-  promote_constants(org.apache.hadoop.hbase.HColumnDescriptor.constants)
-  promote_constants(org.apache.hadoop.hbase.HTableDescriptor.constants)
+  
promote_constants(org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.constants)

Review comment:
   That's great work, thanks! Analysis looks reasonable to me.





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:
us...@infra.apache.org




[GitHub] [hbase] busbey commented on a change in pull request #1959: HBASE-20819 Use TableDescriptor to replace HTableDescriptor in hbase-shell module

2020-06-25 Thread GitBox


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



##
File path: hbase-shell/src/main/ruby/hbase_constants.rb
##
@@ -109,8 +109,8 @@ def self.promote_constants(constants)
 end
   end
 
-  promote_constants(org.apache.hadoop.hbase.HColumnDescriptor.constants)
-  promote_constants(org.apache.hadoop.hbase.HTableDescriptor.constants)
+  
promote_constants(org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.constants)

Review comment:
   Hurm. Some of those still look likely to be useful (e.g. 
MOB_THRESHOLD_BYTES). Can we add them in without bringing back references to 
the classes we're removing?





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:
us...@infra.apache.org




[GitHub] [hbase] busbey commented on a change in pull request #1959: HBASE-20819 Use TableDescriptor to replace HTableDescriptor in hbase-shell module

2020-06-24 Thread GitBox


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



##
File path: hbase-shell/src/main/ruby/hbase_constants.rb
##
@@ -109,8 +109,8 @@ def self.promote_constants(constants)
 end
   end
 
-  promote_constants(org.apache.hadoop.hbase.HColumnDescriptor.constants)
-  promote_constants(org.apache.hadoop.hbase.HTableDescriptor.constants)
+  
promote_constants(org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.constants)

Review comment:
   we'll need to release note the changed set of constants, if any.

##
File path: hbase-shell/src/main/ruby/hbase/admin.rb
##
@@ -971,101 +976,103 @@ def enabled?(table_name)
 end
 
 
#--
-# Return a new HColumnDescriptor made of passed args
-def hcd(arg, htd)
+# Return a new ColumnFamilyDescriptor made of passed args
+def hcd(arg, tdb)
   # String arg, single parameter constructor
-  return org.apache.hadoop.hbase.HColumnDescriptor.new(arg) if 
arg.is_a?(String)
+
+  return ColumnFamilyDescriptorBuilder.of(arg) if arg.is_a?(String)
 
   raise(ArgumentError, "Column family #{arg} must have a name") unless 
name = arg.delete(NAME)
 
-  family = htd.getFamily(name.to_java_bytes)
+  cfd = tdb.build.getColumnFamily(name.to_java_bytes)

Review comment:
   do we need to build the whole table descriptor in order to check for the 
column family? I see we do this several times in the change set.

##
File path: hbase-shell/src/main/ruby/hbase/admin.rb
##
@@ -971,101 +976,103 @@ def enabled?(table_name)
 end
 
 
#--
-# Return a new HColumnDescriptor made of passed args
-def hcd(arg, htd)
+# Return a new ColumnFamilyDescriptor made of passed args
+def hcd(arg, tdb)

Review comment:
   Since this no longer returns `HColumnDescriptor` maybe `cfd` would be a 
better name?

##
File path: hbase-shell/src/main/ruby/hbase/admin.rb
##
@@ -971,101 +976,103 @@ def enabled?(table_name)
 end
 
 
#--
-# Return a new HColumnDescriptor made of passed args
-def hcd(arg, htd)
+# Return a new ColumnFamilyDescriptor made of passed args
+def hcd(arg, tdb)

Review comment:
   even if we do not change this name we will need to release note this 
change because it is visible to shell users but the return type changed.

##
File path: hbase-shell/src/main/ruby/hbase/admin.rb
##
@@ -1359,26 +1366,26 @@ def list_locks
   @admin.getLocks
 end
 
-# Parse arguments and update HTableDescriptor accordingly
-def update_htd_from_arg(htd, arg)

Review comment:
   this method was accessible to shell users, so we will need to release 
note the removal.





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:
us...@infra.apache.org