My personal take is that it's easier to edit the file than pass in parameters 
as lengthy as directory paths.  I also like the explicit path locations; 
there's no confusion.
 
-----Original Message-----
From: news [mailto:n...@ger.gmane.org] On Behalf Of Ted Zlatanov
Sent: November 16, 2009 10:28 AM
To: cassandra-dev@incubator.apache.org
Subject: overriding directories from command line (was: 2 problems running 
Cassandra as a developper)

The default config file has:

  <!--
   ~ Directories: Specify where Cassandra should store different data on
   ~ disk.  Keep the data disks and the CommitLog disks separate for best
   ~ performance
  -->
  <CommitLogDirectory>/var/lib/cassandra/commitlog</CommitLogDirectory>
  <DataFileDirectories>
      <DataFileDirectory>/var/lib/cassandra/data</DataFileDirectory>
  </DataFileDirectories>
  <CalloutLocation>/var/lib/cassandra/callouts</CalloutLocation>
  <BootstrapFileDirectory>/var/lib/cassandra/bootstrap</BootstrapFileDirectory>
  <StagingFileDirectory>/var/lib/cassandra/staging</StagingFileDirectory>

I'm wondering if it would make sense to:

- allow a prefix here, e.g. /usr/local/cassandra instead of the default /var

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

The first one makes modularizing Cassandra easier.  The second makes it
easier to set up multiple Cassandra instances with the same
configuration but different roots for experiments.

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.  The setup in DatabaseDescriptor.java may need
some work because of the nested properties, but in theory switching to
XMLPropertiesConfiguration should not be too painful.  I plan to use
XMLPropertiesConfiguration for my auth* work anyhow.

Does that make sense?
Ted

Reply via email to