if(!useSecure) {
success = server.bulkLoadHFiles(famPaths, regionName, assignSeqIds);
} else {
HTable table = new HTable(conn.getConfiguration(), tableName);
secureClient = new SecureBulkLoadClient(table, location.getRegionInfo().getStartKey());
success = secureClient.bulkLoadHFiles(famPaths, userToken, bulkToken, assignSeqIds);
}
return success;
} finally {
//Best effort copying of files that might not have been imported
//from the staging directory back to original location