cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1053409 - in /cassandra/branches/cassandra-0.7: CHANGES.txt src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java
Date Tue, 28 Dec 2010 19:13:32 GMT
Author: jbellis
Date: Tue Dec 28 19:13:32 2010
New Revision: 1053409

URL: http://svn.apache.org/viewvc?rev=1053409&view=rev
Log:
allow [LOCAL|EACH]_QUORUM to be used with non-NetworkTopology Strategies
patch by jbellis

Modified:
    cassandra/branches/cassandra-0.7/CHANGES.txt
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1053409&r1=1053408&r2=1053409&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Tue Dec 28 19:13:32 2010
@@ -14,6 +14,8 @@ dev
  * count timeouts towards dynamicsnitch latencies (CASSANDRA-1905)
  * Expose index-building status in JMX + cli schema description
    (CASSANDRA-1871)
+ * allow [LOCAL|EACH]_QUORUM to be used with non-NetworkTopology 
+   replication Strategies
 
 
 0.7.0-rc3

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java?rev=1053409&r1=1053408&r2=1053409&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java
Tue Dec 28 19:13:32 2010
@@ -224,6 +224,10 @@ public abstract class AbstractReplicatio
 
     public QuorumResponseHandler getQuorumResponseHandler(IResponseResolver responseResolver,
ConsistencyLevel consistencyLevel)
     {
+        if (consistencyLevel.equals(ConsistencyLevel.LOCAL_QUORUM) || consistencyLevel.equals(ConsistencyLevel.EACH_QUORUM))
+        {
+            return new DatacenterQuorumResponseHandler(responseResolver, consistencyLevel,
table);
+        }
         return new QuorumResponseHandler(responseResolver, consistencyLevel, table);
     }
 

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java?rev=1053409&r1=1053408&r2=1053409&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java
Tue Dec 28 19:13:32 2010
@@ -164,18 +164,4 @@ public class NetworkTopologyStrategy ext
         }
         return super.getWriteResponseHandler(writeEndpoints, hintedEndpoints, consistency_level);
     }
-
-    /**
-     * This method will generate the WRH object and returns. If the Consistency
-     * level is LOCAL_QUORUM/EACH_QUORUM then it will return a DCQRH.
-     */
-    @Override
-    public QuorumResponseHandler getQuorumResponseHandler(IResponseResolver responseResolver,
ConsistencyLevel consistencyLevel)
-    {
-        if (consistencyLevel.equals(ConsistencyLevel.LOCAL_QUORUM) || consistencyLevel.equals(ConsistencyLevel.EACH_QUORUM))
-        {
-            return new DatacenterQuorumResponseHandler(responseResolver, consistencyLevel,
table);
-        }
-        return super.getQuorumResponseHandler(responseResolver, consistencyLevel);
-    }
 }



Mime
View raw message