ndimiduk commented on a change in pull request #3063:
URL: https://github.com/apache/hbase/pull/3063#discussion_r612594023



##########
File path: hbase-shell/src/test/ruby/hbase/admin_test.rb
##########
@@ -920,7 +920,7 @@ def teardown
     define_test 'alter should be able to set the TargetRegionSize and 
TargetRegionCount' do
       command(:alter, @test_name, 'NORMALIZER_TARGET_REGION_COUNT' => 156)
       assert_match(/156/, admin.describe(@test_name))
-      command(:alter, @test_name, 'NORMALIZER_TARGET_REGION_SIZE' => 234)
+      command(:alter, @test_name, 'NORMALIZER_TARGET_REGION_SIZE_MB' => 234)

Review comment:
       can you add a test that covers use of the old key?

##########
File path: hbase-shell/src/main/ruby/hbase/admin.rb
##########
@@ -1492,7 +1492,9 @@ def update_tdb_from_arg(tdb, arg)
       
tdb.setMergeEnabled(JBoolean.valueOf(arg.delete(TableDescriptorBuilder::MERGE_ENABLED)))
 if arg.include?(TableDescriptorBuilder::MERGE_ENABLED)
       
tdb.setNormalizationEnabled(JBoolean.valueOf(arg.delete(TableDescriptorBuilder::NORMALIZATION_ENABLED)))
 if arg.include?(TableDescriptorBuilder::NORMALIZATION_ENABLED)
       
tdb.setNormalizerTargetRegionCount(JInteger.valueOf(arg.delete(TableDescriptorBuilder::NORMALIZER_TARGET_REGION_COUNT)))
 if arg.include?(TableDescriptorBuilder::NORMALIZER_TARGET_REGION_COUNT)
+      # TODO: Keeping backward compatability for NORMALIZER_TARGET_REGION_SIZE 
with HBASE-25651 change. Can be removed in later version
       
tdb.setNormalizerTargetRegionSize(JLong.valueOf(arg.delete(TableDescriptorBuilder::NORMALIZER_TARGET_REGION_SIZE)))
 if arg.include?(TableDescriptorBuilder::NORMALIZER_TARGET_REGION_SIZE)

Review comment:
       Can we have the shell print a depreciation warning when the old key is 
used?

##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java
##########
@@ -172,9 +172,12 @@
       new Bytes(Bytes.toBytes(NORMALIZER_TARGET_REGION_COUNT));
 
   @InterfaceAudience.Private
-  public static final String NORMALIZER_TARGET_REGION_SIZE = 
"NORMALIZER_TARGET_REGION_SIZE";
+  public static final String NORMALIZER_TARGET_REGION_SIZE_MB = 
"NORMALIZER_TARGET_REGION_SIZE_MB";
   private static final Bytes NORMALIZER_TARGET_REGION_SIZE_KEY =
-      new Bytes(Bytes.toBytes(NORMALIZER_TARGET_REGION_SIZE));
+      new Bytes(Bytes.toBytes(NORMALIZER_TARGET_REGION_SIZE_MB));
+  // TODO: Keeping backward compatability with HBASE-25651 change. Can be 
removed in later version
+  @InterfaceAudience.Private
+  public static final String NORMALIZER_TARGET_REGION_SIZE = 
"NORMALIZER_TARGET_REGION_SIZE";

Review comment:
       Please mark this constant as `@Deprecated` as well.




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