HBASE-23582 Unbalanced braces in string representation of table descriptor

Signed-off-by: Lijin Bin <binlijin@apache.org>
Signed-off-by: Jan Hentschel <janh@apache.org>
This commit is contained in:
Junegunn Choi 2019-12-16 18:35:15 +09:00 committed by Jan Hentschel
parent de87d72bb4
commit ec317a6629
2 changed files with 19 additions and 0 deletions

View File

@ -1183,6 +1183,8 @@ public class TableDescriptorBuilder {
}
s.append("}");
}
s.append("}");
}
s.append("}"); // end METHOD

View File

@ -310,4 +310,21 @@ public class TestTableDescriptorBuilder {
.build();
assertEquals(42, htd.getPriority());
}
@Test
public void testStringCustomizedValues() {
byte[] familyName = Bytes.toBytes("cf");
ColumnFamilyDescriptor hcd = ColumnFamilyDescriptorBuilder.newBuilder(familyName)
.setBlocksize(1000)
.build();
TableDescriptor htd = TableDescriptorBuilder.newBuilder(TableName.valueOf(name.getMethodName()))
.setColumnFamily(hcd)
.setDurability(Durability.ASYNC_WAL)
.build();
assertEquals(
"'testStringCustomizedValues', " +
"{TABLE_ATTRIBUTES => {DURABILITY => 'ASYNC_WAL'}}, {NAME => 'cf', BLOCKSIZE => '1000'}",
htd.toStringCustomizedValues());
}
}