cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r992317 - in /cassandra/trunk: CHANGES.txt src/java/org/apache/cassandra/config/Converter.java
Date Fri, 03 Sep 2010 14:56:33 GMT
Author: jbellis
Date: Fri Sep  3 14:56:32 2010
New Revision: 992317

URL: http://svn.apache.org/viewvc?rev=992317&view=rev
Log:
use correct default name when converting to yaml.  patch by jbellis; reviewed by Jon Hermes
for CASSANDRA-1419

Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/src/java/org/apache/cassandra/config/Converter.java

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=992317&r1=992316&r2=992317&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Fri Sep  3 14:56:32 2010
@@ -41,6 +41,7 @@ dev
  * include secondary indexes during schema migrations (CASSANDRA-1406)
  * fix commitlog header race during schema change (CASSANDRA-1435)
  * fix ColumnFamilyStoreMBeanIterator to use new type name (CASSANDRA-1433)
+ * correct filename generated by xml->yaml converter (CASSANDRA-1419)
 
 
 0.7-beta1

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/Converter.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/Converter.java?rev=992317&r1=992316&r2=992317&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/Converter.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/Converter.java Fri Sep  3 14:56:32
2010
@@ -333,26 +333,22 @@ public class Converter
     {
         try
         {
-            String configname;
+            String oldConfigName;
+
             ClassLoader loader = Converter.class.getClassLoader();
             URL scpurl = loader.getResource(PREVIOUS_CONF_FILE);
             if (scpurl == null)
                 scpurl = loader.getResource("storage-conf.xml");
             
             if (scpurl != null)
-                configname = scpurl.getFile();
+                oldConfigName = scpurl.getFile();
             else 
                 throw new ConfigurationException("Error finding previous configuration file.");
+            System.out.println("Found previous configuration: " + oldConfigName);
+            loadPreviousConfig(oldConfigName);
             
-            System.out.println("Found previous configuration: " + configname);
-            
-            loadPreviousConfig(configname);
-            
-            configname = configname.replace("cassandra.xml", "cassandra.yaml");
-            
-            System.out.println("Creating new configuration: " + configname);
-            
-            dumpConfig(configname);
+            System.out.println("Creating new configuration cassandra.yaml");
+            dumpConfig("cassandra.yaml");
         } 
         catch (IOException e)
         {



Mime
View raw message