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

Sebastian Nagel commented on NUTCH-2015:
----------------------------------------

Ok. Ev. this could be changed to make it more clear: a check isRunning() inside 
a loop suggests that the state of the server can change between running and 
stopped. That's (currently) not the case and a boolean field variable seems to 
more verbose. In case the server could be stopped it should be:
{code}
if (NutchServer.getInstance().isRunning())
  this.fetchNode = new FetchNode();
else
  this.fetchNode = null;
{code}

Since currently fetchNode is only used with a parsing fetcher this could be 
also checked, e.g.
{code}
if (parsing && NutchServer.getInstance().isRunning()) {
  reportToNutchServer = true;
}
{code}

> Make FetchNodeDb optional (off by default) if NutchServer is not used
> ---------------------------------------------------------------------
>
>                 Key: NUTCH-2015
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2015
>             Project: Nutch
>          Issue Type: Sub-task
>          Components: fetcher, REST_api
>            Reporter: Sujen Shah
>              Labels: memex
>             Fix For: 1.11
>
>
> Currently, the FetchNodes are created even if the NutchServer is not used 
> causing memory exceptions. This patch makes the fetcher report to the 
> FetchNodeDb only if the crawl is invoked from the REST service (ie 
> NutchServer)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to