public static void Main(string[] argv) { int exitCode = -1; ProgramDriver pgd = new ProgramDriver(); try { pgd.AddClass("wordcount", typeof(WordCount), "A map/reduce program that counts the words in the input files." ); pgd.AddClass("wordmean", typeof(WordMean), "A map/reduce program that counts the average length of the words in the input files." ); pgd.AddClass("wordmedian", typeof(WordMedian), "A map/reduce program that counts the median length of the words in the input files." ); pgd.AddClass("wordstandarddeviation", typeof(WordStandardDeviation), "A map/reduce program that counts the standard deviation of the length of the words in the input files." ); pgd.AddClass("aggregatewordcount", typeof(AggregateWordCount), "An Aggregate based map/reduce program that counts the words in the input files." ); pgd.AddClass("aggregatewordhist", typeof(AggregateWordHistogram), "An Aggregate based map/reduce program that computes the histogram of the words in the input files." ); pgd.AddClass("grep", typeof(Grep), "A map/reduce program that counts the matches of a regex in the input." ); pgd.AddClass("randomwriter", typeof(RandomWriter), "A map/reduce program that writes 10GB of random data per node." ); pgd.AddClass("randomtextwriter", typeof(RandomTextWriter), "A map/reduce program that writes 10GB of random textual data per node." ); pgd.AddClass("sort", typeof(Sort), "A map/reduce program that sorts the data written by the random writer." ); pgd.AddClass("pi", typeof(QuasiMonteCarlo), QuasiMonteCarlo.Description); pgd.AddClass("bbp", typeof(BaileyBorweinPlouffe), BaileyBorweinPlouffe.Description ); pgd.AddClass("distbbp", typeof(DistBbp), DistBbp.Description); pgd.AddClass("pentomino", typeof(DistributedPentomino), "A map/reduce tile laying program to find solutions to pentomino problems." ); pgd.AddClass("secondarysort", typeof(SecondarySort), "An example defining a secondary sort to the reduce." ); pgd.AddClass("sudoku", typeof(Sudoku), "A sudoku solver."); pgd.AddClass("join", typeof(Join), "A job that effects a join over sorted, equally partitioned datasets" ); pgd.AddClass("multifilewc", typeof(MultiFileWordCount), "A job that counts words from several files." ); pgd.AddClass("dbcount", typeof(DBCountPageView), "An example job that count the pageview counts from a database." ); pgd.AddClass("teragen", typeof(TeraGen), "Generate data for the terasort"); pgd.AddClass("terasort", typeof(TeraSort), "Run the terasort"); pgd.AddClass("teravalidate", typeof(TeraValidate), "Checking results of terasort" ); exitCode = pgd.Run(argv); } catch (Exception e) { Sharpen.Runtime.PrintStackTrace(e); } System.Environment.Exit(exitCode); }
public void Option_b_shuffles() { var myDeck = new Deck(); myDeck.Shuffle(); List <Card> shuffled = myDeck.GetCards(); ProgramDriver.ExecuteOption("b", myDeck); List <Card> shuffled2 = myDeck.GetCards(); Assert.False(shuffled.SequenceEqual(shuffled2)); }
public YarnTestDriver(ProgramDriver pgd) { this.pgd = pgd; try { pgd.AddClass(typeof(TestZKRMStateStorePerf).Name, typeof(TestZKRMStateStorePerf), "ZKRMStateStore i/o benchmark."); } catch (Exception e) { Sharpen.Runtime.PrintStackTrace(e); } }
public HdfsTestDriver(ProgramDriver pgd) { this.pgd = pgd; try { pgd.AddClass("dfsthroughput", typeof(BenchmarkThroughput), "measure hdfs throughput" ); pgd.AddClass("minidfscluster", typeof(MiniDFSClusterManager), "Run a single-process mini DFS cluster" ); } catch (Exception e) { Sharpen.Runtime.PrintStackTrace(e); } }
public void Option_a_sorts_by_ascending() { var myDeck = new Deck(); myDeck.Shuffle(); List <Card> shuffled = myDeck.GetCards(); ProgramDriver.ExecuteOption("a", myDeck); List <Card> sorted = myDeck.GetCards(); Assert.False(shuffled.SequenceEqual(sorted)); var values = sorted.Select(x => x.GetValue()).ToList(); Assert.That(values, Is.Ordered); }
public CoreTestDriver(ProgramDriver pgd) { this.pgd = pgd; try { pgd.AddClass("testsetfile", typeof(TestSetFile), "A test for flat files of binary key/value pairs." ); pgd.AddClass("testarrayfile", typeof(TestArrayFile), "A test for flat files of binary key/value pairs." ); pgd.AddClass("testrpc", typeof(TestRPC), "A test for rpc."); pgd.AddClass("testipc", typeof(TestIPC), "A test for ipc."); } catch (Exception e) { Runtime.PrintStackTrace(e); } }
public MapredTestDriver(ProgramDriver pgd) { this.pgd = pgd; try { pgd.AddClass("testsequencefile", typeof(TestSequenceFile), "A test for flat files of binary key value pairs." ); pgd.AddClass("threadedmapbench", typeof(ThreadedMapBenchmark), "A map/reduce benchmark that compares the performance " + "of maps with multiple spills over maps with 1 spill"); pgd.AddClass("mrbench", typeof(MRBench), "A map/reduce benchmark that can create many small jobs" ); pgd.AddClass("mapredtest", typeof(TestMapRed), "A map/reduce test check."); pgd.AddClass("testsequencefileinputformat", typeof(TestSequenceFileInputFormat), "A test for sequence file input format."); pgd.AddClass("testtextinputformat", typeof(TestTextInputFormat), "A test for text input format." ); pgd.AddClass("testmapredsort", typeof(SortValidator), "A map/reduce program that validates the " + "map-reduce framework's sort."); pgd.AddClass("testbigmapoutput", typeof(BigMapOutput), "A map/reduce program that works on a very big " + "non-splittable file and does identity map/reduce"); pgd.AddClass("loadgen", typeof(GenericMRLoadGenerator), "Generic map/reduce load generator" ); pgd.AddClass("MRReliabilityTest", typeof(ReliabilityTest), "A program that tests the reliability of the MR framework by " + "injecting faults/failures"); pgd.AddClass("fail", typeof(FailJob), "a job that always fails"); pgd.AddClass("sleep", typeof(SleepJob), "A job that sleeps at each map and reduce task." ); pgd.AddClass("nnbench", typeof(NNBench), "A benchmark that stresses the namenode." ); pgd.AddClass("testfilesystem", typeof(TestFileSystem), "A test for FileSystem read/write." ); pgd.AddClass(typeof(TestDFSIO).Name, typeof(TestDFSIO), "Distributed i/o benchmark." ); pgd.AddClass("DFSCIOTest", typeof(DFSCIOTest), string.Empty + "Distributed i/o benchmark of libhdfs." ); pgd.AddClass("DistributedFSCheck", typeof(DistributedFSCheck), "Distributed checkup of the file system consistency." ); pgd.AddClass("filebench", typeof(FileBench), "Benchmark SequenceFile(Input|Output)Format " + "(block,record compressed and uncompressed), " + "Text(Input|Output)Format (compressed and uncompressed)" ); pgd.AddClass(typeof(JHLogAnalyzer).Name, typeof(JHLogAnalyzer), "Job History Log analyzer." ); pgd.AddClass(typeof(SliveTest).Name, typeof(SliveTest), "HDFS Stress Test and Live Data Verification." ); pgd.AddClass("minicluster", typeof(MiniHadoopClusterManager), "Single process HDFS and MR cluster." ); pgd.AddClass("largesorter", typeof(LargeSorter), "Large-Sort tester"); pgd.AddClass("NNloadGenerator", typeof(Org.Apache.Hadoop.FS.LoadGenerator.LoadGenerator ), "Generate load on Namenode using NN loadgenerator run WITHOUT MR"); pgd.AddClass("NNloadGeneratorMR", typeof(LoadGeneratorMR), "Generate load on Namenode using NN loadgenerator run as MR job" ); pgd.AddClass("NNstructureGenerator", typeof(StructureGenerator), "Generate the structure to be used by NNdataGenerator" ); pgd.AddClass("NNdataGenerator", typeof(DataGenerator), "Generate the data to be used by NNloadGenerator" ); } catch (Exception e) { Sharpen.Runtime.PrintStackTrace(e); } }
public void Option_f_valid_is_false() { bool valid = ProgramDriver.ValidateOption("f"); Assert.False(valid); }
public void Option_q_valid_is_true() { bool valid = ProgramDriver.ValidateOption("q"); Assert.True(valid); }