Share

Heritrix: Internet Archive Web Crawler

Tracker: Bugs

5 [patch] Signature change broke BucketQueueAssignmentPolicy - ID: 1219715
Last Update: Comment added ( karl-ia )

The change of QueueAssignmentPolicy.getClassKey's
method signature from CrawlURI to CandidateURI has
broken BucketQueueAssignmentPolicy, making it behave
like HostnameQueueAssignmentPolicy (it inherited from
that class).

A patch to correct the behaviour is attached.

Christian

PS: Wouldn't it make sense to change the abstract class
QueueAssignmentPolicy to an interface?


Christian Kohlschütter ( ck-heritrix ) - 2005-06-13 13:56

5

Closed

Fixed

Nobody/Anonymous

None

1.6.0

Public


Comments ( 3 )

Date: 2007-03-14 00:54
Sender: karl-ia


This issue is now discussed in the new JIRA tracker at
http://webteam.archive.org/jira/browse/HER-439 -- please add further
comments at that location.


Date: 2005-06-14 17:45
Sender: ck-heritrix

Logged In: YES
user_id=1220421

I must admit that it has been a bad idea from the beginning
to add a default value for the "maximumNumberOfKeys()"
invariant in the abstract QueueAssignmentPolicy class.

While it instantly made this feature available to all policy
implementations, there shouldn't be a default value at all.
Instead, we might define something like a int
UNBOUNDED_NUMBER_OF_KEYS = -1 constant in the interface,
which each implementation is allowed return.



Date: 2005-06-13 20:59
Sender: stack-sfProject Admin

Logged In: YES
user_id=924942

Thanks for patch. Sorry busted your assignment policy.
Below is commit.

Regards whether it should become an interface, how would you
suggest that the default behavior of maximumNumberOfKeys be
done -- each implementation would return
DEFAULT_MAX_NUMBER_OF_KEYS?

Fix for '[ 1219715 ] [patch] Signature change broke
BucketQueueAssignmentPolicy'Contributed by Christian
Kohlschuetter. Here is comment from Christian:

" The change of QueueAssignmentPolicy.getClassKey's
method signature from CrawlURI to CandidateURI has
broken BucketQueueAssignmentPolicy, making it behave
like HostnameQueueAssignmentPolicy (it inherited from
that class)"

*
src/java/org/archive/crawler/frontier/BucketQueueAssignmentPolicy.java
(getClassKey): Get host from ServerCache.



Attached File ( 1 )

Filename Description Download
BucketQueueAP.patch BucketQueueAssignmentPolicy patch Download

Changes ( 5 )

Field Old Value Date By
artifact_group_id None 2005-09-23 18:27 gojomo
status_id Open 2005-06-13 20:59 stack-sf
resolution_id None 2005-06-13 20:59 stack-sf
close_date - 2005-06-13 20:59 stack-sf
File Added 138203: BucketQueueAP.patch 2005-06-13 13:56 ck-heritrix