Andrzej Bialecki wrote:
> Hmm.. I understand his point. But it means that I have to always put "if
(datum.getMetaData() == null)" check, which pollutes the code in all places that deal with metadata. Currently this is just CrawlDbReducer (but it already looks ugly there), but it will be like that in any place that wants to use metadata.

One thing to consider might be to add some methods to CrawlDatum like:

   public Writable getMeta(Writable key);

to minimize the null checks.

Or we can simply abandon this probably premature optimization. The MapReduce code now reuses keys and values (unless you're using a combiner...) so the allocation should be less of an issue.

Doug

Reply via email to