cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r759002 - /incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java
Date Fri, 27 Mar 2009 02:45:03 GMT
Author: jbellis
Date: Fri Mar 27 02:45:02 2009
New Revision: 759002

URL: http://svn.apache.org/viewvc?rev=759002&view=rev
Log:
add check for OPP

Modified:
    incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java?rev=759002&r1=759001&r2=759002&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/service/CassandraServer.java Fri Mar
27 02:45:02 2009
@@ -57,6 +57,7 @@
 import org.apache.cassandra.utils.LogUtil;
 import org.apache.cassandra.io.DataInputBuffer;
 import org.apache.cassandra.io.DataOutputBuffer;
+import org.apache.cassandra.dht.OrderPreservingPartitioner;
 
 /**
  * Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com
)
@@ -819,6 +820,10 @@
 
     public List<String> get_range(String tablename, final String startkey) throws CassandraException
     {
+        if (!(StorageService.getPartitioner() instanceof OrderPreservingPartitioner)) {
+            throw new CassandraException("range queries may only be performed against an
order-preserving partitioner");
+        }
+
         logger_.debug("get_range");
 
         // send request



Mime
View raw message