Beispiel #1
0
 public static void Setup()
 {
     try
     {
         dfsCluster = new MiniDFSCluster.Builder(conf).NumDataNodes(2).Format(true).Racks(
             null).Build();
         remoteFs = dfsCluster.GetFileSystem();
     }
     catch (IOException io)
     {
         throw new RuntimeException("problem starting mini dfs cluster", io);
     }
     if (!(new FilePath(MiniMRYarnCluster.Appjar)).Exists())
     {
         Log.Info("MRAppJar " + MiniMRYarnCluster.Appjar + " not found. Not running test."
                  );
         return;
     }
     if (mrCluster == null)
     {
         mrCluster = new MiniMRYarnCluster(typeof(TestMRJobs).FullName, NumNodeMgrs);
         Configuration conf = new Configuration();
         conf.Set("fs.defaultFS", remoteFs.GetUri().ToString());
         // use HDFS
         conf.Set(MRJobConfig.MrAmStagingDir, "/apps_staging_dir");
         mrCluster.Init(conf);
         mrCluster.Start();
     }
     // Copy MRAppJar and make it private. TODO: FIXME. This is a hack to
     // workaround the absent public discache.
     localFs.CopyFromLocalFile(new Path(MiniMRYarnCluster.Appjar), AppJar);
     localFs.SetPermission(AppJar, new FsPermission("700"));
 }
Beispiel #2
0
 public static void Setup()
 {
     if (!(new FilePath(MiniMRYarnCluster.Appjar)).Exists())
     {
         Log.Info("MRAppJar " + MiniMRYarnCluster.Appjar + " not found. Not running test."
                  );
         return;
     }
     if (mrCluster == null)
     {
         mrCluster = new MiniMRYarnCluster(typeof(TestMRJobsWithProfiler).FullName);
         mrCluster.Init(Conf);
         mrCluster.Start();
     }
     // Copy MRAppJar and make it private. TODO: FIXME. This is a hack to
     // workaround the absent public discache.
     localFs.CopyFromLocalFile(new Path(MiniMRYarnCluster.Appjar), AppJar);
     localFs.SetPermission(AppJar, new FsPermission("700"));
 }
 public static void Setup()
 {
     if (!(new FilePath(MiniMRYarnCluster.Appjar)).Exists())
     {
         Log.Info("MRAppJar " + MiniMRYarnCluster.Appjar + " not found. Not running test."
                  );
         return;
     }
     if (mrCluster == null)
     {
         mrCluster = new MiniMRYarnCluster(typeof(TestSpeculativeExecution).FullName, 4);
         Configuration conf = new Configuration();
         mrCluster.Init(conf);
         mrCluster.Start();
     }
     // workaround the absent public distcache.
     localFs.CopyFromLocalFile(new Path(MiniMRYarnCluster.Appjar), AppJar);
     localFs.SetPermission(AppJar, new FsPermission("700"));
 }
Beispiel #4
0
 public static void Setup()
 {
     if (!(new FilePath(MiniMRYarnCluster.Appjar)).Exists())
     {
         Log.Info("MRAppJar " + MiniMRYarnCluster.Appjar + " not found. Not running test."
                  );
         return;
     }
     if (mrCluster == null)
     {
         mrCluster = new MiniMRYarnCluster(typeof(Org.Apache.Hadoop.Mapreduce.V2.TestRMNMInfo
                                                  ).FullName, Numnodemanagers);
         Configuration conf = new Configuration();
         mrCluster.Init(conf);
         mrCluster.Start();
     }
     // workaround the absent public distcache.
     localFs.CopyFromLocalFile(new Path(MiniMRYarnCluster.Appjar), AppJar);
     localFs.SetPermission(AppJar, new FsPermission("700"));
 }
 public static void Setup()
 {
     if (!(new FilePath(MiniMRYarnCluster.Appjar)).Exists())
     {
         Log.Info("MRAppJar " + MiniMRYarnCluster.Appjar + " not found. Not running test."
                  );
         return;
     }
     if (mrCluster == null)
     {
         mrCluster = new MiniMRYarnCluster(typeof(TestMROldApiJobs).FullName);
         mrCluster.Init(new Configuration());
         mrCluster.Start();
     }
     // TestMRJobs is for testing non-uberized operation only; see TestUberAM
     // for corresponding uberized tests.
     mrCluster.GetConfig().SetBoolean(MRJobConfig.JobUbertaskEnable, false);
     // Copy MRAppJar and make it private. TODO: FIXME. This is a hack to
     // workaround the absent public discache.
     localFs.CopyFromLocalFile(new Path(MiniMRYarnCluster.Appjar), TestMRJobs.AppJar);
     localFs.SetPermission(TestMRJobs.AppJar, new FsPermission("700"));
 }