String[] archivesArr = archives.split(",");
for (String tmpArchives: archivesArr) {
Path tmp = new Path(tmpArchives);
Path newPath = copyRemoteFiles(fs, archivesDir, tmp, job, replication);
try {
URI pathURI = new URI(newPath.toUri().toString() + "#" + newPath.getName());
DistributedCache.addCacheArchive(pathURI, job);
} catch(URISyntaxException ue) {
//should not throw an uri excpetion
throw new IOException("Failed to create uri for " + tmpArchives);
}