cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r934505 - in /cassandra/trunk: ./ bin/ conf/ src/java/org/apache/cassandra/avro/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/thrift/
Date Thu, 15 Apr 2010 18:17:43 GMT
Author: jbellis
Date: Thu Apr 15 18:17:42 2010
New Revision: 934505

URL: http://svn.apache.org/viewvc?rev=934505&view=rev
Log:
simplify configuration file loading; rename to cassandra.xml
patch by jbellis; reviewed by eevans for CASSANDRA-971

Added:
    cassandra/trunk/conf/cassandra.xml
      - copied, changed from r934177, cassandra/trunk/conf/storage-conf.xml
    cassandra/trunk/conf/log4j-server.properties
      - copied, changed from r934177, cassandra/trunk/conf/log4j.properties
Removed:
    cassandra/trunk/conf/log4j.properties
    cassandra/trunk/conf/storage-conf.xml
Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/NEWS.txt
    cassandra/trunk/bin/cassandra
    cassandra/trunk/bin/cassandra.bat
    cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraDaemon.java
    cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
    cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraDaemon.java

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=934505&r1=934504&r2=934505&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Thu Apr 15 18:17:42 2010
@@ -2,12 +2,17 @@ dev
  * sstable versioning (CASSANDRA-389)
  * bitmask matching in SliceRange queries (CASSANDRA-764)
  * switched to slf4j logging (CASSANDRA-625)
- * drain method to flush memtables and purge commit log prior to shutdown. (CASSANDRA-880)
+ * drain method to flush memtables and purge commit log prior to shutdown. 
+   (CASSANDRA-880)
  * access levels for authentication/authorization (CASSANDRA-900)
  * add ReadRepairChance to CF definition (CASSANDRA-930)
  * fix heisenbug in system tests, especially common on OS X (CASSANDRA-944)
  * convert to byte[] keys internally and all public APIs (CASSANDRA-767)
  * ability to alter schema definitions on a live cluster (CASSANDRA-44)
+ * renamed configuration file to cassandra.xml, and log4j.properties to
+   log4j-server.properties, which must now be loaded from
+   the classpath (which is how our scripts in bin/ have always done it)
+   (CASSANDRA-971)
 
 
 0.6.1

Modified: cassandra/trunk/NEWS.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/NEWS.txt?rev=934505&r1=934504&r2=934505&view=diff
==============================================================================
--- cassandra/trunk/NEWS.txt (original)
+++ cassandra/trunk/NEWS.txt Thu Apr 15 18:17:42 2010
@@ -3,6 +3,8 @@
 
 Configuraton
 ------------
+    - Configuration file renamed to cassandra.xml and log4j.properties to
+      log4j-server.properties
     - The ThriftAddress and ThriftPort directives have been renamed to
       RPCAddress and RPCPort respectively.
     - The keyspaces defined in storage-conf.xml are ignored on startup as a

Modified: cassandra/trunk/bin/cassandra
URL: http://svn.apache.org/viewvc/cassandra/trunk/bin/cassandra?rev=934505&r1=934504&r2=934505&view=diff
==============================================================================
--- cassandra/trunk/bin/cassandra (original)
+++ cassandra/trunk/bin/cassandra Thu Apr 15 18:17:42 2010
@@ -104,7 +104,7 @@ launch_service()
     foreground=$2
     props=$3
     class=$4
-    cassandra_parms="-Dstorage-config=$CASSANDRA_CONF"
+    cassandra_parms="-Dlog4j.configuration=log4j-server.properties"
 
     if [ "x$pidpath" != "x" ]; then
         cassandra_parms="$cassandra_parms -Dcassandra-pidfile=$pidpath"

Modified: cassandra/trunk/bin/cassandra.bat
URL: http://svn.apache.org/viewvc/cassandra/trunk/bin/cassandra.bat?rev=934505&r1=934504&r2=934505&view=diff
==============================================================================
--- cassandra/trunk/bin/cassandra.bat (original)
+++ cassandra/trunk/bin/cassandra.bat Thu Apr 15 18:17:42 2010
@@ -44,7 +44,7 @@ set JAVA_OPTS=^
 REM ***** CLASSPATH library setting *****
 
 REM Ensure that any user defined CLASSPATH variables are not used on startup
-set CLASSPATH=
+set CLASSPATH=%CASSANDRA_HOME%\conf
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
 for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
