incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Zlatanov <...@lifelogs.com>
Subject overriding directories from command line (was: 2 problems running Cassandra as a developper)
Date Mon, 16 Nov 2009 15:27:50 GMT
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


Mime
View raw message