You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by Diaa Abdallah <di...@gmail.com> on 2014/05/22 23:43:19 UTC

Why is fetcher one big class?

Currently the fetcher class is a 1,500 line piece of code.

I'd like to suggest splitting it up to multiple files to improve
readability and maintainability of the code instead of this one big class
with many nested classes.

The classes are grouped anyways by the fetcher namespace so having them all
in one class doesn't have a benefit in my opinion.

Do you think it's a good idea to split up the fetcher class?

An example split would be:
Fetcher.java
FetchItem.java
FetchItemQueue.java
FetchItemQueues.java
QueueFeeder.java
FetcherThread.java

What do you think?

Regards,
Diaa

RE: Why is fetcher one big class?

Posted by Markus Jelsma <ma...@openindex.io>.
Hi Diaa,

It would be a very good idea to have these classes split and make them 
pluggable. My biggest annoyance was/is every method and member being private 
and not protected.

Cheers,
Markus


-----Original message-----
From: Diaa Abdallah<di...@gmail.com>
Sent: Thursday 22nd May 2014 23:43
To: dev@nutch.apache.org; user@nutch.apache.org
Subject: Why is fetcher one big class?

Currently the fetcher class is a 1,500 line piece of code.

Id like to suggest splitting it up to multiple files to improve readability and maintainability of the code instead of this one big class with many nested classes.

The classes are grouped anyways by the fetcher namespace so having them all in one class doesnt have a benefit in my opinion.

Do you think its a good idea to split up the fetcher class?

An example split would be:
Fetcher.java

FetchItem.java

FetchItemQueue.java

FetchItemQueues.java

QueueFeeder.java

FetcherThread.java

What do you think?

Regards,
Diaa



Re: Why is fetcher one big class?

Posted by anupamk <an...@usc.edu>.
Probably a good place to discuss this is the nutch-dev mailing list, not the
nutch-user mailing list.



--
View this message in context: http://lucene.472066.n3.nabble.com/Why-is-fetcher-one-big-class-tp4137758p4137773.html
Sent from the Nutch - User mailing list archive at Nabble.com.