HBASE-25439 Add BYTE unit in PrettyPrinter.Unit (addendum) (#2841)
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
3cc2468300
commit
3d34623163
|
@ -251,6 +251,7 @@ public class TableDescriptorBuilder {
|
|||
public static PrettyPrinter.Unit getUnit(String key) {
|
||||
switch (key) {
|
||||
case MAX_FILESIZE:
|
||||
case MEMSTORE_FLUSHSIZE:
|
||||
return PrettyPrinter.Unit.BYTE;
|
||||
default:
|
||||
return PrettyPrinter.Unit.NONE;
|
||||
|
|
|
@ -348,11 +348,15 @@ public class TestTableDescriptorBuilder {
|
|||
"{TABLE_ATTRIBUTES => {DURABILITY => 'ASYNC_WAL'}}, {NAME => 'cf', BLOCKSIZE => '1000'}",
|
||||
htd.toStringCustomizedValues());
|
||||
|
||||
htd = TableDescriptorBuilder.newBuilder(htd).setMaxFileSize("10737942528").build();
|
||||
htd = TableDescriptorBuilder.newBuilder(htd)
|
||||
.setMaxFileSize("10737942528")
|
||||
.setMemStoreFlushSize("256MB")
|
||||
.build();
|
||||
assertEquals(
|
||||
"'testStringCustomizedValues', " +
|
||||
"{TABLE_ATTRIBUTES => {DURABILITY => 'ASYNC_WAL', "
|
||||
+ "MAX_FILESIZE => '10737942528 B (10GB 512KB)'}}, {NAME => 'cf', BLOCKSIZE => '1000'}",
|
||||
+ "MAX_FILESIZE => '10737942528 B (10GB 512KB)', "
|
||||
+ "MEMSTORE_FLUSHSIZE => '268435456 B (256MB)'}}, {NAME => 'cf', BLOCKSIZE => '1000'}",
|
||||
htd.toStringCustomizedValues());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue