예제 #1
0
        public virtual void TestMultipleSpills()
        {
            JobConf job1 = mr.CreateJobConf();

            // Make sure it spills twice
            job1.SetFloat(MRJobConfig.MapSortSpillPercent, 0.0001f);
            job1.SetInt(MRJobConfig.IoSortMb, 1);
            // Make sure the spill records don't fit in index cache
            job1.SetInt(MRJobConfig.IndexCacheMemoryLimit, 0);
            string input  = "The quick brown fox\nhas many silly\n" + "red fox sox\n";
            Path   inDir  = new Path("/testing/distinct/input");
            Path   outDir = new Path("/user/alice/output");

            TestMiniMRClasspath.ConfigureWordCount(fs, job1, input, 2, 1, inDir, outDir);
            RunJobAsUser(job1, AliceUgi);
        }
예제 #2
0
        public virtual void TestDistinctUsers()
        {
            JobConf job1   = mr.CreateJobConf();
            string  input  = "The quick brown fox\nhas many silly\n" + "red fox sox\n";
            Path    inDir  = new Path("/testing/distinct/input");
            Path    outDir = new Path("/user/alice/output");

            TestMiniMRClasspath.ConfigureWordCount(fs, job1, input, 2, 1, inDir, outDir);
            RunJobAsUser(job1, AliceUgi);
            JobConf job2    = mr.CreateJobConf();
            Path    inDir2  = new Path("/testing/distinct/input2");
            Path    outDir2 = new Path("/user/bob/output2");

            TestMiniMRClasspath.ConfigureWordCount(fs, job2, input, 2, 1, inDir2, outDir2);
            RunJobAsUser(job2, BobUgi);
        }