cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [3/4] git commit: cleanup
Date Wed, 05 Sep 2012 20:11:09 GMT
cleanup


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

Branch: refs/heads/trunk
Commit: ec1c64ab5a00fd9823e6cbb50adbca326669f7d9
Parents: 7c14044
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Sep 5 14:49:15 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Sep 5 14:49:27 2012 -0500

----------------------------------------------------------------------
 .../apache/cassandra/tools/StandaloneScrubber.java |   16 ++++++++------
 1 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec1c64ab/src/java/org/apache/cassandra/tools/StandaloneScrubber.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/StandaloneScrubber.java b/src/java/org/apache/cassandra/tools/StandaloneScrubber.java
index e3a15b9..10f9cd8 100644
--- a/src/java/org/apache/cassandra/tools/StandaloneScrubber.java
+++ b/src/java/org/apache/cassandra/tools/StandaloneScrubber.java
@@ -18,21 +18,23 @@
  */
 package org.apache.cassandra.tools;
 
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
 import java.util.*;
 
 import org.apache.commons.cli.*;
 
 import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.config.Schema;
-import org.apache.cassandra.db.*;
-import org.apache.cassandra.db.compaction.LeveledCompactionStrategy;
+import org.apache.cassandra.db.ColumnFamilyStore;
+import org.apache.cassandra.db.Directories;
+import org.apache.cassandra.db.Table;
 import org.apache.cassandra.db.compaction.LeveledManifest;
 import org.apache.cassandra.db.compaction.Scrubber;
 import org.apache.cassandra.io.sstable.*;
-import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.service.AbstractCassandraDaemon;
 import org.apache.cassandra.utils.OutputHandler;
+
 import static org.apache.cassandra.tools.BulkLoader.CmdLineOptions;
 
 public class StandaloneScrubber
@@ -103,7 +105,7 @@ public class StandaloneScrubber
                 cfs.directories.snapshotLeveledManifest(snapshotName);
                 System.out.println(String.format("Leveled manifest snapshotted into snapshot
%s", snapshotName));
 
-                int maxSizeInMB = (int)((((LeveledCompactionStrategy)cfs.getCompactionStrategy()).getMaxSSTableSize())
/ (1024L * 1024L));
+                int maxSizeInMB = (int)((cfs.getCompactionStrategy().getMaxSSTableSize())
/ (1024L * 1024L));
                 manifest = LeveledManifest.create(cfs, maxSizeInMB, sstables);
             }
 
@@ -130,7 +132,7 @@ public class StandaloneScrubber
 
                             List<SSTableReader> added = scrubber.getNewSSTable() ==
null
                                 ? Collections.<SSTableReader>emptyList()
-                                : Collections.<SSTableReader>singletonList(scrubber.getNewSSTable());
+                                : Collections.singletonList(scrubber.getNewSSTable());
                             manifest.replace(Collections.singletonList(sstable), added);
                         }
 
@@ -168,7 +170,7 @@ public class StandaloneScrubber
         System.out.println(String.format("Checking leveled manifest"));
         for (int i = 1; i <= manifest.getLevelCount(); ++i)
         {
-            List<SSTableReader> sstables = new ArrayList(manifest.getLevel(i));
+            List<SSTableReader> sstables = new ArrayList<SSTableReader>(manifest.getLevel(i));
             Collections.sort(sstables, SSTable.sstableComparator);
             if (sstables.isEmpty())
                 continue;


Mime
View raw message