[kepler-dev] any way to read configuration from a separate location?

Jianwu Wang jianwu at sdsc.edu
Thu Jan 14 14:04:39 PST 2010


Hi Chad,

     Thanks a lot for your explanation. I noticed the modified 
configurations will be saved at ~/KeplerData/modules/. Yet I always 
think these files are read and written by ConfigurationManager, forget 
users can also modify the file manually to do their customization.

     I tested it, and it works for me. Great!

Best wishes

Sincerely yours

Jianwu Wang
jianwu at sdsc.edu
http://users.sdsc.edu/~jianwu/

Scientific Workflow Automation Technologies (SWAT) Laboratory
San Diego Supercomputer Center
University of California, San Diego
San Diego, CA, U.S.A.


On 1/14/2010 12:27 PM, Chad Berkley wrote:
> Hey Jianwu,
>
> Here's the way ConfigurationManager works w.r.t. serialized files:  
> the files in the kepler/<module>/resources/configuration directory are 
> never written back to.  If you change a property at runtime, the 
> changed values are written to 
> ~/KeplerData/modules/<module>/configuration directory.  When the 
> ConfigurationManager goes to read a property, it looks in the 
> ~/KeplerData location first and if there is a property stored there, 
> it uses that instead of what is in the default configuration file.
>
> So, the configuration files in the installation directory should never 
> be written to.  If several users are sharing an installation, their 
> configurations can be stored in their ~/KeplerData directory without 
> affecting the other configurations.
>
> Programatically, ConfigurationManager just does this behind the 
> scenes, so if you do ConfigurationManager.getProperty(), it should 
> just work for whatever user is logged in.
>
> There a bunch of documentation here:
> https://kepler-project.org/developers/teams/framework/configuration-system-documentation 
>
>
> Let me know if you need other info.
>
> chad
>
> Jianwu Wang wrote:
>> Hi Chad,
>>
>>     If Kepler is shared by many users on one machine, common users 
>> may not have right to change the default configurations of Kepler 
>> modules. If a user provides his own configuration file, it there any 
>> way in a class to problematically invoke ConfigurationManager class 
>> to read it? Currently I didn't see such API in ConfigurationManager. 
>> All the current getProperty functions need 'module' argument. I image 
>> a API like getProperty(String filePath);
>>
>>    Thanks.
>>


More information about the Kepler-dev mailing list