You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Marek Bachmann <m....@uni-kassel.de> on 2012/01/20 18:10:13 UTC

Strange timestamps in generators log

Hello again,

I was inspecting the generator because it doesn't deliver all urls for 
the fetcht list from the crawldb even if I set the addDays atribute to a 
value much higher than the max fetch intervall.

As I had a look at the log file I notice that it uses a time stamp which 
I don't know:

2012-01-20 18:32:24,506 DEBUG org.apache.nutch.crawl.Generator: 
-shouldFetch rejected 'http://(...)', fetchTime=1327667923420, 
curTime=1327076858662

So I wanted to see what time these to values are actually are and 
converted them using the date command:

date -u -d @1327667923420
Do 13. Feb 21:23:40 UTC 44042

So the fetch time is in the year 44042? Quite a long time to wait the 
same with the system time:

date -u -d @1327076858662
Di 23. Mai 20:44:22 UTC 44023

(My system is NOT set to that date!) ;-)

Does the generator use another kind of timestamp than unix systems? Or 
is something terrible wrong here?

Thanks a lot in advance


Re: Strange timestamps in generators log

Posted by Marek Bachmann <m....@uni-kassel.de>.
Hi Lewis,

Am 20.01.2012 18:47, schrieb Lewis John Mcgibbney:
> On Fri, Jan 20, 2012 at 5:10 PM, Marek Bachmann <m....@uni-kassel.de>wrote:
> 
>> Hello again,
>>
>> I was inspecting the generator because it doesn't deliver all urls for the
>> fetcht list from the crawldb even if I set the addDays atribute to a value
>> much higher than the max fetch intervall.
>>
> 
> How much higher was your -addDays arguement value set to?
I ran: ./nutch generate uniall/crawldb uniall/segs -addDays 14

> 
> 
>>
>> As I had a look at the log file I notice that it uses a time stamp which I
>> don't know:
>>
>> Mmmm... perhaps not by coincidence I don't seem to know these TS either...
> 
> 
>>
>> Does the generator use another kind of timestamp than unix systems? Or is
>> something terrible wrong here?
>>
>> I would say the latter of the two. If you look at the Generator we get the
> fetchtime from the CrawlDatum and the curTime by setting it to
> System.currentTimeMillis().
jepp, I divided the value by 1000 and then it is the unix ts with the
right date BUT still I think the generator shouldn't reject the urls
since I told him to add the 14 days.
Am I wrong when I thing that the addDays attribute let the generator add
N days to the current time and selects all urls which have a fetch time
lower than now + N days?

... ok I checked it... I ran with -addDays and not with -adddays. Now it
sets the current time 14 days further..
> 
> In all honesty I have no idea how you go these value's. Is this the only
> thing that looks suspicious in your logs? As far as I am aware, all date's
> ACROSS THE BOARD with Nutch should be in the sdf format yyyy-MM-dd HH:mm:ss

It is the debugging output of the generator class :-)

In Line 180 to 185:
      // check fetch schedule
      if (!schedule.shouldFetch(url, crawlDatum, curTime)) {
        LOG.debug("-shouldFetch rejected '" + url + "', fetchTime="
            + crawlDatum.getFetchTime() + ", curTime=" + curTime);
        return;
      }

> 
> 
> 


Re: Strange timestamps in generators log

Posted by Lewis John Mcgibbney <le...@gmail.com>.
On Fri, Jan 20, 2012 at 5:10 PM, Marek Bachmann <m....@uni-kassel.de>wrote:

> Hello again,
>
> I was inspecting the generator because it doesn't deliver all urls for the
> fetcht list from the crawldb even if I set the addDays atribute to a value
> much higher than the max fetch intervall.
>

How much higher was your -addDays arguement value set to?


>
> As I had a look at the log file I notice that it uses a time stamp which I
> don't know:
>
> Mmmm... perhaps not by coincidence I don't seem to know these TS either...


>
> Does the generator use another kind of timestamp than unix systems? Or is
> something terrible wrong here?
>
> I would say the latter of the two. If you look at the Generator we get the
fetchtime from the CrawlDatum and the curTime by setting it to
System.currentTimeMillis().

In all honesty I have no idea how you go these value's. Is this the only
thing that looks suspicious in your logs? As far as I am aware, all date's
ACROSS THE BOARD with Nutch should be in the sdf format yyyy-MM-dd HH:mm:ss



-- 
*Lewis*