|
@@ -422,16 +422,20 @@ public class TestMRJobs {
|
|
|
@Override
|
|
|
public void setup(Context context) throws IOException {
|
|
|
Configuration conf = context.getConfiguration();
|
|
|
- Path[] files = context.getLocalCacheFiles();
|
|
|
- Path[] archives = context.getLocalCacheArchives();
|
|
|
+ Path[] localFiles = context.getLocalCacheFiles();
|
|
|
+ URI[] files = context.getCacheFiles();
|
|
|
+ Path[] localArchives = context.getLocalCacheArchives();
|
|
|
+ URI[] archives = context.getCacheArchives();
|
|
|
|
|
|
// Check that 4 (2 + appjar + DistrubutedCacheChecker jar) files
|
|
|
// and 2 archives are present
|
|
|
+ Assert.assertEquals(4, localFiles.length);
|
|
|
Assert.assertEquals(4, files.length);
|
|
|
+ Assert.assertEquals(2, localArchives.length);
|
|
|
Assert.assertEquals(2, archives.length);
|
|
|
|
|
|
// Check lengths of the files
|
|
|
- Map<String, Path> filesMap = pathsToMap(files);
|
|
|
+ Map<String, Path> filesMap = pathsToMap(localFiles);
|
|
|
Assert.assertTrue(filesMap.containsKey("distributed.first.symlink"));
|
|
|
Assert.assertEquals(1, localFs.getFileStatus(
|
|
|
filesMap.get("distributed.first.symlink")).getLen());
|
|
@@ -440,7 +444,7 @@ public class TestMRJobs {
|
|
|
filesMap.get("distributed.second.jar")).getLen() > 1);
|
|
|
|
|
|
// Check extraction of the archive
|
|
|
- Map<String, Path> archivesMap = pathsToMap(archives);
|
|
|
+ Map<String, Path> archivesMap = pathsToMap(localArchives);
|
|
|
Assert.assertTrue(archivesMap.containsKey("distributed.third.jar"));
|
|
|
Assert.assertTrue(localFs.exists(new Path(
|
|
|
archivesMap.get("distributed.third.jar"), "distributed.jar.inside3")));
|