edvicif (10) [Avatar] Offline
#1
Hi.

In chapter 1. At page 22. There is a map reduce example.
I think it would improve understandability if it states it is a code snippet only and also specify it is written in JAVA. For example ... before the class definition

When I was reading, it took a few second become comfortable with these facts. The code looked JAVA, but begin with a public static class declaration. It took a while until I've realised we talking about an inner class.

On page 24 there is an example code. I think the first part of the code is missing as numbering begin from 2.

At step 4 and 5. The Map.class and Reduce.class I believe refers to the previous static inner classes. I think I understand, that the code only tried to focus on the Map, Reduce behaviour, but it may improve readability if these context information provided. I think it comes down to taste in the end. smilie

I didn't understand, why the example use new Text(), when specifying the file, but Text.set(), when we specify the word. Probably it will be elaborated later, but a few thought may would be help full. The reason I ask, that it isn't 100% clear, that I can write the same solution, without members and using new Text() in the Map method, by extracting file information from the context parameter.
Alex Holmes (47) [Avatar] Offline
#2
Re: Minor suggestion on Hadoop Practice second edition
Thanks for your feedback - I'll look at incorporating your suggestions.

Alex