You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Jonathan Ellis <jb...@gmail.com> on 2009/11/16 16:54:45 UTC

Re: overriding directories from command line (was: 2 problems running Cassandra as a developper)

2009/11/16 Ted Zlatanov <tz...@lifelogs.com>:
> - allow a prefix here, e.g. /usr/local/cassandra instead of the default /var

-1 on this, I think it makes it too easy to shoot yourself in the foot.

> - allow passing the prefix and any of the directories from the command
>  line

-1 on this too; we've already made it easy to run different config
files from the same binaries --
http://wiki.apache.org/cassandra/RunningCassandra -- and
search-and-replace is easy enough.

> A general configuration facility to allow named variables and
> interpolation, similar to what the Apache Commons Configuration classes
> do for XML Property files
> (http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html),
> would be really nice too.

I'd rather move away from XML entirely to something like
http://jyaml.sourceforge.net/tutorial.html personally.

-Jonathan

Re: overriding directories from command line

Posted by Jonathan Ellis <jb...@gmail.com>.
in theory I am okay with that as long as it doesn't make maintaining
DatabaseDescriptor even more of a chore :)

2009/11/16 Ted Zlatanov <tz...@lifelogs.com>:
> On Mon, 16 Nov 2009 09:54:45 -0600 Jonathan Ellis <jb...@gmail.com> wrote:
>
>>> A general configuration facility to allow named variables and
>>> interpolation, similar to what the Apache Commons Configuration classes
>>> do for XML Property files
>>> (http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html),
>>> would be really nice too.
>
> JE> I'd rather move away from XML entirely to something like
> JE> http://jyaml.sourceforge.net/tutorial.html personally.
>
> Whatever is used, I'm suggesting that named variables and interpolation
> would be nice to have.  Do you think that's OK?  It would address all my
> points and probably make life easier for other people, too.
>
> Ted
>
>

Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
On Mon, 16 Nov 2009 09:54:45 -0600 Jonathan Ellis <jb...@gmail.com> wrote: 

>> A general configuration facility to allow named variables and
>> interpolation, similar to what the Apache Commons Configuration classes
>> do for XML Property files
>> (http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html),
>> would be really nice too.

JE> I'd rather move away from XML entirely to something like
JE> http://jyaml.sourceforge.net/tutorial.html personally.

Whatever is used, I'm suggesting that named variables and interpolation
would be nice to have.  Do you think that's OK?  It would address all my
points and probably make life easier for other people, too.

Ted


Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
On Thu, 19 Nov 2009 21:00:20 -0600 Jonathan Mischo <jm...@quagility.com> wrote: 

JM> On Nov 16, 2009, at 9:54 AM, Jonathan Ellis wrote:

>> I'd rather move away from XML entirely to something like
>> http://jyaml.sourceforge.net/tutorial.html personally.

JM> +10 on moving to YAML for config files, as it's FAR more legible

I'd rather not worry about the format.  This is why I suggest the
Apache Commons Configuration classes, which can be easily adapted to
support YAML or whatever format (or a JDBC read, etc.) in a uniform
way.

Ted


Re: overriding directories from command line (was: 2 problems running Cassandra as a developper)

Posted by Jonathan Mischo <jm...@quagility.com>.
+10 on moving to YAML for config files, as it's FAR more legible

On Nov 16, 2009, at 9:54 AM, Jonathan Ellis wrote:

> 2009/11/16 Ted Zlatanov <tz...@lifelogs.com>:
>> - allow a prefix here, e.g. /usr/local/cassandra instead of the  
>> default /var
>
> -1 on this, I think it makes it too easy to shoot yourself in the  
> foot.
>
>> - allow passing the prefix and any of the directories from the  
>> command
>>  line
>
> -1 on this too; we've already made it easy to run different config
> files from the same binaries --
> http://wiki.apache.org/cassandra/RunningCassandra -- and
> search-and-replace is easy enough.
>
>> A general configuration facility to allow named variables and
>> interpolation, similar to what the Apache Commons Configuration  
>> classes
>> do for XML Property files
>> (http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html 
>> ),
>> would be really nice too.
>
> I'd rather move away from XML entirely to something like
> http://jyaml.sourceforge.net/tutorial.html personally.
>
> -Jonathan
>


Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
I created http://issues.apache.org/jira/browse/CASSANDRA-743 as a wish
item to address just includes.  I can implement it for XML but it may be
better to make it a dependency of the YAML work in
http://issues.apache.org/jira/browse/CASSANDRA-671.

Ted

On Fri, 20 Nov 2009 15:11:27 -0600 (CST) "Stu Hood" <st...@rackspace.com> wrote: 

SH> I would vote for this one as well, if somebody wants to create the issue.
SH> -----Original Message-----
SH> From: "Ted Zlatanov" <tz...@lifelogs.com>
SH> Sent: Friday, November 20, 2009 3:01pm
SH> To: cassandra-dev@incubator.apache.org
SH> Subject: Re: overriding directories from command line

