cleanup
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0d2410e7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0d2410e7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0d2410e7 Branch: refs/heads/trunk Commit: 0d2410e78ae9ca03b102c562a8412507cdd35408 Parents: 0906b7c Author: Jonathan Ellis <jbel...@apache.org> Authored: Wed Jan 9 16:41:31 2013 -0600 Committer: Jonathan Ellis <jbel...@apache.org> Committed: Wed Jan 9 16:41:31 2013 -0600 ---------------------------------------------------------------------- .../apache/cassandra/thrift/ThriftValidation.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d2410e7/src/java/org/apache/cassandra/thrift/ThriftValidation.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/thrift/ThriftValidation.java b/src/java/org/apache/cassandra/thrift/ThriftValidation.java index de1ce56..f9733d6 100644 --- a/src/java/org/apache/cassandra/thrift/ThriftValidation.java +++ b/src/java/org/apache/cassandra/thrift/ThriftValidation.java @@ -486,7 +486,7 @@ public class ThriftValidation if ((range.start_key == null) == (range.start_token == null) || (range.end_key == null) == (range.end_token == null)) { - throw new InvalidRequestException("exactly one of {start key, end key} or {start token, end token} must be specified"); + throw new InvalidRequestException("exactly one each of {start key, start token} and {end key, end token} must be specified"); } // (key, token) is supported (for wide-row CFRR) but not (token, key) @@ -501,10 +501,10 @@ public class ThriftValidation Token endToken = p.getToken(range.end_key); if (startToken.compareTo(endToken) > 0 && !endToken.isMinimum(p)) { - if (p instanceof RandomPartitioner) - throw new InvalidRequestException("start key's md5 sorts after end key's md5. this is not allowed; you probably should not specify end key at all, under RandomPartitioner"); - else + if (p.preservesOrder()) throw new InvalidRequestException("start key must sort before (or equal to) finish key in your partitioner!"); + else + throw new InvalidRequestException("start key's md5 sorts after end key's md5. this is not allowed; you probably should not specify end key at all, under RandomPartitioner"); } } else if (range.end_token != null)