nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diaa Abdallah <diaa.abdelmon...@gmail.com>
Subject Clean up in case of error is not handled
Date Mon, 12 May 2014 22:08:42 GMT
Hi,
I noticed that nutch doesn't handle cleaning up (removing temp folders) in
case of error.
In the following classes temp directories are created but not removed when
there is an error:
1. Injector
2. CrawlDBReader
3. Deduplication
4. SegmentReader

For example in injector you find:
RunningJob mapJob = JobClient.runJob(sortJob);

which is not encapsulated in a try catch block like such:
    try
    {
    RunningJob mapJob = JobClient.runJob(sortJob);
    }catch(IOException e)
    {
        fs.delete(tempDir,true);
        throw e;
    }

Should I create a Jira ticket with patches for this?

Regards,
Diaa

Mime
View raw message