当前位置: 首页>>代码示例>>Java>>正文


Java Job.add方法代码示例

本文整理汇总了Java中org.galagosearch.tupleflow.execution.Job.add方法的典型用法代码示例。如果您正苦于以下问题:Java Job.add方法的具体用法?Java Job.add怎么用?Java Job.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.galagosearch.tupleflow.execution.Job的用法示例。


在下文中一共展示了Job.add方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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;
}
 
开发者ID:youngilcho,项目名称:internet-application-2014,代码行数:21,代码来源:ZipfsLaw.java

示例2: 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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:11,代码来源:BuildIndexTest.java

示例3: 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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:14,代码来源:BuildIndexTest.java

示例4: 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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:14,代码来源:BuildIndexTest.java

示例5: 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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:13,代码来源:BuildIndexTest.java

示例6: 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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:14,代码来源:BuildIndexTest.java

示例7: 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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:14,代码来源:BuildIndexTest.java

示例8: 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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:14,代码来源:BuildIndexTest.java

示例9: 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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:14,代码来源:BuildIndexTest.java

示例10: 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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:14,代码来源:BuildIndexTest.java

示例11: getIndexJob

import org.galagosearch.tupleflow.execution.Job; //导入方法依赖的package包/类
public Job getIndexJob(String indexDirectory, String[] indexInputs,
                       boolean extractAnchors, boolean useStemming) throws IOException {
    Job job = new Job();
    this.indexPath = indexDirectory;
    this.stemming = useStemming;
    this.useLinks = extractAnchors;

    job.add(getSplitStage(indexInputs));
    job.add(getParsePostingsStage());
    job.add(getWritePostingsStage("writePostings", "numberedPostings", "postings"));
    job.add(getWriteManifestStage());
    job.add(getWriteExtentsStage());
    job.add(getWriteDocumentNamesStage());
    job.add(getWriteDocumentLengthsStage());
    job.add(getNumberDocumentsStage());
    job.add(getNumberPostingsStage("numberPostings", "postings", "numberedPostings"));
    job.add(getNumberExtentsStage());
    job.add(getCollectionLengthStage());

    job.connect("inputSplit", "parsePostings", ConnectionAssignmentType.Each);
    job.connect("parsePostings", "numberDocuments", ConnectionAssignmentType.Combined);
    job.connect("numberDocuments", "writeDocumentLengths", ConnectionAssignmentType.Combined);
    job.connect("numberDocuments", "writeDocumentNames", ConnectionAssignmentType.Combined);
    job.connect("numberDocuments", "numberPostings", ConnectionAssignmentType.Combined);
    job.connect("numberDocuments", "numberExtents", ConnectionAssignmentType.Combined);
    job.connect("parsePostings", "numberPostings", ConnectionAssignmentType.Each);
    job.connect("parsePostings", "numberExtents", ConnectionAssignmentType.Each);
    job.connect("numberExtents", "writeExtents", ConnectionAssignmentType.Combined);
    job.connect("numberPostings", "writePostings", ConnectionAssignmentType.Combined);
    job.connect("parsePostings", "collectionLength", ConnectionAssignmentType.Combined);
    job.connect("collectionLength", "writeManifest", ConnectionAssignmentType.Combined);

    if (useLinks) {
        job.add(getParseLinksStage());
        job.add(getLinkCombineStage());

        job.connect("inputSplit", "parseLinks", ConnectionAssignmentType.Each);
        job.connect("parseLinks", "linkCombine", ConnectionAssignmentType.Each);
        job.connect("linkCombine", "parsePostings", ConnectionAssignmentType.Each);
    }

    if (stemming) {
        job.add(getNumberPostingsStage("numberStemmedPostings",
                                       "stemmedPostings",
                                       "numberedStemmedPostings"));
        job.add(getWritePostingsStage("writeStemmedPostings",
                                      "numberedStemmedPostings",
                                      "stemmedPostings"));
        job.connect("parsePostings", "numberStemmedPostings", ConnectionAssignmentType.Each);
        job.connect("numberDocuments", "numberStemmedPostings", ConnectionAssignmentType.Combined);
        job.connect("numberStemmedPostings", "writeStemmedPostings", ConnectionAssignmentType.Combined);
    }

    return job;
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:56,代码来源:BuildIndex.java


注:本文中的org.galagosearch.tupleflow.execution.Job.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。