log.debug("removing the bulk processing flag file in " + bulk);
Path bulkDir = new Path(bulk);
MetadataTable.removeBulkLoadInProgressFlag("/" + bulkDir.getParent().getName() + "/" + bulkDir.getName());
MetadataTable.addDeleteEntry(tableId, "/" + bulkDir.getName());
log.debug("removing the metadata table markers for loaded files");
AuthInfo creds = SecurityConstants.getSystemCredentials();
Connector conn = HdfsZooInstance.getInstance().getConnector(creds.user, creds.password);
MetadataTable.removeBulkLoadEntries(conn, tableId, tid);
log.debug("releasing HDFS reservations for " + source + " and " + error);
Utils.unreserveHdfsDirectory(source, tid);
Utils.unreserveHdfsDirectory(error, tid);