cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r828076 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java
Date Wed, 21 Oct 2009 16:09:08 GMT
Author: jbellis
Date: Wed Oct 21 16:09:08 2009
New Revision: 828076

URL: http://svn.apache.org/viewvc?rev=828076&view=rev
Log:
ignore hidden files in commitlog directory (useful for users on OS X, which likes to add files
like ".DS_Store").  patch by gdusbabek; reviewed by jbellis for CASSANDRA-503

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java?rev=828076&r1=828075&r2=828076&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java Wed Oct
21 16:09:08 2009
@@ -44,7 +44,14 @@
     {
         String directory = DatabaseDescriptor.getLogFileLocation();
         File file = new File(directory);
-        return file.listFiles();
+        return file.listFiles(new FilenameFilter()
+        {
+            public boolean accept(File dir, String name)
+            {
+                // throw out anything that starts with dot.
+                return !name.matches("\\..*");
+            }
+        });
     }
 
     public static void doRecovery() throws IOException



Mime
View raw message