cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r802092 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
Date Fri, 07 Aug 2009 17:03:32 GMT
Author: jbellis
Date: Fri Aug  7 17:03:32 2009
New Revision: 802092

URL: http://svn.apache.org/viewvc?rev=802092&view=rev
Log:
human-readable error for bad CommitLogSyncDelay.
patch by jbellis; reviewed by Eric Evans for CASSANDRA-349

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=802092&r1=802091&r2=802092&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
(original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
Fri Aug  7 17:03:32 2009
@@ -144,9 +144,16 @@
                 // Bool.valueOf will silently assume false for values it doesn't recognize
                 throw new ConfigurationException("Unrecognized value for CommitLogSync. 
Use 'true' or 'false'.");
             }
-            commitLogSync_ = Boolean.valueOf(xmlUtils.getNodeValue("/Storage/CommitLogSync"));
+            commitLogSync_ = Boolean.valueOf(syncRaw);
 
-            commitLogSyncDelay_ = Integer.valueOf(xmlUtils.getNodeValue("/Storage/CommitLogSyncDelay"));
+            try
+            {
+                commitLogSyncDelay_ = Integer.valueOf(xmlUtils.getNodeValue("/Storage/CommitLogSyncDelay"));
+            }
+            catch (Exception e)
+            {
+                throw new ConfigurationException("Unrecognized value for CommitLogSyncDelay.
 Integer expected.");
+            }
 
             /* Hashing strategy */
             String partitionerClassName = xmlUtils.getNodeValue("/Storage/Partitioner");



Mime
View raw message