}
/** Final column schema cannot change. */
@Test
public void testChangeFinalColumnSchema() throws Exception {
final TableLayoutDesc desc1 = TableLayoutDesc.newBuilder()
.setName("table_name")
.setKeysFormat(RowKeyFormat.newBuilder()
.setEncoding(RowKeyEncoding.HASH_PREFIX)
.build())
.setVersion(TABLE_LAYOUT_VERSION)
.setLocalityGroups(Lists.newArrayList(
LocalityGroupDesc.newBuilder()
.setName("locality_group_name")
.setInMemory(false)
.setTtlSeconds(84600)
.setMaxVersions(1)
.setCompressionType(CompressionType.GZ)
.setFamilies(Lists.newArrayList(
FamilyDesc.newBuilder()
.setName("family_name")
.setColumns(Lists.newArrayList(
ColumnDesc.newBuilder()
.setName("column_name")
.setColumnSchema(CellSchema.newBuilder()
.setStorage(SchemaStorage.FINAL)
.setType(SchemaType.COUNTER)
.build())
.build()))
.build()))
.build()))
.build();
final KijiTableLayout refLayout = KijiTableLayout.newLayout(desc1);
final TableLayoutDesc desc2 = TableLayoutDesc.newBuilder()
.setName("table_name")
.setKeysFormat(RowKeyFormat.newBuilder()
.setEncoding(RowKeyEncoding.HASH_PREFIX)
.build())
.setVersion(TABLE_LAYOUT_VERSION)