final String dir = args[3];
final String failureDir = args[4];
final Path failureDirPath = new Path(failureDir);
fs.delete(failureDirPath, true);
fs.mkdirs(failureDirPath);
HdfsZooInstance.getInstance().getConnector(user, new PasswordToken(pass)).tableOperations().importDirectory(tableName, dir, failureDir, false);
} else {
opts.parseArgs(BulkImportDirectory.class.getName(), args);
fs.delete(new Path(opts.failures), true);
fs.mkdirs(new Path(opts.failures));
opts.getConnector().tableOperations().importDirectory(opts.tableName, opts.source, opts.failures, false);