tflobbe / solrmeter

Stress test tool for Apache Solr
70 stars 36 forks source link

Refactor Executors, QueryOperation and Extractors #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Analyzing current Executors i could see that there are too many dependencies 
with several Extractors which in the end are not used by the Executor but only 
passed as parameters to the QueryOperation object that uses them to generate 
the query.

I could see here too much coupling and too many responsibilities assigned to 
the QueryOperation class which creates a query and executes it.

I refactored the current code and i introduced a concept of QueryGenerator (i'm 
happy to go for a different names if you like), which actually is the one that 
requires Extractors as collaborators and generates a query.

With this change i've been able to remove code and depedencies from Executors 
which now require a QueryGenerator object (automatically injected by Guice).

I believe that these changes will simplify future improvements. Please check 
them out if you are interested and let me know :)

edo

Original issue reported on code.google.com by edoardo.tosca on 10 Nov 2011 at 12:10

GoogleCodeExporter commented 9 years ago
Here the patch for trunk (revision 278)

Original comment by edoardo.tosca on 10 Nov 2011 at 12:11

Attachments:

GoogleCodeExporter commented 9 years ago
Here the patch for trunk (revision 280)

Original comment by edoardo.tosca on 10 Nov 2011 at 12:37

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks Edoardo, I'll take a look to this refactor.

Original comment by tflo...@gmail.com on 14 Nov 2011 at 11:46

GoogleCodeExporter commented 9 years ago
any chance to look at the patch?

Original comment by edoardo.tosca on 30 Nov 2011 at 10:37

GoogleCodeExporter commented 9 years ago
This refactor looks very good, I just committed it to the trunk, revision 282

Original comment by tflo...@gmail.com on 1 Dec 2011 at 12:36

GoogleCodeExporter commented 9 years ago

Original comment by tflo...@gmail.com on 1 Dec 2011 at 12:36

GoogleCodeExporter commented 9 years ago
great! Thank you!

Original comment by edoardo.tosca on 1 Dec 2011 at 12:48