Android Open Source - Profiterole R E P L






From Project

Back to project page Profiterole.

License

The source code is released under:

Apache License

If you think the Android project Profiterole listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package profiterole.samples;
//from  w w w .  j a  va  2s.  co  m
import java.io.File;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

import profiterole.api.Waffle;
import profiterole.mapreduce.MapReduceService;

public class REPL {

  public static void main(String[] args) {
    
    String input;
    List<File> arr = new LinkedList<File>();     
      File path = new File(System.getProperty("user.dir") +"/MapJobs/");

        File [] files = path.listFiles();
        for (int i = 0; i < files.length; i++) {
            if (files[i].isFile()) { //this line weeds out other directories/folders
              arr.add(files[i]);
            }
        }
          
        Waffle<?> result = MapReduceService.mapReduce(arr);
      System.out.println();
    Scanner sc = new Scanner(System.in);
  
    while (true) {
      System.out.print("$");
      input = sc.nextLine();
      System.out.println(input + "word count " + result.get(input));
    }
  }    
}




Java Source Code List

profiterole.android.DictionaryScreen.java
profiterole.android.SearchScreen.java
profiterole.api.MapReduce.java
profiterole.api.OnUpdateStatusCallback.java
profiterole.api.Waffle.java
profiterole.mapreduce.MapCallback.java
profiterole.mapreduce.MapReduceService.java
profiterole.mapreduce.Reducer.java
profiterole.mapreduce.Splitter.java
profiterole.samples.Driver.java
profiterole.samples.PrintPromptListener.java
profiterole.samples.REPL.java
profiterole.waffle.InvertedIndex.java
profiterole.waffle.WaffleBackend.java
profiterole.waffle.WaffleImpl.java
profiterole.waffle.WaffleUtils.java