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

Markus Jelsma commented on NUTCH-1356:
--------------------------------------

I kept checking the log and found some more of the exceptions above and several 
similar:

{code}
java.util.concurrent.TimeoutException
        at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228)
        at java.util.concurrent.FutureTask.get(FutureTask.java:91)
        at org.apache.nutch.parse.ParseUtil.runParser(ParseUtil.java:162)
        at org.apache.nutch.parse.ParseUtil.parse(ParseUtil.java:93)
{code}

More interesting is that i see additional stack traces elsewhere indicating a 
problem with a parse filter:

{code}
Caused by: java.lang.NullPointerException
        at org.apache.xerces.dom.ParentNode.nodeListItem(Unknown Source)
        at org.apache.xerces.dom.ParentNode.item(Unknown Source)
        at org.apache.nutch.util.NodeWalker.nextNode(NodeWalker.java:75)
        at 
org.apache.nutch.parse.headings.HeadingsParseFilter.getElement(HeadingsParseFilter.java:79)
        at 
org.apache.nutch.parse.headings.HeadingsParseFilter.filter(HeadingsParseFilter.java:48)
        at 
org.apache.nutch.parse.HtmlParseFilters.filter(HtmlParseFilters.java:98)
        at org.apache.nutch.parse.tika.TikaParser.getParse(TikaParser.java:208)
        at org.apache.nutch.parse.ParseCallable.call(ParseCallable.java:35)
        at org.apache.nutch.parse.ParseCallable.call(ParseCallable.java:24)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
{code}
                
> ParseUtil use ExecutorService instead of manually thread handling.
> ------------------------------------------------------------------
>
>                 Key: NUTCH-1356
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1356
>             Project: Nutch
>          Issue Type: Improvement
>            Reporter: Ferdy Galema
>             Fix For: nutchgora, 1.6
>
>         Attachments: NUTCH-1356-trunk-v2.patch, NUTCH-1356-trunk.patch, 
> NUTCH-1356.patch
>
>
> Because ParseUtil manages it's own parser threads by creating a thread for 
> every parse it sometimes happens that specific parsers are very expensive. 
> For example, parsers that have threadlocal fields will initialize them for 
> every item to be parsed.
> By simply introducing a caching ExecutorService the ParseUtil will be able to 
> cache threads therefore parsing more efficient. See attached patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to