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:
parent
de87d72bb4
commit
ec317a6629
|
@ -1183,6 +1183,8 @@ public class TableDescriptorBuilder {
|
||||||
}
|
}
|
||||||
s.append("}");
|
s.append("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.append("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
s.append("}"); // end METHOD
|
s.append("}"); // end METHOD
|
||||||
|
|
|
@ -310,4 +310,21 @@ public class TestTableDescriptorBuilder {
|
||||||
.build();
|
.build();
|
||||||
assertEquals(42, htd.getPriority());
|
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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue