Examples of WordCount


Examples of akka.first.app.java.messages.WordCount

    List<WordCount> dataList = new ArrayList<WordCount>();
    StringTokenizer parser = new StringTokenizer(line);
    while (parser.hasMoreTokens()) {
      String word = parser.nextToken().toLowerCase();
      if (!STOP_WORDS_LIST.contains(word)) {
        dataList.add(new WordCount(word,Integer.valueOf(1)));
      }
    }
    return new MapData(dataList);
  }
View Full Code Here

Examples of eu.stratosphere.examples.scala.wordcount.WordCount

public class WordCountITCase extends eu.stratosphere.test.recordJobTests.WordCountITCase {

  @Override
  protected Plan getTestJob() {
    WordCount wc = new WordCount();
    return wc.getScalaPlan(4, textPath, resultPath);
  }
View Full Code Here

Examples of eu.stratosphere.test.recordJobs.wordcount.WordCount

*/
public class DumpCompiledPlanTest extends CompilerTestBase {
 
  @Test
  public void dumpWordCount() {
    dump(new WordCount().getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, OUT_FILE));
  }
View Full Code Here

Examples of eu.stratosphere.test.recordJobs.wordcount.WordCount

    checkWordCount(false);
  }
 
  private void checkWordCount(boolean estimates) {
    try {
      WordCount wc = new WordCount();
      Plan p = wc.getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, OUT_FILE);
     
      OptimizedPlan plan;
      if (estimates) {
        FileDataSource source = getContractResolver(p).getNode("Input Lines");
        setSourceStatistics(source, 1024*1024*1024*1024L, 24f);
View Full Code Here

Examples of eu.stratosphere.test.recordJobs.wordcount.WordCount

 
  protected static final String[] NO_ARGS = new String[0];
 
  @Test
  public void dumpWordCount() {
    dump(new WordCount().getPlan("4", IN_FILE, OUT_FILE));
   
    // The web interface passes empty string-args to compute the preview of the
    // job, so we should test this situation too
    dump(new WordCount().getPlan(NO_ARGS));
  }
View Full Code Here

Examples of eu.stratosphere.test.recordJobs.wordcount.WordCount

    resultPath = getTempDirPath("result");
  }

  @Override
  protected Plan getTestJob() {
    WordCount wc = new WordCount();
    return wc.getPlan("4", textPath, resultPath);
  }
View Full Code Here

Examples of eu.stratosphere.test.recordJobs.wordcount.WordCount

      FileWriter fw = new FileWriter(inFile);
      fw.write(WordCountData.TEXT);
      fw.close();
     
      // run WordCount
      WordCount wc = new WordCount();
      wc.getPlan("4", inFile.toURI().toString(), outFile.toURI().toString());
     
      LocalExecutor executor = new LocalExecutor();
      LocalExecutor.setLoggingLevel(Level.WARN);
      executor.setDefaultOverwriteFiles(true);
      executor.start();
     
      executor.executePlan(wc.getPlan("4", inFile.toURI().toString(), outFile.toURI().toString()));
      executor.stop();
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail(e.getMessage());
    }
View Full Code Here

Examples of org.apache.flink.test.recordJobs.wordcount.WordCount

    checkWordCount(false);
  }
 
  private void checkWordCount(boolean estimates) {
    try {
      WordCount wc = new WordCount();
      Plan p = wc.getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, OUT_FILE);
     
      OptimizedPlan plan;
      if (estimates) {
        FileDataSource source = getContractResolver(p).getNode("Input Lines");
        setSourceStatistics(source, 1024*1024*1024*1024L, 24f);
View Full Code Here

Examples of org.apache.flink.test.recordJobs.wordcount.WordCount

*/
public class DumpCompiledPlanTest extends CompilerTestBase {
 
  @Test
  public void dumpWordCount() {
    dump(new WordCount().getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, OUT_FILE));
  }
View Full Code Here

Examples of org.apache.flink.test.recordJobs.wordcount.WordCount

 
  protected static final String[] NO_ARGS = new String[0];

  @Test
  public void dumpWordCount() {
    dump(new WordCount().getPlan("4", IN_FILE, OUT_FILE));
   
    // The web interface passes empty string-args to compute the preview of the
    // job, so we should test this situation too
    dump(new WordCount().getPlan(NO_ARGS));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.