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


Java Job类代码示例

本文整理汇总了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());
    }
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:25,代码来源:App.java

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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