Back to project page Profiterole.
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.
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)); } } }