SH> On Mon, 16 Nov 2009 09:39:15 -0800 Anthony Molinaro <an...@alumni.caltech.edu> wrote: 

AM> If you are thinking about config file changes I'd like to request some
AM> sort of inclusion mechanism.   For instance, if you could had 2 keyspaces
AM> which you want to deploy on separate clusters in production but allow
AM> developers to install simultaneously on their development box, it would
AM> be great if you could do this by have 3 files. One of which has settings
AM> specific to the developer box (ie, memory settings), and one for each
AM> keyspace.  Then I could create 5 packages (RPM or deb)

AM> 1. one with the developer box settings which includes both keyspace configs
AM> 2. one with the production box settings for the cluster controlling keyspace1
AM> which includes keyspace1 config.
AM> 3. one with the production box settings for the cluster controlling keyspace2
AM> which includes keyspace2 config.
AM> 4. one with just the keyspace1 config.
AM> 5. one with just the keyspace2 config.

AM> I could do all this with a bunch of preprocessing at package build time,
AM> but that gets a little annoying.  And right now I just have the config
AM> copied and everytime I need to change a CF I need to change it in 3
AM> places (devel, qa, and prod configs).

AM> One great solution would be to support the loading of multiple configs
AM> from a directory.  You already see this a lot, for instance /etc/init.d
AM> or /etc/httpd/conf.d on most unix systems.

SH> This is actually my situation too.  I have to roll out slightly
SH> customized Cassandra instances to several colos and it's unpleasant to
SH> use cfengine or Puppet to edit XML files, so I'd rather have some simple
SH> inclusion and interpolation mechanism.


Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
On Fri, 20 Nov 2009 15:33:48 -0600 Jonathan Ellis <jb...@gmail.com> wrote: 

JE> I'm not familiar enough with that library to be able to predict
JE> success / failure here, but like I said last time, I am okay with
JE> trying anything that doesn't make maintaining DatabaseDescriptor even
JE> more of a chore.

OK, I'll submit a patch when I get to that point.  IMHO it is much
easier than the current setup, so I hope you'll like it.  Thanks for
your help.

Ted


Re: overriding directories from command line

Posted by Jonathan Ellis <jb...@gmail.com>.
I'm not familiar enough with that library to be able to predict
success / failure here, but like I said last time, I am okay with
trying anything that doesn't make maintaining DatabaseDescriptor even
more of a chore.

2009/11/20 Ted Zlatanov <tz...@lifelogs.com>:
> On Fri, 20 Nov 2009 15:11:27 -0600 (CST) "Stu Hood" <st...@rackspace.com> wrote:
>
> SH> I would vote for this one as well, if somebody wants to create the issue.
>
> I'll let Jonathan Ellis decide if my suggestion to use the Apache
> Commons Configuration classes makes sense.  I can't get to this until my
> auth work is done anyhow, since I'd rather not try to tackle too much at
> once.  But I do want to work on it after the auth code is out.
>
> Thanks
> Ted
>
>

Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
On Fri, 20 Nov 2009 15:11:27 -0600 (CST) "Stu Hood" <st...@rackspace.com> wrote: 

SH> I would vote for this one as well, if somebody wants to create the issue.

I'll let Jonathan Ellis decide if my suggestion to use the Apache
Commons Configuration classes makes sense.  I can't get to this until my
auth work is done anyhow, since I'd rather not try to tackle too much at
once.  But I do want to work on it after the auth code is out.

Thanks
Ted


Re: overriding directories from command line

Posted by Stu Hood <st...@rackspace.com>.
I would vote for this one as well, if somebody wants to create the issue.

-----Original Message-----
From: "Ted Zlatanov" <tz...@lifelogs.com>
Sent: Friday, November 20, 2009 3:01pm
To: cassandra-dev@incubator.apache.org
Subject: Re: overriding directories from command line

On Mon, 16 Nov 2009 09:39:15 -0800 Anthony Molinaro <an...@alumni.caltech.edu> wrote: 

AM>   If you are thinking about config file changes I'd like to request some
AM> sort of inclusion mechanism.   For instance, if you could had 2 keyspaces
AM> which you want to deploy on separate clusters in production but allow
AM> developers to install simultaneously on their development box, it would
AM> be great if you could do this by have 3 files. One of which has settings
AM> specific to the developer box (ie, memory settings), and one for each
AM> keyspace.  Then I could create 5 packages (RPM or deb)

AM>  1. one with the developer box settings which includes both keyspace configs
AM>  2. one with the production box settings for the cluster controlling keyspace1
AM>     which includes keyspace1 config.
AM>  3. one with the production box settings for the cluster controlling keyspace2
AM>     which includes keyspace2 config.
AM>  4. one with just the keyspace1 config.
AM>  5. one with just the keyspace2 config.

