// will create the test table, appropriately pre-split
super.setUp();
// Update the test table schema so HFiles from this point will be written with
// encryption features enabled.
final Admin admin = util.getHBaseAdmin();
HTableDescriptor tableDescriptor =
new HTableDescriptor(admin.getTableDescriptor(getTablename()));
for (HColumnDescriptor columnDescriptor: tableDescriptor.getColumnFamilies()) {
columnDescriptor.setEncryptionType("AES");
LOG.info("Updating CF schema for " + getTablename() + "." +
columnDescriptor.getNameAsString());
admin.disableTable(getTablename());
admin.modifyColumn(getTablename(), columnDescriptor);
admin.enableTable(getTablename());
util.waitFor(30000, 1000, true, new Predicate<IOException>() {
@Override
public boolean evaluate() throws IOException {
return admin.isTableAvailable(getTablename());
}
});
}
}