本文整理匯總了Java中org.apache.hadoop.util.ProgramDriver.addClass方法的典型用法代碼示例。如果您正苦於以下問題:Java ProgramDriver.addClass方法的具體用法?Java ProgramDriver.addClass怎麽用?Java ProgramDriver.addClass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.hadoop.util.ProgramDriver
的用法示例。
在下文中一共展示了ProgramDriver.addClass方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
/**
* @param args
* @throws Throwable
*/
public static void main(String[] args) throws Throwable {
ProgramDriver pgd = new ProgramDriver();
pgd.addClass(RowCounter.NAME, RowCounter.class,
"Count rows in HBase table.");
pgd.addClass(CellCounter.NAME, CellCounter.class,
"Count cells in HBase table.");
pgd.addClass(Export.NAME, Export.class, "Write table data to HDFS.");
pgd.addClass(Import.NAME, Import.class, "Import data written by Export.");
pgd.addClass(ImportTsv.NAME, ImportTsv.class, "Import data in TSV format.");
pgd.addClass(LoadIncrementalHFiles.NAME, LoadIncrementalHFiles.class,
"Complete a bulk data load.");
pgd.addClass(CopyTable.NAME, CopyTable.class,
"Export a table from local cluster to peer cluster.");
pgd.addClass(VerifyReplication.NAME, VerifyReplication.class, "Compare" +
" the data from tables in two different clusters. WARNING: It" +
" doesn't work for incrementColumnValues'd cells since the" +
" timestamp is changed after being appended to the log.");
pgd.addClass(WALPlayer.NAME, WALPlayer.class, "Replay WAL files.");
pgd.addClass(ExportSnapshot.NAME, ExportSnapshot.class, "Export" +
" the specific snapshot to a given FileSystem.");
ProgramDriver.class.getMethod("driver", new Class [] {String[].class}).
invoke(pgd, new Object[]{args});
}
示例2: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
/**
* @param args
* @throws Throwable
*/
public static void main(String[] args) throws Throwable {
ProgramDriver pgd = new ProgramDriver();
pgd.addClass(RowCounter.NAME, RowCounter.class,
"Count rows in HBase table");
pgd.addClass(CellCounter.NAME, CellCounter.class,
"Count cells in HBase table");
pgd.addClass(Export.NAME, Export.class, "Write table data to HDFS.");
pgd.addClass(Import.NAME, Import.class, "Import data written by Export.");
pgd.addClass(ImportTsv.NAME, ImportTsv.class, "Import data in TSV format.");
pgd.addClass(LoadIncrementalHFiles.NAME, LoadIncrementalHFiles.class,
"Complete a bulk data load.");
pgd.addClass(CopyTable.NAME, CopyTable.class,
"Export a table from local cluster to peer cluster");
pgd.addClass(VerifyReplication.NAME, VerifyReplication.class, "Compare" +
" the data from tables in two different clusters. WARNING: It" +
" doesn't work for incrementColumnValues'd cells since the" +
" timestamp is changed after being appended to the log.");
ProgramDriver.class.getMethod("driver", new Class [] {String[].class}).
invoke(pgd, new Object[]{args});
}
示例3: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
/**
* Input are files of documents per line. The files are text and can either be compressed via .wrac.gz or not compressed.
* MARCH NOT FINISHED
* Prints these options to chose from:<br>
* - [html] for html pages to be cleaned. <br>
* - [wrac] for .wrac.gz files to be cleaned.<br>
* @param argv : command line inputs
*/
public static void main(String argv[]) {
int exitCode = -1;
ProgramDriver pgd = new ProgramDriver();
try {
pgd.addClass("warc", WarcFileCleaner.class,
"A MapReduce job to clean .warc.gz webpages from html and weird characters into set of features.");
pgd.addClass(
"html",
PageCleaner.class,
"A MapReduce job to clean html pages from stopwords, weird characters even alphanumerics. It further convert letters into lowercase. ");
pgd.driver(argv);
} catch (Throwable e) {
e.printStackTrace();
}
System.exit(exitCode);
}
示例4: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
public static void main(String argv[]) {
int exitCode = -1;
ProgramDriver pgd = new ProgramDriver();
try {
pgd.addClass("randomlsh", ProjectionLshDriver.class,
"Partition input vectors according to random projections.");
pgd.addClass("minhashlsh", MinHashLshDriver.class,
"Partition input vectors according to minhash values.");
pgd.addClass("lshstat", LshStat.class, "Collect statistics from binray lshpartitions/");
pgd.driver(argv);
} catch (Throwable e) {
e.printStackTrace();
}
System.exit(exitCode);
}
示例5: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
/**
* A description of the test program for running all the tests using jar file
*/
public static void main(String argv[]){
ProgramDriver pgd = new ProgramDriver();
try {
pgd.addClass("gentest", DFSGeneralTest.class, "A map/reduce benchmark that supports running multi-thread operations in multiple machines");
pgd.addClass("locktest", DFSLockTest.class, "A benchmark that spawns many threads and each thread run many configurable read/write FileSystem operations to test FSNamesystem lock's concurrency.");
pgd.addClass("dirtest", DFSDirTest.class, "A map/reduce benchmark that creates many jobs and each job spawns many threads and each thread create/delete many dirs.");
pgd.addClass("dfstest", DFSIOTest.class, "A map/reduce benchmark that creates many jobs and each jobs can create many files to test i/o rate per task of hadoop cluster.");
pgd.addClass("structure-gen", StructureGenerator.class, "Create a structure of files and directories as an input for data-gen");
pgd.addClass("data-gen", DataGenerator.class, "Create files and directories on cluster as inputs for load-gen");
pgd.addClass("load-gen", LoadGenerator.class, "A tool to test the behavior of NameNode with different client loads.");
pgd.addClass("testnn", TestNNThroughputBenchmark.class, "Test the behavior of the namenode on localhost." +
" Here namenode is real and others are simulated");
pgd.driver(argv);
} catch(Throwable e) {
e.printStackTrace();
}
}
示例6: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
public static void main(String[] args) {
ProgramDriver programDriver = new ProgramDriver();
int exitCode = -1;
try {
programDriver.addClass("wordcount-hbase", WordCountHBase.class,
"A map/reduce program that counts the words in the input files.");
programDriver.addClass("export-table", Export.class,
"A map/reduce program that exports a table to a file.");
//programDriver.addClass("cellcounter", CellCounter.class, "Count them cells!");
programDriver.driver(args);
exitCode = programDriver.run(args);
} catch (Throwable e) {
e.printStackTrace();
}
System.exit(exitCode);
}
示例7: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
public static void main(String[] args) throws Exception {
ProgramDriver programDriver = new ProgramDriver();
int exitCode = -1;
try {
programDriver.addClass("readdepth-intervals", ComputeReadDepthInInterval.class, "Computes read depth over a given size interval");
programDriver.addClass("readdepth-hist", DepthHistogram.class, "Computes distribution of read depths");
programDriver.addClass("germline", GermlinePipeline.class, "Standard germline variant caller");
programDriver.addClass("somatic", SomaticPipeline.class, "Standard somatic variant caller, takes tumor/normal input");
programDriver.driver(args);
exitCode = 0;
} catch (Throwable e) {
e.printStackTrace();
}
System.exit(exitCode);
}
示例8: CoreTestDriver
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
public CoreTestDriver(ProgramDriver pgd) {
this.pgd = pgd;
try {
pgd.addClass("testsetfile", TestSetFile.class,
"A test for flat files of binary key/value pairs.");
pgd.addClass("testarrayfile", TestArrayFile.class,
"A test for flat files of binary key/value pairs.");
pgd.addClass("testrpc", TestRPC.class, "A test for rpc.");
pgd.addClass("testipc", TestIPC.class, "A test for ipc.");
} catch(Throwable e) {
e.printStackTrace();
}
}
示例9: YarnTestDriver
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
public YarnTestDriver(ProgramDriver pgd) {
this.pgd = pgd;
try {
pgd.addClass(TestZKRMStateStorePerf.class.getSimpleName(),
TestZKRMStateStorePerf.class,
"ZKRMStateStore i/o benchmark.");
} catch(Throwable e) {
e.printStackTrace();
}
}
示例10: HdfsTestDriver
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
public HdfsTestDriver(ProgramDriver pgd) {
this.pgd = pgd;
try {
pgd.addClass("dfsthroughput", BenchmarkThroughput.class,
"measure hdfs throughput");
pgd.addClass("minidfscluster", MiniDFSClusterManager.class,
"Run a single-process mini DFS cluster");
} catch(Throwable e) {
e.printStackTrace();
}
}
示例11: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
public static void main(String argv[]){
int exitCode = -1;
ProgramDriver pgd = new ProgramDriver();
try {
pgd.addClass("WikiTitleExtract", WikiTitleExtract.class,
"A map/reduce program that extract the contents between <title></title> in xml files");
pgd.addClass("WikiWordCount", WikiWordCount.class,
"A map/reduce program that count the word frequency in the files");
pgd.addClass("BadDocCount", BadDocCount.class,
"A map/reduce program that count the document which do not contains <title></title>");
pgd.addClass("InvertedIndex", InvertedIndex.class,
"A map/reduce program that calculate the inverted index");
pgd.addClass("IDOffsetTitle", IDOffsetTitle.class,
"A map/reduce program that extract the <ID> <Offset> <title> tripe");
pgd.addClass("RedirectCount", RedirectCount.class,
"A map/reduce program that count the number of redirect page");
pgd.addClass("PageWordCount", PageWordCount.class,
"A map/reduce program that count the wordcount of each page");
pgd.addClass("PageMaxWordCount", PageMaxWordCount.class,
"A map/reduce program that count the most frequent occurence of a word of each page");
exitCode = pgd.run(argv);
}
catch(Throwable e){
e.printStackTrace();
}
System.exit(exitCode);
}
示例12: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
/**
* @param args
* @throws Throwable
*/
public static void main(String[] args) throws Throwable {
ProgramDriver pgd = new ProgramDriver();
pgd.addClass(RowCounter.NAME, RowCounter.class,
"Count rows in HBase table");
ProgramDriver.class.getMethod("driver", new Class [] {String[].class}).
invoke(pgd, new Object[]{args});
}
示例13: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
/**
* Main entry point for jar file.
*
* @param args The command line parameters.
* @throws Throwable When the selection fails.
*/
public static void main(String[] args) throws Throwable {
ProgramDriver pgd = new ProgramDriver();
pgd.addClass(ImportFromFile.NAME, ImportFromFile.class, "Import from file");
pgd.addClass(ImportFromFile2.NAME, ImportFromFile2.class, "Import from file (with dependencies)");
pgd.addClass(AnalyzeData.NAME, AnalyzeData.class, "Analyze imported JSON");
pgd.addClass(AnalyzeSnapshotData.NAME, AnalyzeSnapshotData.class, "Analyze imported JSON from snapshot");
pgd.addClass(ParseJson.NAME, ParseJson.class, "Parse JSON into columns");
pgd.addClass(ParseJson2.NAME, ParseJson2.class, "Parse JSON into columns (map only)");
pgd.addClass(ParseJsonMulti.NAME, ParseJsonMulti.class, "Parse JSON into multiple tables");
pgd.driver(args);
}
示例14: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
/**
* A description of the test program for running all the tests using jar file
*/
public static void main(String argv[]){
ProgramDriver pgd = new ProgramDriver();
try {
pgd.addClass("threadedmapbench", ThreadedMapBenchmark.class,
"A map/reduce benchmark that compares the performance " +
"of maps with multiple spills over maps with 1 spill");
pgd.addClass("mrbench", MRBench.class, "A map/reduce benchmark that can create many small jobs");
pgd.addClass("nnbench", NNBench.class, "A benchmark that stresses the namenode.");
pgd.addClass("mapredtest", TestMapRed.class, "A map/reduce test check.");
pgd.addClass("testfilesystem", TestFileSystem.class, "A test for FileSystem read/write.");
pgd.addClass("testsequencefile", TestSequenceFile.class, "A test for flat files of binary key value pairs.");
pgd.addClass("testsetfile", TestSetFile.class, "A test for flat files of binary key/value pairs.");
pgd.addClass("testarrayfile", TestArrayFile.class, "A test for flat files of binary key/value pairs.");
pgd.addClass("testrpc", TestRPC.class, "A test for rpc.");
pgd.addClass("testsequencefileinputformat", TestSequenceFileInputFormat.class, "A test for sequence file input format.");
pgd.addClass("testtextinputformat", TestTextInputFormat.class, "A test for text input format.");
pgd.addClass("TestDFSIO", TestDFSIO.class, "Distributed i/o benchmark.");
pgd.addClass("DFSCIOTest", DFSCIOTest.class, "Distributed i/o benchmark of libhdfs.");
pgd.addClass("DistributedFSCheck", DistributedFSCheck.class, "Distributed checkup of the file system consistency.");
pgd.addClass("testmapredsort", SortValidator.class,
"A map/reduce program that validates the map-reduce framework's sort.");
pgd.addClass("testbigmapoutput", BigMapOutput.class,
"A map/reduce program that works on a very big " +
"non-splittable file and does identity map/reduce");
pgd.addClass("loadgen", GenericMRLoadGenerator.class, "Generic map/reduce load generator");
pgd.addClass("filebench", FileBench.class, "Benchmark SequenceFile(Input|Output)Format (block,record compressed and uncompressed), Text(Input|Output)Format (compressed and uncompressed)");
pgd.addClass("dfsthroughput", BenchmarkThroughput.class,
"measure hdfs throughput");
pgd.addClass("MRReliabilityTest", ReliabilityTest.class,
"A program that tests the reliability of the MR framework by " +
"injecting faults/failures");
pgd.addClass("minicluster", MiniHadoopClusterManager.class,
"Single process HDFS and MR cluster.");
pgd.driver(argv);
} catch(Throwable e) {
e.printStackTrace();
}
}
示例15: main
import org.apache.hadoop.util.ProgramDriver; //導入方法依賴的package包/類
public static void main(String argv[]) {
int exitCode = -1;
ProgramDriver pgd = new ProgramDriver();
try {
pgd.addClass("dummyjob", DummyJob.class, "");
pgd.addClass("recordbuild", RecordBuild.class, "");
pgd.addClass("fuzzyjoin", FuzzyJoin.class, "");
pgd.addClass("tokensbasic", TokensBasic.class, "");
pgd.addClass("tokensimproved", TokensImproved.class, "");
// pgd.addClass("ridpairsbasic", RIDPairsBasic.class, "");
pgd.addClass("ridpairsimproved", RIDPairsImproved.class, "");
pgd.addClass("ridpairsppjoin", RIDPairsPPJoin.class, "");
pgd.addClass("recordpairsbasic", RecordPairsBasic.class, "");
pgd.addClass("recordpairsimproved", RecordPairsImproved.class, "");
pgd.addClass("ridrecordpairsimproved",
RIDRecordPairsImproved.class, "");
pgd.addClass("ridrecordpairsppjoin", RIDRecordPairsPPJoin.class, "");
pgd.addClass("recordgenerate", RecordGenerate.class, "");
pgd.addClass("recordbalance", RecordBalance.class, "");
pgd.driver(argv);
// Success
exitCode = 0;
} catch (Throwable e) {
e.printStackTrace();
}
System.exit(exitCode);
}