Android Open Source - Profiterole Map Reduce






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.api;
//from ww  w.  j av  a  2s . c o m
import java.io.File;

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

public class MapReduce {

  private MapReduce() {
    throw new AssertionError("Can't be here");
  }
  
  public static Waffle<?> perform(File folders, ReduceStrategy<?> reduceStrategy) {
    return perform(folders, new OnUpdateStatusCallback() {
      
      @Override
      public void onMediumTwo(String info) {
        
      }
      
      @Override
      public void onMediumOne(String info) {
    
      }
      
      @Override
      public void onInit(String info) {
      
      }
      
      @Override
      public void onFinish(String info) {
        
      }
    }, reduceStrategy);
  }

  public static Waffle<?> perform(File folders, OnUpdateStatusCallback listener, ReduceStrategy<?> reduceStrategy) {

    return MapReduceService.mapReduce(
        Splitter.folderToFileList(folders), listener);
  }

  public static void main(String[] args) {

    // String one = System.getProperty("user.dir") +"/OneFile/";
    Waffle<?> waffle = MapReduce.perform(new File(System.getProperty("user.dir") + "/MapJobs/"), null);
    System.out.println(waffle);
  }
}




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