LOG.debug("Add Input Path=" + path);
SequenceFileInputFormat.addInputPath(job, path);
}
UserProvider userProvider = UserProvider.instantiate(job.getConfiguration());
FsDelegationToken inputFsToken = new FsDelegationToken(userProvider, "irenewer");
FsDelegationToken outputFsToken = new FsDelegationToken(userProvider, "orenewer");
try {
// Acquire the delegation Tokens
inputFsToken.acquireDelegationToken(inputFs);
outputFsToken.acquireDelegationToken(outputFs);
// Run the MR Job
if (!job.waitForCompletion(true)) {
// TODO: Replace the fixed string with job.getStatus().getFailureInfo()
// when it will be available on all the supported versions.
throw new ExportSnapshotException("Copy Files Map-Reduce Job failed");
}
} finally {
inputFsToken.releaseDelegationToken();
outputFsToken.releaseDelegationToken();
// Remove MR Input
try {
inputFolderPath.getFileSystem(conf).delete(inputFolderPath, true);
} catch (IOException e) {