cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject cassandra git commit: remove dead code
Date Wed, 18 Mar 2015 02:17:30 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 5a09483df -> 45259f095


remove dead code


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

Branch: refs/heads/trunk
Commit: 45259f0958b5b8b43af0d399bb71c24bf9b53322
Parents: 5a09483
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Tue Mar 17 22:17:21 2015 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Tue Mar 17 22:17:21 2015 -0400

----------------------------------------------------------------------
 .../org/apache/cassandra/db/DataTracker.java     | 18 +-----------------
 .../apache/cassandra/service/StorageService.java | 19 -------------------
 2 files changed, 1 insertion(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/45259f09/src/java/org/apache/cassandra/db/DataTracker.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/DataTracker.java b/src/java/org/apache/cassandra/db/DataTracker.java
index 19f027c..ca96a38 100644
--- a/src/java/org/apache/cassandra/db/DataTracker.java
+++ b/src/java/org/apache/cassandra/db/DataTracker.java
@@ -205,7 +205,7 @@ public class DataTracker
             if (Iterables.any(sstables, Predicates.in(currentView.compacting)))
                 return false;
 
-            Predicate live = new Predicate<SSTableReader>()
+            Predicate<SSTableReader> live = new Predicate<SSTableReader>()
             {
                 public boolean apply(SSTableReader sstable)
                 {
@@ -774,22 +774,6 @@ public class DataTracker
             return new View(liveMemtables, flushingMemtables, sstablesMap, compactingNew,
shadowed, intervalTree);
         }
 
-        private Set<SSTableReader> newSSTables(Collection<SSTableReader> oldSSTables,
Iterable<SSTableReader> replacements)
-        {
-            ImmutableSet<SSTableReader> oldSet = ImmutableSet.copyOf(oldSSTables);
-            int newSSTablesSize = sstables.size() - oldSSTables.size() + Iterables.size(replacements);
-            assert newSSTablesSize >= Iterables.size(replacements) : String.format("Incoherent
new size %d replacing %s by %s in %s", newSSTablesSize, oldSSTables, replacements, this);
-            Set<SSTableReader> newSSTables = new HashSet<>(newSSTablesSize);
-
-            for (SSTableReader sstable : sstables)
-                if (!oldSet.contains(sstable))
-                    newSSTables.add(sstable);
-
-            Iterables.addAll(newSSTables, replacements);
-            assert newSSTables.size() == newSSTablesSize : String.format("Expecting new size
of %d, got %d while replacing %s by %s in %s", newSSTablesSize, newSSTables.size(), oldSSTables,
replacements, this);
-            return ImmutableSet.copyOf(newSSTables);
-        }
-
         @Override
         public String toString()
         {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/45259f09/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 19e0a5a..b1f352c 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2600,7 +2600,6 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
      * @param endToken end token of the range
      * @return collection of ranges that match ring layout in TokenMetadata
      */
-    @SuppressWarnings("unchecked")
     @VisibleForTesting
     Collection<Range<Token>> createRepairRangeFrom(String beginToken, String
endToken)
     {
@@ -3631,24 +3630,6 @@ public class StorageService extends NotificationBroadcasterSupport
implements IE
         return finalOwnership;
     }
 
-
-    private boolean hasSameReplication(List<String> list)
-    {
-        if (list.isEmpty())
-            return false;
-
-        for (int i = 0; i < list.size() -1; i++)
-        {
-            KSMetaData ksm1 = Schema.instance.getKSMetaData(list.get(i));
-            KSMetaData ksm2 = Schema.instance.getKSMetaData(list.get(i + 1));
-            if (!ksm1.strategyClass.equals(ksm2.strategyClass) ||
-                    !Iterators.elementsEqual(ksm1.strategyOptions.entrySet().iterator(),
-                                             ksm2.strategyOptions.entrySet().iterator()))
-                return false;
-        }
-        return true;
-    }
-
     public List<String> getKeyspaces()
     {
         List<String> keyspaceNamesList = new ArrayList<>(Schema.instance.getKeyspaces());


Mime
View raw message