You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2010/07/28 00:43:14 UTC

svn commit: r979898 - /cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java

Author: jbellis
Date: Tue Jul 27 22:43:13 2010
New Revision: 979898

URL: http://svn.apache.org/viewvc?rev=979898&view=rev
Log:
minor cleanup of getRangeSlices.  patch by jbellis

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java?rev=979898&r1=979897&r2=979898&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java Tue Jul 27 22:43:13 2010
@@ -493,8 +493,6 @@ public class StorageProxy implements Sto
             logger.debug(command.toString());
         long startTime = System.nanoTime();
 
-        final String table = command.keyspace;
-
         List<AbstractBounds> ranges = getRestrictedRanges(command.range);
         // now scan until we have enough results
         List<Row> rows = new ArrayList<Row>(command.max_keys);
@@ -531,8 +529,8 @@ public class StorageProxy implements Sto
 
                 // collect replies and resolve according to consistency level
                 RangeSliceResponseResolver resolver = new RangeSliceResponseResolver(command.keyspace, liveEndpoints);
-                AbstractReplicationStrategy rs = StorageService.instance.getReplicationStrategy(table);
-                QuorumResponseHandler<List<Row>> handler = rs.getQuorumResponseHandler(resolver, consistency_level, table);
+                AbstractReplicationStrategy rs = StorageService.instance.getReplicationStrategy(command.keyspace);
+                QuorumResponseHandler<List<Row>> handler = rs.getQuorumResponseHandler(resolver, consistency_level, command.keyspace);
                 // TODO bail early if live endpoints can't satisfy requested
                 // consistency level
                 for (InetAddress endpoint : liveEndpoints) 
@@ -557,8 +555,7 @@ public class StorageProxy implements Sto
                 } 
                 catch (DigestMismatchException e) 
                 {
-                    throw new AssertionError(e); // no digests in range slices
-                                                 // yet
+                    throw new AssertionError(e); // no digests in range slices yet
                 }
             }