[ 
https://issues.apache.org/jira/browse/NUTCH-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16283266#comment-16283266
 ] 

Sebastian Nagel commented on NUTCH-2474:
----------------------------------------

The problem is that the CrawlDbStatCombiner is written under the assumption 
that is called exactly once between mapper and reducer. However, this 
assumption is wrong: "The Combiner may be called 0, 1, or many times on each 
key between the mapper and reducer." ([discussion on Hadoop user mailing 
list|http://mail-archives.apache.org/mod_mbox/hadoop-common-user/200901.mbox/%[email protected]%3e])

The combiner emits for multiple values of score, fetch time, fetch interval the 
minimum, maximum, sum (and with NUTCH-2470 also a T-Digest structure to 
estimate quantiles). In distributed mode with a large CrawlDb it may be called 
many times and receives min/max/sum as input which is just summed up in the 
else-clause. Summing up min/max could be the reason for NUTCH-2297.

> CrawlDbReader -stats fails with ClassCastException
> --------------------------------------------------
>
>                 Key: NUTCH-2474
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2474
>             Project: Nutch
>          Issue Type: Bug
>          Components: crawldb
>    Affects Versions: 1.14
>         Environment: Java 8, distributed mode: Hadoop CDH 5.13.0
>            Reporter: Sebastian Nagel
>            Priority: Critical
>             Fix For: 1.14
>
>
> In distributed mode CrawlDbReader / readdb -stats fails with a 
> ClassCastException in the combiner:
> {noformat}
> 17/12/08 04:57:13 INFO mapreduce.Job: Task Id : 
> attempt_1512553291624_0022_m_000039_0, Status : FAILED
> Error: java.lang.ClassCastException: org.apache.hadoop.io.FloatWritable 
> cannot be cast to org.apache.hadoop.io.LongWritable
>         at 
> org.apache.nutch.crawl.CrawlDbReader$CrawlDbStatCombiner.reduce(CrawlDbReader.java:296)
>         at 
> org.apache.nutch.crawl.CrawlDbReader$CrawlDbStatCombiner.reduce(CrawlDbReader.java:222)
>         at 
> org.apache.hadoop.mapred.Task$OldCombinerRunner.combine(Task.java:1639)
>         at 
> org.apache.hadoop.mapred.MapTask$MapOutputBuffer.mergeParts(MapTask.java:1946)
>         at 
> org.apache.hadoop.mapred.MapTask$MapOutputBuffer.flush(MapTask.java:1514)
>         at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:466)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
> {noformat}
> FloatWritables are used since NUTCH-2470, so that's when this bug was 
> introduced.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to