Combine without gear in Hadoop

Can I write Hadoop code that only has Mappers and Combiners (i.e. mini gearboxes without gearbox)?

job.setMapperClass (WordCountMapper.class);
job.setCombinerClass (WordCountReducer.class);

conf.setInt ("mapred.reduce.tasks", 0);

I tried to do this, but I always see that I have one shortcut task on the job tracking link

Running Reduce Tasks = 1

How can I remove reducers while maintaining combinators? perhaps?

+3
source share
2 answers

In this case, you should use Reducers. Use as key: Context.getInputSplit (). GetPath () + Context.getInputSplit (). GetStart () - This combination is unique to each Mapper.

0
source

You need to tell your work that you don't care about the gearbox: JobConf.html # setNumReduceTasks (int)

// new Hadoop API jobConf.setNumReduceTasks(0); // old Hadoop API job.setNumReduceTasks(0); 

You can accomplish something with IdentityReducer .

Performs a reduction by writing all input values ​​directly to the output.

I'm not sure you can continue to combine, but I will start from the previous lines.

0
source

Source: https://habr.com/ru/post/972733/


All Articles