corb2
corb2 copied to clipboard
Consolidate options for corb
Corb options initialization and loading is scattered in several classes making it difficult to extend corb with new feature such as multi host load balancer, options logging etc.
The plan is to merge the options and logic from TransfromOptions (will become obsolete), Manager, AbstractManager, AbstractTask (and other tasks) etc into Options.java class. Updated Options.java class should be flexible enough to hold the default options as well as custom properties.
We need to keep in mind, the ml-gradle corb task currently inspects the Options class to collect all of the option field names, in order to avoid having to hard-code and constantly update the CoRB options.
We will need to see if adding methods and other fields has an effect on how the task runs, and maybe add a convenience method that it (and others) could use to retrieve the list of options instead.
Ahh. I have started organizing this into two classes. Can we change ml-grade to introspect into Constants.java instead?
- Constants.java - This is an abstract class (does interface help?), which basically Options.java. This is excepted to contain all publicly configurable property names.
- Options.java - Consolidates properties, arguments, etc. Also, I am moving the helper methods that deals with from TransfromOptions, AbstractTask, Manager into this. End of the day, I think we should just keep one class named options.
After I push my changes later today to a separate branch (may be), you could quickly review compatibility issues with ml-gradle. This task has been proving to be a lot more difficult than I thought. I have started couple of weeks ago, but I couldn't get my thoughts organized until last night.