My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
ProgrammingGuideSimpleJob  
SSS Mapreduce Programming Guide - SimpleJob
ja , en
Updated Feb 27, 2013

SimpleJob

Unlike original MapReduce computational model, Mapper and Reducer can be combined freely when JobEngine class used. For example, JobEngine can execute Reducer only and write the results of two different Mapper to same TupleGroup. However, therefore, the usage is difficult. Thus SSS Mapreduce provides wrapper faithful to Mapreduce computational model. It is "SimpleJob" class.

Its usage is easy.

The code that invokes WordCount using SimpleJob is shown below.

    SimpleJob job = new SimpleJob(client);   
                
    job.setMapperClass(WordCountMapper.class);
    job.setCombinerClass(WordCountReducer.class);
    job.setReducerClass(WordCountReducer.class);
    job.setInputGID(input);
                                  
    GroupID result = job.execute();
    System.out.println("output data deployed - " + result);

Above code specifies Mapper class, Combiner class, Combiner class and input GroupID using setter, and calls SimpleJob#execute. TupleGroup of output result can be gotten as the return value of SimpleJob#execute.

For details, see JavaDoc.

Powered by Google Project Hosting