nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Jelsma (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (NUTCH-1747) Use AtomicInteger as semaphore in Fetcher
Date Mon, 14 Apr 2014 11:39:15 GMT

     [ https://issues.apache.org/jira/browse/NUTCH-1747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Markus Jelsma updated NUTCH-1747:
---------------------------------

    Fix Version/s: 1.9
         Assignee: Julien Nioche

> Use AtomicInteger as semaphore in Fetcher
> -----------------------------------------
>
>                 Key: NUTCH-1747
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1747
>             Project: Nutch
>          Issue Type: Improvement
>          Components: fetcher
>    Affects Versions: 1.8
>            Reporter: Julien Nioche
>            Assignee: Julien Nioche
>            Priority: Minor
>             Fix For: 1.9
>
>         Attachments: NUTCH-1747-trunk.patch
>
>
> In Fetcher we currently use 
> Set<FetchItem>  inProgress = Collections.synchronizedSet(new HashSet<FetchItem>());
> as semaphore within the FetchItemQueues to keep track of the URLs being fetched and prevent
threads from pulling from them. It works fine but we could use AtomicIntegers instead as all
we need is the counts, not the contents.
> This change would have little impact on the performance but would make the code a bit
cleaner.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message