cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject cassandra git commit: fix SSTableSizeSummer's file skipping logic
Date Tue, 12 Jul 2016 04:20:54 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk de73b5c7b -> 91392edbe


fix SSTableSizeSummer's file skipping logic


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/91392edb
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/91392edb
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/91392edb

Branch: refs/heads/trunk
Commit: 91392edbe812c722adcf35cf167bf400d25dc99a
Parents: de73b5c
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Tue Jul 12 00:20:40 2016 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Tue Jul 12 00:20:40 2016 -0400

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/Directories.java | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/91392edb/src/java/org/apache/cassandra/db/Directories.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Directories.java b/src/java/org/apache/cassandra/db/Directories.java
index 87527e8..a83c845 100644
--- a/src/java/org/apache/cassandra/db/Directories.java
+++ b/src/java/org/apache/cassandra/db/Directories.java
@@ -17,8 +17,6 @@
  */
 package org.apache.cassandra.db;
 
-import static com.google.common.collect.Sets.newHashSet;
-
 import java.io.File;
 import java.io.FileFilter;
 import java.io.IOError;
@@ -1014,14 +1012,14 @@ public class Directories
         }
 
         @Override
-        public boolean isAcceptable(Path file)
+        public boolean isAcceptable(Path path)
         {
-            String fileName = file.toFile().getName();
-            Pair<Descriptor, Component> pair = SSTable.tryComponentFromFilename(file.getParent().toFile(),
fileName);
+            File file = path.toFile();
+            Pair<Descriptor, Component> pair = SSTable.tryComponentFromFilename(path.getParent().toFile(),
file.getName());
             return pair != null
                     && pair.left.ksname.equals(metadata.ksName)
                     && pair.left.cfname.equals(metadata.cfName)
-                    && !toSkip.contains(fileName);
+                    && !toSkip.contains(file);
         }
     }
 }


Mime
View raw message