You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2014/08/22 16:17:09 UTC
[1/5] git commit: Improve error message from 7499
Repository: cassandra
Updated Branches:
refs/heads/trunk aad152d81 -> bc6308321
Improve error message from 7499
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fd8f5b9f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fd8f5b9f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fd8f5b9f
Branch: refs/heads/trunk
Commit: fd8f5b9f7e88bebf180c6142f772ba2808bc8b01
Parents: e4d5eda
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Fri Aug 22 16:02:43 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri Aug 22 16:03:38 2014 +0200
----------------------------------------------------------------------
src/java/org/apache/cassandra/cql3/statements/BatchStatement.java | 2 +-
.../apache/cassandra/cql3/statements/ModificationStatement.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd8f5b9f/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
index cbe3016..8a9a8f0 100644
--- a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
@@ -127,7 +127,7 @@ public class BatchStatement implements CQLStatement, MeasurableForPreparedCache
statement.validate(state);
if (hasConditions && statement.requiresRead())
- throw new InvalidRequestException("Operations using list indexes are not allowed with IF conditions");
+ throw new InvalidRequestException("Operations on lists requiring a read (setting by index and deletions by index or value) are not allowed with IF conditions");
}
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd8f5b9f/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index 99dd9d9..165dbc1 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@ -157,7 +157,7 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF
throw new InvalidRequestException("Cannot provide custom timestamp for conditional update");
if (requiresRead())
- throw new InvalidRequestException("Operations using list indexes are not allowed with IF conditions");
+ throw new InvalidRequestException("Operations on lists requiring a read (setting by index and deletions by index or value) are not allowed with IF conditions");
}
if (isCounter())
[2/5] git commit: Update java driver to 2.0.5 (for hadoop)
Posted by sl...@apache.org.
Update java driver to 2.0.5 (for hadoop)
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/200b8028
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/200b8028
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/200b8028
Branch: refs/heads/trunk
Commit: 200b802884041c3d154b61e5f8379837cd929b2e
Parents: fd8f5b9
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Fri Aug 22 16:11:44 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri Aug 22 16:11:44 2014 +0200
----------------------------------------------------------------------
build.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/200b8028/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 611345d..dd59bd2 100644
--- a/build.xml
+++ b/build.xml
@@ -387,7 +387,7 @@
<dependency groupId="edu.stanford.ppl" artifactId="snaptree" version="0.1" />
<dependency groupId="org.mindrot" artifactId="jbcrypt" version="0.3m" />
<dependency groupId="io.netty" artifactId="netty" version="3.6.6.Final" />
- <dependency groupId="com.datastax.cassandra" artifactId="cassandra-driver-core" version="2.0.4" />
+ <dependency groupId="com.datastax.cassandra" artifactId="cassandra-driver-core" version="2.0.5" />
<dependency groupId="net.sf.supercsv" artifactId="super-csv" version="2.1.0" />
</dependencyManagement>
<developer id="alakshman" name="Avinash Lakshman"/>
[3/5] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Posted by sl...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1.0
Conflicts:
build.xml
src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8da13437
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8da13437
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8da13437
Branch: refs/heads/trunk
Commit: 8da134377a04614a5343ccf3eb211e8c48dd90fa
Parents: a0923db 200b802
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Fri Aug 22 16:15:50 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri Aug 22 16:15:50 2014 +0200
----------------------------------------------------------------------
build.xml | 2 +-
.../cassandra/cql3/statements/BatchStatement.java | 2 +-
.../cql3/statements/ModificationStatement.java | 2 +-
tools/lib/cassandra-driver-core-2.0.4.jar | Bin 544025 -> 0 bytes
tools/lib/cassandra-driver-core-2.0.5.jar | Bin 0 -> 544552 bytes
5 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8da13437/build.xml
----------------------------------------------------------------------
diff --cc build.xml
index ae77274,dd59bd2..16ff03b
--- a/build.xml
+++ b/build.xml
@@@ -395,12 -384,10 +395,12 @@@
<dependency groupId="org.apache.cassandra" artifactId="cassandra-thrift" version="${version}" />
<dependency groupId="com.yammer.metrics" artifactId="metrics-core" version="2.2.0" />
<dependency groupId="com.addthis.metrics" artifactId="reporter-config" version="2.1.0" />
- <dependency groupId="edu.stanford.ppl" artifactId="snaptree" version="0.1" />
<dependency groupId="org.mindrot" artifactId="jbcrypt" version="0.3m" />
- <dependency groupId="io.netty" artifactId="netty" version="3.6.6.Final" />
+ <dependency groupId="io.airlift" artifactId="airline" version="0.6" />
+ <dependency groupId="io.netty" artifactId="netty-all" version="4.0.20.Final" />
+ <dependency groupId="com.google.code.findbugs" artifactId="jsr305" version="2.0.2" />
+ <dependency groupId="com.clearspring.analytics" artifactId="stream" version="2.5.2" />
- <dependency groupId="com.datastax.cassandra" artifactId="cassandra-driver-core" version="2.0.4" />
+ <dependency groupId="com.datastax.cassandra" artifactId="cassandra-driver-core" version="2.0.5" />
<dependency groupId="net.sf.supercsv" artifactId="super-csv" version="2.1.0" />
</dependencyManagement>
<developer id="alakshman" name="Avinash Lakshman"/>
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8da13437/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
index 90be914,8a9a8f0..49617ee
--- a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
@@@ -124,35 -124,10 +124,35 @@@ public class BatchStatement implements
if (timestampSet && statement.isTimestampSet())
throw new InvalidRequestException("Timestamp must be set either on BATCH or individual statements");
- statement.validate(state);
+ if (type == Type.COUNTER && !statement.isCounter())
+ throw new InvalidRequestException("Cannot include non-counter statement in a counter batch");
+
+ if (type == Type.LOGGED && statement.isCounter())
+ throw new InvalidRequestException("Cannot include a counter statement in a logged batch");
+
+ if (statement.isCounter())
+ hasCounters = true;
+ else
+ hasNonCounters = true;
+ }
+
+ if (hasCounters && hasNonCounters)
+ throw new InvalidRequestException("Counter and non-counter mutations cannot exist in the same batch");
- if (hasConditions && statement.requiresRead())
- throw new InvalidRequestException("Operations on lists requiring a read (setting by index and deletions by index or value) are not allowed with IF conditions");
+ if (hasConditions)
+ {
+ String ksName = null;
+ String cfName = null;
+ for (ModificationStatement stmt : statements)
+ {
+ if (ksName != null && (!stmt.keyspace().equals(ksName) || !stmt.columnFamily().equals(cfName)))
+ throw new InvalidRequestException("Batch with conditions cannot span multiple tables");
+ ksName = stmt.keyspace();
+ cfName = stmt.columnFamily();
+
+ if (stmt.requiresRead())
- throw new InvalidRequestException("Operations using list indexes are not allowed with IF conditions");
++ throw new InvalidRequestException("Operations on lists requiring a read (setting by index and deletions by index or value) are not allowed with IF conditions");
+ }
}
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8da13437/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index fef0e94,165dbc1..95ba41a
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@@ -150,17 -154,30 +150,17 @@@ public abstract class ModificationState
if (hasConditions())
{
if (attrs.isTimestampSet())
- throw new InvalidRequestException("Cannot provide custom timestamp for conditional update");
+ throw new InvalidRequestException("Cannot provide custom timestamp for conditional updates");
if (requiresRead())
- throw new InvalidRequestException("Operations using list indexes are not allowed with IF conditions");
+ throw new InvalidRequestException("Operations on lists requiring a read (setting by index and deletions by index or value) are not allowed with IF conditions");
}
- if (isCounter())
- {
- if (attrs.isTimestampSet() && !loggedCounterTimestamp)
- {
- logger.warn("Detected use of 'USING TIMESTAMP' in a counter UPDATE. This is invalid " +
- "because counters do not use timestamps, and the timestamp has been ignored. " +
- "Such queries will be rejected in Cassandra 2.1+ - please fix your queries before then.");
- loggedCounterTimestamp = true;
- }
+ if (isCounter() && attrs.isTimestampSet())
+ throw new InvalidRequestException("Cannot provide custom timestamp for counter updates");
- if (attrs.isTimeToLiveSet() && !loggedCounterTTL)
- {
- logger.warn("Detected use of 'USING TTL' in a counter UPDATE. This is invalid " +
- "because counter tables do not support TTL, and the TTL value has been ignored. " +
- "Such queries will be rejected in Cassandra 2.1+ - please fix your queries before then.");
- loggedCounterTTL = true;
- }
- }
+ if (isCounter() && attrs.isTimeToLiveSet())
+ throw new InvalidRequestException("Cannot provide custom TTL for counter updates");
}
public void addOperation(Operation op)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8da13437/tools/lib/cassandra-driver-core-2.0.5.jar
----------------------------------------------------------------------
diff --cc tools/lib/cassandra-driver-core-2.0.5.jar
index 0000000,0000000..260183e
new file mode 100644
Binary files differ
[5/5] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by sl...@apache.org.
Merge branch 'cassandra-2.1' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bc630832
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bc630832
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bc630832
Branch: refs/heads/trunk
Commit: bc6308321729ac613b3db912782ff257b43c568e
Parents: aad152d 94f1107
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Fri Aug 22 16:17:01 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri Aug 22 16:17:01 2014 +0200
----------------------------------------------------------------------
build.xml | 2 +-
tools/lib/cassandra-driver-core-2.0.4.jar | Bin 544025 -> 0 bytes
tools/lib/cassandra-driver-core-2.0.5.jar | Bin 0 -> 544552 bytes
3 files changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc630832/build.xml
----------------------------------------------------------------------
[4/5] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Posted by sl...@apache.org.
Merge branch 'cassandra-2.1.0' into cassandra-2.1
Conflicts:
src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/94f1107e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/94f1107e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/94f1107e
Branch: refs/heads/trunk
Commit: 94f1107eca2f5965d6fc55ccf718a23a2f4fe2b7
Parents: 854aab7 8da1343
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Fri Aug 22 16:16:46 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri Aug 22 16:16:46 2014 +0200
----------------------------------------------------------------------
build.xml | 2 +-
tools/lib/cassandra-driver-core-2.0.4.jar | Bin 544025 -> 0 bytes
tools/lib/cassandra-driver-core-2.0.5.jar | Bin 0 -> 544552 bytes
3 files changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/94f1107e/build.xml
----------------------------------------------------------------------
diff --cc build.xml
index d747bbc,16ff03b..e678d88
--- a/build.xml
+++ b/build.xml
@@@ -399,16 -400,12 +399,16 @@@
<dependency groupId="io.netty" artifactId="netty-all" version="4.0.20.Final" />
<dependency groupId="com.google.code.findbugs" artifactId="jsr305" version="2.0.2" />
<dependency groupId="com.clearspring.analytics" artifactId="stream" version="2.5.2" />
- <dependency groupId="com.datastax.cassandra" artifactId="cassandra-driver-core" version="2.0.4" />
+ <dependency groupId="com.datastax.cassandra" artifactId="cassandra-driver-core" version="2.0.5" />
<dependency groupId="net.sf.supercsv" artifactId="super-csv" version="2.1.0" />
+ <dependency groupId="net.ju-n.compile-command-annotations" artifactId="compile-command-annotations" version="1.2.0" />
</dependencyManagement>
<developer id="alakshman" name="Avinash Lakshman"/>
- <developer id="antelder" name="Anthony Elder"/>
+ <developer id="aleksey" name="Aleksey Yeschenko"/>
+ <developer id="amorton" name="Aaron Morton"/>
+ <developer id="benedict" name="Benedict Elliott Smith"/>
<developer id="brandonwilliams" name="Brandon Williams"/>
+ <developer id="dbrosius" name="David Brosius"/>
<developer id="eevans" name="Eric Evans"/>
<developer id="gdusbabek" name="Gary Dusbabek"/>
<developer id="goffinet" name="Chris Goffinet"/>