+/EE360P
distributed systems
git clone https://git.julia.blue/+/EE360P
07ca65d
master
1/** 2* Licensed to the Apache Software Foundation (ASF) under one 3* or more contributor license agreements. See the NOTICE file 4* distributed with this work for additional information 5* regarding copyright ownership. The ASF licenses this file 6* to you under the Apache License, Version 2.0 (the 7* "License"); you may not use this file except in compliance 8* with the License. You may obtain a copy of the License at 9* 10* http://www.apache.org/licenses/LICENSE-2.0 11* 12* Unless required by applicable law or agreed to in writing, software 13* distributed under the License is distributed on an "AS IS" BASIS, 14* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15* See the License for the specific language governing permissions and 16* limitations under the License. 17*/ 18 19package org .apache .hadoop .examples ; 20 21import org .apache .hadoop .examples .dancing .DistributedPentomino ; 22import org .apache .hadoop .examples .dancing .Sudoku ; 23import org .apache .hadoop .examples .pi .DistBbp ; 24import org .apache .hadoop .examples .terasort .TeraGen ; 25import org .apache .hadoop .examples .terasort .TeraSort ; 26import org .apache .hadoop .examples .terasort .TeraValidate ; 27import org .apache .hadoop .util .ProgramDriver ; 28 29/** 30* A description of an example program based on its class and a 31* human-readable description. 32*/ 33public class ExampleDriver { 34 35public static void main (String argv []){ 36int exitCode = -1 ; 37ProgramDriver pgd =new ProgramDriver (); 38try { 39pgd .addClass ("wordcount" ,WordCount .class , 40"A map/reduce program that counts the words in the input files." ); 41pgd .addClass ("wordmean" ,WordMean .class , 42"A map/reduce program that counts the average length of the words in the input files." ); 43pgd .addClass ("wordmedian" ,WordMedian .class , 44"A map/reduce program that counts the median length of the words in the input files." ); 45pgd .addClass ("wordstandarddeviation" ,WordStandardDeviation .class , 46"A map/reduce program that counts the standard deviation of the length of the words in the input files." ); 47pgd .addClass ("aggregatewordcount" ,AggregateWordCount .class , 48"An Aggregate based map/reduce program that counts the words in the input files." ); 49pgd .addClass ("aggregatewordhist" ,AggregateWordHistogram .class , 50"An Aggregate based map/reduce program that computes the histogram of the words in the input files." ); 51pgd .addClass ("grep" ,Grep .class , 52"A map/reduce program that counts the matches of a regex in the input." ); 53pgd .addClass ("randomwriter" ,RandomWriter .class , 54"A map/reduce program that writes 10GB of random data per node." ); 55pgd .addClass ("randomtextwriter" ,RandomTextWriter .class , 56"A map/reduce program that writes 10GB of random textual data per node." ); 57pgd .addClass ("sort" ,Sort .class ,"A map/reduce program that sorts the data written by the random writer." ); 58 59pgd .addClass ("pi" ,QuasiMonteCarlo .class ,QuasiMonteCarlo .DESCRIPTION ); 60pgd .addClass ("bbp" ,BaileyBorweinPlouffe .class ,BaileyBorweinPlouffe .DESCRIPTION ); 61pgd .addClass ("distbbp" ,DistBbp .class ,DistBbp .DESCRIPTION ); 62 63pgd .addClass ("pentomino" ,DistributedPentomino .class , 64"A map/reduce tile laying program to find solutions to pentomino problems." ); 65pgd .addClass ("secondarysort" ,SecondarySort .class , 66"An example defining a secondary sort to the reduce." ); 67pgd .addClass ("sudoku" ,Sudoku .class ,"A sudoku solver." ); 68pgd .addClass ("join" ,Join .class ,"A job that effects a join over sorted, equally partitioned datasets" ); 69pgd .addClass ("multifilewc" ,MultiFileWordCount .class ,"A job that counts words from several files." ); 70pgd .addClass ("dbcount" ,DBCountPageView .class ,"An example job that count the pageview counts from a database." ); 71pgd .addClass ("teragen" ,TeraGen .class ,"Generate data for the terasort" ); 72pgd .addClass ("terasort" ,TeraSort .class ,"Run the terasort" ); 73pgd .addClass ("teravalidate" ,TeraValidate .class ,"Checking results of terasort" ); 74exitCode =pgd .run (argv ); 75 } 76catch (Throwable e ){ 77e .printStackTrace (); 78 } 79 80System .exit (exitCode ); 81 } 82} 83