AM> I could do all this with a bunch of preprocessing at package build time,
AM> but that gets a little annoying.  And right now I just have the config
AM> copied and everytime I need to change a CF I need to change it in 3
AM> places (devel, qa, and prod configs).

AM> One great solution would be to support the loading of multiple configs
AM> from a directory.  You already see this a lot, for instance /etc/init.d
AM> or /etc/httpd/conf.d on most unix systems.

This is actually my situation too.  I have to roll out slightly
customized Cassandra instances to several colos and it's unpleasant to
use cfengine or Puppet to edit XML files, so I'd rather have some simple
inclusion and interpolation mechanism.

Ted




Re: overriding directories from command line

Posted by Ted Zlatanov <tz...@lifelogs.com>.
On Mon, 16 Nov 2009 09:39:15 -0800 Anthony Molinaro <an...@alumni.caltech.edu> wrote: 

AM>   If you are thinking about config file changes I'd like to request some
AM> sort of inclusion mechanism.   For instance, if you could had 2 keyspaces
AM> which you want to deploy on separate clusters in production but allow
AM> developers to install simultaneously on their development box, it would
AM> be great if you could do this by have 3 files. One of which has settings
AM> specific to the developer box (ie, memory settings), and one for each
AM> keyspace.  Then I could create 5 packages (RPM or deb)

AM>  1. one with the developer box settings which includes both keyspace configs
AM>  2. one with the production box settings for the cluster controlling keyspace1
AM>     which includes keyspace1 config.
AM>  3. one with the production box settings for the cluster controlling keyspace2
AM>     which includes keyspace2 config.
AM>  4. one with just the keyspace1 config.
AM>  5. one with just the keyspace2 config.

AM> I could do all this with a bunch of preprocessing at package build time,
AM> but that gets a little annoying.  And right now I just have the config
AM> copied and everytime I need to change a CF I need to change it in 3
AM> places (devel, qa, and prod configs).

AM> One great solution would be to support the loading of multiple configs
AM> from a directory.  You already see this a lot, for instance /etc/init.d
AM> or /etc/httpd/conf.d on most unix systems.

This is actually my situation too.  I have to roll out slightly
customized Cassandra instances to several colos and it's unpleasant to
use cfengine or Puppet to edit XML files, so I'd rather have some simple
inclusion and interpolation mechanism.

Ted


Re: overriding directories from command line (was: 2 problems running Cassandra as a developper)

Posted by Anthony Molinaro <an...@alumni.caltech.edu>.
Hi,

  If you are thinking about config file changes I'd like to request some
sort of inclusion mechanism.   For instance, if you could had 2 keyspaces
which you want to deploy on separate clusters in production but allow
developers to install simultaneously on their development box, it would
be great if you could do this by have 3 files. One of which has settings
specific to the developer box (ie, memory settings), and one for each
keyspace.  Then I could create 5 packages (RPM or deb)

 1. one with the developer box settings which includes both keyspace configs
 2. one with the production box settings for the cluster controlling keyspace1
    which includes keyspace1 config.
 3. one with the production box settings for the cluster controlling keyspace2
    which includes keyspace2 config.
 4. one with just the keyspace1 config.
 5. one with just the keyspace2 config.

I could do all this with a bunch of preprocessing at package build time,
but that gets a little annoying.  And right now I just have the config
copied and everytime I need to change a CF I need to change it in 3
places (devel, qa, and prod configs).

One great solution would be to support the loading of multiple configs
from a directory.  You already see this a lot, for instance /etc/init.d
or /etc/httpd/conf.d on most unix systems.

Anyway, just throwing it out there.

-Anthony

On Mon, Nov 16, 2009 at 09:54:45AM -0600, Jonathan Ellis wrote:
> 2009/11/16 Ted Zlatanov <tz...@lifelogs.com>:
> > - allow a prefix here, e.g. /usr/local/cassandra instead of the default /var
> 
> -1 on this, I think it makes it too easy to shoot yourself in the foot.
> 
> > - allow passing the prefix and any of the directories from the command
> >  line
> 
> -1 on this too; we've already made it easy to run different config
> files from the same binaries --
> http://wiki.apache.org/cassandra/RunningCassandra -- and
> search-and-replace is easy enough.
> 
> > A general configuration facility to allow named variables and
> > interpolation, similar to what the Apache Commons Configuration classes
> > do for XML Property files
> > (http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/XMLPropertiesConfiguration.html),
> > would be really nice too.
> 
> I'd rather move away from XML entirely to something like
> http://jyaml.sourceforge.net/tutorial.html personally.
> 
> -Jonathan

-- 
------------------------------------------------------------------------
Anthony Molinaro                           <an...@alumni.caltech.edu>