cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1209622 - in /cassandra/trunk/src/java/org/apache/cassandra: config/DatabaseDescriptor.java db/DataTracker.java service/StorageService.java service/StorageServiceMBean.java
Date Fri, 02 Dec 2011 18:23:25 GMT
Author: brandonwilliams
Date: Fri Dec  2 18:23:24 2011
New Revision: 1209622

URL: http://svn.apache.org/viewvc?rev=1209622&view=rev
Log:
JMX-enabled incremental_backups setting.
Patch by brandonwilliams reviewed by jbellis for CASSANDRA-3561

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
    cassandra/trunk/src/java/org/apache/cassandra/db/DataTracker.java
    cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
    cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java

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=1209622&r1=1209621&r2=1209622&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java Fri Dec 
2 18:23:24 2011
@@ -996,11 +996,16 @@ public class DatabaseDescriptor
             throw new ConfigurationException("memtable_operations_in_millions must be less
than " + Long.MAX_VALUE / 1024 * 1024);
     }
 
-    public static boolean incrementalBackupsEnabled()
+    public static boolean isIncrementalBackupsEnabled()
     {
         return conf.incremental_backups;
     }
 
+    public static void setIncrementalBackupsEnabled(boolean value)
+    {
+        conf.incremental_backups = value;
+    }
+
     public static int getFlushQueueSize()
     {
         return conf.memtable_flush_queue_size;

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/DataTracker.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/DataTracker.java?rev=1209622&r1=1209621&r2=1209622&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/DataTracker.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/DataTracker.java Fri Dec  2 18:23:24
2011
@@ -163,7 +163,7 @@ public class DataTracker
 
     public void incrementallyBackup(final SSTableReader sstable)
     {
-        if (!DatabaseDescriptor.incrementalBackupsEnabled())
+        if (!DatabaseDescriptor.isIncrementalBackupsEnabled())
             return;
 
         Runnable runnable = new WrappedRunnable()

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java?rev=1209622&r1=1209621&r2=1209622&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java Fri Dec  2 18:23:24
2011
@@ -603,6 +603,16 @@ public class StorageService implements I
         DatabaseDescriptor.setCompactionThroughputMbPerSec(value);
     }
 
+    public boolean isIncrementalBackupsEnabled()
+    {
+        return DatabaseDescriptor.isIncrementalBackupsEnabled();
+    }
+
+    public void setIncrementalBackupsEnabled(boolean value)
+    {
+        DatabaseDescriptor.setIncrementalBackupsEnabled(value);
+    }
+
     private void setMode(Mode m, boolean log)
     {
         setMode(m, null, log);

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java?rev=1209622&r1=1209621&r2=1209622&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java Fri Dec
 2 18:23:24 2011
@@ -342,6 +342,9 @@ public interface StorageServiceMBean
     public int getCompactionThroughputMbPerSec();
     public void setCompactionThroughputMbPerSec(int value);
 
+    public boolean isIncrementalBackupsEnabled();
+    public void setIncrementalBackupsEnabled(boolean value);
+
     public void bulkLoad(String directory);
 
     public void rescheduleFailedDeletions();



Mime
View raw message