Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ public class TableDescriptorBuilder {
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));

/**
* Default durability for HTD is USE_DEFAULT, which defaults to HBase-global
Expand Down
2 changes: 1 addition & 1 deletion hbase-shell/src/main/ruby/hbase/admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ 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)
tdb.setNormalizerTargetRegionSize(JLong.valueOf(arg.delete(TableDescriptorBuilder::NORMALIZER_TARGET_REGION_SIZE))) if arg.include?(TableDescriptorBuilder::NORMALIZER_TARGET_REGION_SIZE)
tdb.setNormalizerTargetRegionSize(JLong.valueOf(arg.delete(TableDescriptorBuilder::NORMALIZER_TARGET_REGION_SIZE_MB))) if arg.include?(TableDescriptorBuilder::NORMALIZER_TARGET_REGION_SIZE_MB)
tdb.setMemStoreFlushSize(arg.delete(TableDescriptorBuilder::MEMSTORE_FLUSHSIZE)) if arg.include?(TableDescriptorBuilder::MEMSTORE_FLUSHSIZE)
tdb.setDurability(org.apache.hadoop.hbase.client.Durability.valueOf(arg.delete(TableDescriptorBuilder::DURABILITY))) if arg.include?(TableDescriptorBuilder::DURABILITY)
tdb.setPriority(JInteger.valueOf(arg.delete(TableDescriptorBuilder::PRIORITY))) if arg.include?(TableDescriptorBuilder::PRIORITY)
Expand Down
2 changes: 1 addition & 1 deletion hbase-shell/src/main/ruby/shell/commands/alter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def help

You can also change table-scope attributes like MAX_FILESIZE, READONLY,
MEMSTORE_FLUSHSIZE, NORMALIZATION_ENABLED, NORMALIZER_TARGET_REGION_COUNT,
NORMALIZER_TARGET_REGION_SIZE(MB), DURABILITY, etc. These can be put at the end;
NORMALIZER_TARGET_REGION_SIZE_MB, DURABILITY, etc. These can be put at the end;
for example, to change the max size of a region to 128MB, do:

hbase> alter 't1', MAX_FILESIZE => '134217728'
Expand Down
2 changes: 1 addition & 1 deletion hbase-shell/src/test/ruby/hbase/admin_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
assert_match(/234/, admin.describe(@test_name))
end

Expand Down