tablePool, "managed_schemas", managedRecordString, ManagedSchema.class);
managedDao.delete(managedDao.getPartitionStrategy().partitionKey(tableName,
"test"));
SchemaManager manager = new DefaultSchemaManager(tablePool);
try {
manager.getEntityVersion(tableName, "test",
parser.parseEntitySchema(testRecord));
fail();
} catch (SchemaNotFoundException e) {
// This is what we expect
}
manager.createSchema(tableName, "test", testRecord,
"com.cloudera.cdk.data.hbase.avro.AvroKeyEntitySchemaParser",
"com.cloudera.cdk.data.hbase.avro.AvroKeySerDe",
"com.cloudera.cdk.data.hbase.avro.AvroEntitySerDe");
assertEquals(
0,
manager.getEntityVersion(tableName, "test",
parser.parseEntitySchema(testRecord)));
}