cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r998438 - in /cassandra/trunk: CHANGES.txt contrib/javautils/src/main/java/org/apache/cassandra/contrib/utils/service/CassandraServiceDataCleaner.java
Date Sat, 18 Sep 2010 10:38:50 GMT
Author: jbellis
Date: Sat Sep 18 10:38:50 2010
New Revision: 998438

URL: http://svn.apache.org/viewvc?rev=998438&view=rev
Log:
make contrib CassandraServiceDataCleaner recursive.  patch by B. Todd Burruss; reviewed by
jbellis for CASSANDRA-1509

Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/contrib/javautils/src/main/java/org/apache/cassandra/contrib/utils/service/CassandraServiceDataCleaner.java

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=998438&r1=998437&r2=998438&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Sat Sep 18 10:38:50 2010
@@ -76,6 +76,7 @@
    rapid succession (CASSANDRA-1477)
  * clean up of Streaming system (CASSANDRA-1503, 1504, 1506)
  * add options to configure Thrift socket keepalive and buffer sizes (CASSANDRA-1426)
+ * make contrib CassandraServiceDataCleaner recursive (CASSANDRA-1509)
 
 
 0.7-beta1

Modified: cassandra/trunk/contrib/javautils/src/main/java/org/apache/cassandra/contrib/utils/service/CassandraServiceDataCleaner.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/contrib/javautils/src/main/java/org/apache/cassandra/contrib/utils/service/CassandraServiceDataCleaner.java?rev=998438&r1=998437&r2=998438&view=diff
==============================================================================
--- cassandra/trunk/contrib/javautils/src/main/java/org/apache/cassandra/contrib/utils/service/CassandraServiceDataCleaner.java
(original)
+++ cassandra/trunk/contrib/javautils/src/main/java/org/apache/cassandra/contrib/utils/service/CassandraServiceDataCleaner.java
Sat Sep 18 10:38:50 2010
@@ -87,7 +87,7 @@ public class CassandraServiceDataCleaner
     }
 
     /**
-     * Removes all directory content from file the system
+     * Removes all directory content from the file system
      *
      * @param dir
      * @throws IOException
@@ -95,7 +95,9 @@ public class CassandraServiceDataCleaner
     private void cleanDir(String dir) throws IOException {
         File dirFile = new File(dir);
         if (dirFile.exists() && dirFile.isDirectory()) {
-            FileUtils.delete(dirFile.listFiles());
+            for (File f : dirFile.listFiles()) {
+                FileUtils.deleteRecursive(f);
+            }
         }
     }
 }



Mime
View raw message