[ https://issues.apache.org/jira/browse/NUTCH-1651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13808045#comment-13808045 ]
lufeng commented on NUTCH-1651: ------------------------------- Hi Talat but I think get last modified from header is not appropriate to put in here. If user want to check the modification of a html in parser plugin through it's content of that url not that metadata in html headers. even the value of "Last-Modified" in headers is changed. {code:java} + Utf8 lastModified = page.getFromHeaders(new Utf8("Last-Modified")); + if ( lastModified != null ){ + try { + modifiedTime = HttpDateFormat.toLong(lastModified.toString()); + prevModifiedTime = page.getModifiedTime(); + } catch (Exception e) { + } + } {code} maybe appropriate way is to let parser plugin defined by user to set the value of modified time not in DbUpdateReducer class. > modifiedTime and prevmodifiedTime never set > -------------------------------------------- > > Key: NUTCH-1651 > URL: https://issues.apache.org/jira/browse/NUTCH-1651 > Project: Nutch > Issue Type: Bug > Affects Versions: 2.2.1 > Reporter: Talat UYARER > Fix For: 2.3 > > Attachments: NUTCH-1651.patch > > > modifiedTime is never set. If you use DefaultFetchScheduler, modifiedTime is > always zero as default. But if you use AdaptiveFetchScheduler, modifiedTime > is set only once in the beginning by zero-control of AdaptiveFetchScheduler. > But this is not sufficient since modifiedTime needs to be updated whenever > last modified time is available. We corrected this with a patch. > Also we noticed that prevModifiedTime is not written to database and we > corrected that too. > With this patch, whenever lastModifiedTime is available, we do two things. > First we set modifiedTime in the Page object to prevModifiedTime. After that > we set lastModifiedTime to modifiedTime. -- This message was sent by Atlassian JIRA (v6.1#6144)