nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NUTCH-1842) crawl.gen.delay has a wrong default value in nutch-default.xml or is being parsed incorrectly
Date Thu, 15 Nov 2018 10:35:01 GMT

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

ASF GitHub Bot commented on NUTCH-1842:
---------------------------------------

sebastian-nagel closed pull request #393: NUTCH-1842: crawl.gen.delay value is read incorrectly
from config
URL: https://github.com/apache/nutch/pull/393
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/java/org/apache/nutch/crawl/Generator.java b/src/java/org/apache/nutch/crawl/Generator.java
index da7e38ad8..1a3c5fd1f 100644
--- a/src/java/org/apache/nutch/crawl/Generator.java
+++ b/src/java/org/apache/nutch/crawl/Generator.java
@@ -188,7 +188,7 @@ public void setup(Mapper<Text, CrawlDatum, FloatWritable, SelectorEntry>.Context
         filters = new URLFilters(conf);
         scfilters = new ScoringFilters(conf);
         filter = conf.getBoolean(GENERATOR_FILTER, true);
-        genDelay = conf.getLong(GENERATOR_DELAY, 7L) * 3600L * 24L * 1000L;
+        genDelay = conf.getLong(GENERATOR_DELAY, 604800000L); // 7 days as default.
         long time = conf.getLong(Nutch.GENERATE_TIME_KEY, 0L);
         if (time > 0)
           genTime.set(time);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> crawl.gen.delay has a wrong default value in nutch-default.xml or is being parsed incorrectly

> ----------------------------------------------------------------------------------------------
>
>                 Key: NUTCH-1842
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1842
>             Project: Nutch
>          Issue Type: Bug
>          Components: generator
>    Affects Versions: 1.9
>            Reporter: kaveh minooie
>            Assignee: Sebastian Nagel
>            Priority: Minor
>             Fix For: 1.16
>
>
> this is from nutch-default.xml:
> <property>
>   <name>crawl.gen.delay</name>
>   <value>604800000</value>
>   <description>
>    This value, expressed in milliseconds, defines how long we should keep the lock on
records 
>    in CrawlDb that were just selected for fetching. If these records are not updated

>    in the meantime, the lock is canceled, i.e. they become eligible for selecting. 
>    Default value of this is 7 days (604800000 ms).
>   </description>
> </property>
> this is the from o.a.n.crawl.Generator.configure(JobConf job)
> genDelay = job.getLong(GENERATOR_DELAY, 7L) * 3600L * 24L * 1000L;
> the value in config file is in milliseconds but the code expect it to be in days. I reported
this couple of years ago on the mailing list as well. I didn't post a patch becaue I am not
sure which one needs to be fixed. considering all the other values in config file are in milliseconds
it can be argued to that consistency matters, but 'day' is a much more reasonable unit for
this property.
> Also this value is not being used in 2.x ?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message