本文整理汇总了Java中org.galagosearch.tupleflow.execution.Job类的典型用法代码示例。如果您正苦于以下问题:Java Job类的具体用法?Java Job怎么用?Java Job使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Job类属于org.galagosearch.tupleflow.execution包,在下文中一共展示了Job类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleBuild
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
private static void handleBuild(String[] args) throws Exception {
if (args.length <= 1) {
commandHelpBuild();
return;
}
// handle --links and --stemming flags
String[][] filtered = Utility.filterFlags(Utility.subarray(args, 2));
String[] flags = filtered[0];
String[] docs = filtered[1];
Parameters p = new Parameters(flags);
boolean useLinks = p.get("links", false);
boolean stemming = p.get("stemming", true);
BuildIndex build = new BuildIndex();
Job job = build.getIndexJob(args[1], docs, useLinks, stemming);
ErrorStore store = new ErrorStore();
JobExecutor.runLocally(job, store);
if (store.hasStatements()) {
System.out.println(store.toString());
}
}
示例2: getZipfJob
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
/**
* Builds the entire job.
*/
public Job getZipfJob(String outputFile, String[] inputs) throws IOException {
Job job = new Job();
BuildIndex b = new BuildIndex();
job.add(b.getSplitStage(inputs));
job.add(getWordCountStage());
job.add(getReduceCountsStage());
job.add(getInvertByCountStage());
job.add(getZipfReduceStage(outputFile));
job.connect("inputSplit", "wordCount", ConnectionAssignmentType.Each);
job.connect("wordCount", "reduceCounts", ConnectionAssignmentType.Each);
job.connect("reduceCounts", "invertByCount", ConnectionAssignmentType.Each);
job.connect("invertByCount", "zipfReduce", ConnectionAssignmentType.Combined);
return job;
}
示例3: handleMakeCorpus
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
private static void handleMakeCorpus(String[] args) throws Exception {
if (args.length <= 2) {
commandHelp(args[0]);
return;
}
Job job = getDocumentConverter(args[1], Utility.subarray(args, 2));
ErrorStore store = new ErrorStore();
JobExecutor.runLocally(job, store);
if (store.hasStatements()) {
System.out.println(store.toString());
}
}
示例4: testCollectionLengthStage
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
public void testCollectionLengthStage() throws IOException {
BuildIndex buildIndex = new BuildIndex();
Job job = new Job();
job.add(buildIndex.getCollectionLengthStage());
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals(0, store.getErrors().size());
assertEquals(0, store.getWarnings().size());
}
示例5: testGetSplitStage
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
/**
* Test of getSplitStage method, of class BuildIndex.
*/
public void testGetSplitStage() throws IOException {
BuildIndex buildIndex = new BuildIndex();
Job job = new Job();
job.add(buildIndex.getSplitStage(new String[] {"/"}));
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals(0, store.getErrors().size());
assertEquals(0, store.getWarnings().size());
}
示例6: testGetParseStage
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
/**
* Test of getParseStage method, of class BuildIndex.
*/
public void testGetParseStage() {
BuildIndex BuildIndex = new BuildIndex();
Job job = new Job();
job.add(BuildIndex.getParsePostingsStage());
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals(0, store.getErrors().size());
assertEquals(0, store.getWarnings().size());
}
示例7: testGetLinkCombineStage
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
/**
* Test of getLinkCombineStage method, of class BuildIndex.
*/
public void testGetLinkCombineStage() {
BuildIndex BuildIndex = new BuildIndex();
Job job = new Job();
job.add(BuildIndex.getLinkCombineStage());
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals("", store.toString());
}
示例8: testGetWritePostingsStage
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
/**
* Test of getWritePostingsStage method, of class BuildIndex.
*/
public void testGetWritePostingsStage() {
BuildIndex BuildIndex = new BuildIndex();
Job job = new Job();
job.add(BuildIndex.getWritePostingsStage("postings", "input", "index"));
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals(0, store.getErrors().size());
assertEquals(0, store.getWarnings().size());
}
示例9: testGetWriteExtentsStage
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
/**
* Test of getWriteExtentsStage method, of class BuildIndex.
*/
public void testGetWriteExtentsStage() {
BuildIndex BuildIndex = new BuildIndex();
Job job = new Job();
job.add(BuildIndex.getWriteExtentsStage());
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals(0, store.getErrors().size());
assertEquals(0, store.getWarnings().size());
}
示例10: testGetWriteDatesStage
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
/**
* Test of getWriteDatesStage method, of class BuildIndex.
*/
public void testGetWriteDatesStage() {
BuildIndex BuildIndex = new BuildIndex();
Job job = new Job();
job.add(BuildIndex.getWriteDatesStage());
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals(0, store.getErrors().size());
assertEquals(0, store.getWarnings().size());
}
示例11: testGetWriteManifestStage
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
/**
* Test of getWriteManifestStage method, of class BuildIndex.
*/
public void testGetWriteManifestStage() {
BuildIndex BuildIndex = new BuildIndex();
Job job = new Job();
job.add(BuildIndex.getWriteManifestStage());
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals(0, store.getErrors().size());
assertEquals(0, store.getWarnings().size());
}
示例12: testGetWriteDocumentLengthsStage
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
/**
* Test of getWriteDocumentLengthsStage method, of class BuildIndex.
*/
public void testGetWriteDocumentLengthsStage() {
BuildIndex BuildIndex = new BuildIndex();
Job job = new Job();
job.add(BuildIndex.getWriteDocumentLengthsStage());
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals(0, store.getErrors().size());
assertEquals(0, store.getWarnings().size());
}
示例13: testGetIndexJob
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
/**
* Test of getIndexJob method, of class BuildIndex.
*/
public void testGetIndexJob() throws IOException {
BuildIndex buildIndex = new BuildIndex();
Job job = buildIndex.getIndexJob("one", new String[] {"/"}, false, false);
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals("", store.toString());
}
示例14: testJobWithStemming
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
public void testJobWithStemming() throws IOException {
BuildIndex buildIndex = new BuildIndex();
Job job = buildIndex.getIndexJob("one", new String[] {"/"}, false, true);
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals("", store.toString());
}
示例15: testJobWithLinks
import org.galagosearch.tupleflow.execution.Job; //导入依赖的package包/类
public void testJobWithLinks() throws IOException {
BuildIndex buildIndex = new BuildIndex();
Job job = buildIndex.getIndexJob("one", new String[] {"/"}, true, false);
ErrorStore store = new ErrorStore();
Verification.verify(job, store);
assertEquals("", store.toString());
}