final Kiji kiji = new HBaseKijiFactory().open(uri, conf);
try {
// If security is enabled, make sure the user has GRANT access on the instance
// before uninstalling.
if (kiji.isSecurityEnabled()) {
KijiSecurityManager securityManager = kiji.getSecurityManager();
try {
securityManager.checkCurrentGrantAccess();
} finally {
securityManager.close();
}
}
for (String tableName : kiji.getTableNames()) {
LOG.debug("Deleting kiji table " + tableName + "...");