|
ProgrammingGuideSimpleJob
SSS Mapreduce Programming Guide - SimpleJob
en, ja SimpleJobUnlike 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. | |