cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-4998) Add hook for modifying configuration after cassandra.yaml is loaded
Date Mon, 03 Dec 2012 16:27:58 GMT


Sylvain Lebresne commented on CASSANDRA-4998:

I understand the need to allow configuring the instance by other mean than the yaml, but I'm
also not fully convinced by loading the yaml and then run some hook on the result. I'd rather
add a mean to directly provide a Config object but in that case skipping the yaml completely.
For instance, we could simply replace the current Config.setLoadYaml(boolean) by a Config.useConfig(Config),
we would completely remove the need for the yaml, which sounds more generally useful to me.
On top of which we could add a simple interface
interface ConfigurationLoader {
  Config loadConfig();
and we'd add a runtime flag so that one could add -Dcassandra.config.loader=<myLoaderClass>.
> Add hook for modifying configuration after cassandra.yaml is loaded
> -------------------------------------------------------------------
>                 Key: CASSANDRA-4998
>                 URL:
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Michael Guymon
>            Priority: Minor
>              Labels: patch
>         Attachments: 0001-Add-load-hook-for-updating-Config-before-processing.patch,
> When embedding Cassandra in an application, allow programmatic changes to Cassandra's
config by using a hook to modify the configuration after the YAML is loaded. 
> For this to work, a new YAML configuration needs to be added: after_load_hook_class.
If defined, it would be the FQN of a class that implements IAfterLoadHook. When DatabaseDescriptor
calls loadYAML(), before any processing of the Config happens, the after_load_hook_class is
checked and called if exists. Then processing of the config happens as normal.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message