Issue Details (XML | Word | Printable)

Key: NUTCH-416
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andrzej Bialecki
Reporter: Andrzej Bialecki
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Nutch

CrawlDatum status and CrawlDbReducer refactoring

Created: 15/Dec/06 12:45 PM   Updated: 28/Dec/06 12:13 AM
Component/s: None
Affects Version/s: 0.9.0
Fix Version/s: 0.9.0

Time Tracking:
Not Specified

Resolution Date: 28/Dec/06 12:13 AM


 Description  « Hide
CrawlDatum needs more status codes, e.g. to reflect redirected pages. However, current values of status codes are linear, which prevents us from adding new codes in proper places. This is also related to the logic in CrawlDbReducer, which makes decisions based on arithmetic ordering of status code values.

I propose to change the codes so that they are grouped into related values, with significant gaps between groups for adding new codes without causing significant reordering. I also propose to change the logic in CrawlDbReducer so that its operation is not so dependent on actual code values.

A mapping should also be added between old and new codes to facilitate backward-compatibility of existing data. This mapping should be applied on the fly, without requiring explicit data conversion.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #490607 Thu Dec 28 00:03:04 UTC 2006 ab This patch addresses several issues:

* NUTCH-415 - Generator should mark selected records in CrawlDb.
  Due to increased resource consumption this step is optional.
  Application-level locking has been added to prevent concurrent
  modification of databases.

* NUTCH-416 - CrawlDatum status and CrawlDbReducer refactoring. It is
  now possible to correctly update CrawlDb from multiple segments.
  Introduce new status codes for temporary and permanent
  redirection.

* NUTCH-322 - Fix Fetcher to store redirected pages and to store
  protocol-level status. This also should fix NUTCH-273.

* Change default Fetcher behavior not to follow redirects immediately.
  Instead Fetcher will record redirects as new pages to be added to CrawlDb.
  This also partially addresses NUTCH-273.

* Detect and report when Generator creates 0-sized segments.

* Fix Injector to preserve already existing CrawlDatum if the seed list
  being injected also contains such URL.

This development was partially supported by SiteSell Inc.
Files Changed
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbMerger.java
MODIFY /lucene/nutch/trunk/src/test/org/apache/nutch/crawl/TestCrawlDbMerger.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/tools/compat/CrawlDbConverter.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/MapWritable.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/indexer/Indexer.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/LinkDb.java
MODIFY /lucene/nutch/trunk/src/test/org/apache/nutch/crawl/TestInjector.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/Generator.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/Injector.java
MODIFY /lucene/nutch/trunk/src/test/org/apache/nutch/crawl/TestGenerator.java
MODIFY /lucene/nutch/trunk/CHANGES.txt
MODIFY /lucene/nutch/trunk/src/test/org/apache/nutch/crawl/CrawlDBTestUtil.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/metadata/Nutch.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReader.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/Crawl.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/fetcher/Fetcher.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDatum.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDb.java
MODIFY /lucene/nutch/trunk/src/test/org/apache/nutch/fetcher/TestFetcher.java
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReducer.java
MODIFY /lucene/nutch/trunk/conf/nutch-default.xml
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/segment/SegmentReader.java
ADD /lucene/nutch/trunk/src/java/org/apache/nutch/util/LockUtil.java