[ https://issues.apache.org/jira/browse/NUTCH-702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713383#action_12713383 ]
Dmitry Lihachev commented on NUTCH-702: --------------------------------------- I catched NPE when using this patch {code} java.lang.NullPointerException at org.apache.nutch.crawl.CrawlDatum.putAllMetaData(CrawlDatum.java:216) at org.apache.nutch.crawl.CrawlDbReducer.reduce(CrawlDbReducer.java:134) at org.apache.nutch.crawl.CrawlDbReducer.reduce(CrawlDbReducer.java:35) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:436) at org.apache.hadoop.mapred.Child.main(Child.java:158) {code} at line 216 we can see this part of code {code} metaData.put(e.getKey(), e.getValue()); {code} but metadata is yet not initialized. I think problem can be soved if change this code part to {code} getMetaData().put(e.getKey(), e.getValue()); {code} > Lazy Instanciation of Metadata in CrawlDatum > -------------------------------------------- > > Key: NUTCH-702 > URL: https://issues.apache.org/jira/browse/NUTCH-702 > Project: Nutch > Issue Type: Improvement > Affects Versions: 1.0.0 > Reporter: Julien Nioche > Attachments: NUTCH-702.patch > > > CrawlDatum systematically instanciates its metadata, which is quite wasteful > especially in the case of CrawlDBReducer when it generates a new CrawlDatum > for each incoming link before storing it in a List. > Initial testing on the lazy instanciation shows an improvement in both speed > and memory consumption. I will generate a patch for it ASAP -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.