@@ -57,7 +57,7 @@ goto :eof
 :okClasspath
 REM Include the build\classes directory so it works in development
 set CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes
-set CASSANDRA_PARAMS=-Dcassandra -Dstorage-config="%CASSANDRA_CONF%" -Dcassandra-foreground=yes
+set CASSANDRA_PARAMS=-Dcassandra -Dcassandra-foreground=yes
 goto runDaemon
 
 :runDaemon

Copied: cassandra/trunk/conf/cassandra.xml (from r934177, cassandra/trunk/conf/storage-conf.xml)
URL: http://svn.apache.org/viewvc/cassandra/trunk/conf/cassandra.xml?p2=cassandra/trunk/conf/cassandra.xml&p1=cassandra/trunk/conf/storage-conf.xml&r1=934177&r2=934505&rev=934505&view=diff
==============================================================================
    (empty)

Copied: cassandra/trunk/conf/log4j-server.properties (from r934177, cassandra/trunk/conf/log4j.properties)
URL: http://svn.apache.org/viewvc/cassandra/trunk/conf/log4j-server.properties?p2=cassandra/trunk/conf/log4j-server.properties&p1=cassandra/trunk/conf/log4j.properties&r1=934177&r2=934505&rev=934505&view=diff
==============================================================================
    (empty)

Modified: cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraDaemon.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraDaemon.java?rev=934505&r1=934504&r2=934505&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraDaemon.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraDaemon.java Thu Apr 15 18:17:42
2010
@@ -50,10 +50,6 @@ public class CassandraDaemon {
     
     private void setup() throws IOException
     {
-        // log4j
-        String file = System.getProperty("storage-config") + File.separator + "log4j.properties";
-        PropertyConfigurator.configure(file);
-
         listenPort = DatabaseDescriptor.getRpcPort();
         listenAddr = DatabaseDescriptor.getRpcAddress();
         

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=934505&r1=934504&r2=934505&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java Thu Apr 15
18:17:42 2010
@@ -33,7 +33,6 @@ import org.apache.cassandra.locator.Abst
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.utils.FBUtilities;
-import org.apache.cassandra.utils.UUIDGen;
 import org.apache.cassandra.utils.XMLUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -132,7 +131,7 @@ public class DatabaseDescriptor
 
     private static IAuthenticator authenticator = new AllowAllAuthenticator();
 
-    private final static String STORAGE_CONF_FILE = "storage-conf.xml";
+    private final static String STORAGE_CONF_FILE = "cassandra.xml";
 
     private static final UUID INITIAL_VERSION = new UUID(4096, 0); // has type nibble set
to 1, everything else to zero.
     private static UUID defsVersion = INITIAL_VERSION;
@@ -140,17 +139,13 @@ public class DatabaseDescriptor
     /**
      * Try the storage-config system property, and then inspect the classpath.
      */
-    static String getStorageConfigPath()
+    static String getStorageConfigPath() throws ConfigurationException
     {
-        String scp = System.getProperty("storage-config") + File.separator + STORAGE_CONF_FILE;
-        if (new File(scp).exists())
-            return scp;
-        // try the classpath
         ClassLoader loader = DatabaseDescriptor.class.getClassLoader();
         URL scpurl = loader.getResource(STORAGE_CONF_FILE);
         if (scpurl != null)
             return scpurl.getFile();
-        throw new RuntimeException("Cannot locate " + STORAGE_CONF_FILE + " via storage-config
system property or classpath lookup.");
+        throw new ConfigurationException("Cannot locate " + STORAGE_CONF_FILE + " on the
classpath");
     }
 
     private static int stageQueueSize_ = 4096;

Modified: cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraDaemon.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraDaemon.java?rev=934505&r1=934504&r2=934505&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraDaemon.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraDaemon.java Thu Apr 15 18:17:42
2010
@@ -60,10 +60,6 @@ public class CassandraDaemon
 
     private void setup() throws IOException, TTransportException
     {
-        // log4j
-        String file = System.getProperty("storage-config") + File.separator + "log4j.properties";
-        PropertyConfigurator.configure(file);
-
         int listenPort = DatabaseDescriptor.getRpcPort();
         InetAddress listenAddr = DatabaseDescriptor.getRpcAddress();
         



Mime
View raw message