cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [16/22] git commit: switch to ArrayList
Date Sat, 26 May 2012 05:25:46 GMT
switch to ArrayList


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

Branch: refs/heads/cassandra-1.0
Commit: 6ab02c5997f2eed760d371e9d9049fc01c4c5952
Parents: 99ad7d6
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri May 25 15:03:30 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri May 25 16:15:23 2012 -0500

----------------------------------------------------------------------
 .../compaction/SizeTieredCompactionStrategy.java   |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6ab02c59/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
index 15cc01d..380982f 100644
--- a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
@@ -56,7 +56,7 @@ public class SizeTieredCompactionStrategy extends AbstractCompactionStrategy
             return Collections.emptyList();
         }
 
-        List<AbstractCompactionTask> tasks = new LinkedList<AbstractCompactionTask>();
+        List<AbstractCompactionTask> tasks = new ArrayList<AbstractCompactionTask>();
         List<List<SSTableReader>> buckets = getBuckets(createSSTableAndLengthPairs(cfs.getSSTables()),
minSSTableSize);
         logger.debug("Compaction buckets are {}", buckets);
 
@@ -81,7 +81,7 @@ public class SizeTieredCompactionStrategy extends AbstractCompactionStrategy
 
     public List<AbstractCompactionTask> getMaximalTasks(final int gcBefore)
     {
-        List<AbstractCompactionTask> tasks = new LinkedList<AbstractCompactionTask>();
+        List<AbstractCompactionTask> tasks = new ArrayList<AbstractCompactionTask>();
         if (!cfs.getSSTables().isEmpty())
             tasks.add(new CompactionTask(cfs, cfs.getSSTables(), gcBefore));
         return tasks;
@@ -158,7 +158,7 @@ public class SizeTieredCompactionStrategy extends AbstractCompactionStrategy
             }
         }
 
-        return new LinkedList<List<T>>(buckets.keySet());
+        return new ArrayList<List<T>>(buckets.keySet());
     }
 
     private void updateEstimatedCompactionsByTasks(List<AbstractCompactionTask> tasks)


Mime
View raw message