add check for OPP

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@759002 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Ellis 2009-03-27 02:45:02 +00:00
parent 4c194aa8d1
commit 09bc045e26
1 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,7 @@ import org.apache.cassandra.net.IAsyncResult;
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 class CassandraServer extends FacebookBase implements
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