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

Chad Berkley berkley at nceas.ucsb.edu
Fri Jan 15 09:42:54 PST 2010


Great!  Let me know if you find the documentation lacking in any way. 
I've been meaning to go in there and edit it for a while and haven't 
gotten there.  That having been said, it should be at least mostly 
complete.  Glad it worked.

chad


Jianwu Wang wrote:
> 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