Browse Source

finish submission for MAPREDUCE-4396. Include unit test from HADOOP-8734.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.1@1439273 13f79535-47bb-0310-9956-ffa450edef68
Matthew Foley 12 years ago
parent
commit
585c1d625c

+ 5 - 0
src/test/org/apache/hadoop/filecache/TestMRWithDistributedCache.java

@@ -33,6 +33,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.fs.LocalFileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.LongWritable;
@@ -133,6 +134,10 @@ public class TestMRWithDistributedCache extends TestCase {
         makeJar(new Path(TEST_ROOT_DIR, "distributed.third.jar"), 3);
     Path fourth =
         makeJar(new Path(TEST_ROOT_DIR, "distributed.fourth.jar"), 4);
+    // Change permissions on one file to be private (others cannot read
+    // the file) to make sure private distributed cache works fine with
+    // the LocalJobRunner.
+    FileUtil.chmod(fourth.toUri().getPath(), "700");
 
     // Creates the Job Configuration
     DistributedCache.addCacheFile(