You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jm...@apache.org on 2014/08/11 23:37:16 UTC
[01/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.1 334969fdd -> 70d9f895d
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/bf4c76e4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bf4c76e4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bf4c76e4
Branch: refs/heads/cassandra-2.1
Commit: bf4c76e476ac3ba7917ca0c670bede21be72cd79
Parents: f21a7ac 3612b84
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Tue Aug 5 14:48:09 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Tue Aug 5 14:48:09 2014 +0200
----------------------------------------------------------------------
test/unit/org/apache/cassandra/cql3/CQLTester.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[07/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/a4d3da31
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a4d3da31
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a4d3da31
Branch: refs/heads/cassandra-2.1
Commit: a4d3da319ca493a8860d25db65914944b2be7ffa
Parents: 8082010 fa8e515
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Tue Aug 5 18:02:34 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Tue Aug 5 18:02:34 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
src/java/org/apache/cassandra/cql3/statements/Selection.java | 5 ++++-
src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java | 5 +++++
3 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4d3da31/CHANGES.txt
----------------------------------------------------------------------
[09/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/f64a113e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f64a113e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f64a113e
Branch: refs/heads/cassandra-2.1
Commit: f64a113e1bff705e2264ae00defdfe82ba3992c7
Parents: a4d3da3 1e0b4c5
Author: Brandon Williams <br...@apache.org>
Authored: Tue Aug 5 14:00:11 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Tue Aug 5 14:00:11 2014 -0500
----------------------------------------------------------------------
.../cassandra/locator/SimpleSeedProvider.java | 27 ++++++++++++++++----
1 file changed, 22 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
[03/50] [abbrv] git commit: ninja add benedict to committers
Posted by jm...@apache.org.
ninja add benedict to committers
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6a8d978f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6a8d978f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6a8d978f
Branch: refs/heads/cassandra-2.1
Commit: 6a8d978f394ee47ef0bccc1f685fda3763054053
Parents: 4f778d2
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Tue Aug 5 15:22:11 2014 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Tue Aug 5 15:22:11 2014 +0100
----------------------------------------------------------------------
build.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/6a8d978f/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index b1355d2..2b2a3c8 100644
--- a/build.xml
+++ b/build.xml
@@ -405,6 +405,7 @@
</dependencyManagement>
<developer id="alakshman" name="Avinash Lakshman"/>
<developer id="antelder" name="Anthony Elder"/>
+ <developer id="benedict" name="Benedict Elliott Smith"/>
<developer id="brandonwilliams" name="Brandon Williams"/>
<developer id="eevans" name="Eric Evans"/>
<developer id="gdusbabek" name="Gary Dusbabek"/>
[34/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/46193d75
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/46193d75
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/46193d75
Branch: refs/heads/cassandra-2.1
Commit: 46193d7548aefb2f7c7b33597b282c0361e204fc
Parents: 17055bf ddda541
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Thu Aug 7 16:22:52 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Aug 7 16:22:52 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/tools/SSTableExport.java | 132 ++++++++++---------
2 files changed, 74 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/46193d75/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/46193d75/src/java/org/apache/cassandra/tools/SSTableExport.java
----------------------------------------------------------------------
[02/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/277ca64c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/277ca64c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/277ca64c
Branch: refs/heads/cassandra-2.1
Commit: 277ca64c7e421e0bd77c4efb393d27a147d7c19d
Parents: bf4c76e 622ae50
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Tue Aug 5 15:48:02 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Tue Aug 5 15:48:02 2014 +0200
----------------------------------------------------------------------
src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
[24/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/e607d944
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e607d944
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e607d944
Branch: refs/heads/cassandra-2.1
Commit: e607d944d702e745f9bd2739bb1fc1b307fcbf2b
Parents: b8b3776 54d2e8e
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Aug 6 13:29:53 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Wed Aug 6 13:29:53 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 55 ++------------------
.../cassandra/config/DatabaseDescriptor.java | 2 +-
.../cassandra/db/filter/SliceQueryFilter.java | 4 +-
3 files changed, 8 insertions(+), 53 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e607d944/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e607d944/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
[19/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/487de3da
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/487de3da
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/487de3da
Branch: refs/heads/cassandra-2.1
Commit: 487de3daf7340d3e3f8b6e68255e8d1de1466608
Parents: 94cfec8 8822c96
Author: Brandon Williams <br...@apache.org>
Authored: Wed Aug 6 09:23:12 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Aug 6 09:23:12 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
NEWS.txt | 5 +-
.../hadoop/cql3/CqlPagingInputFormat.java | 85 --
.../hadoop/cql3/CqlPagingRecordReader.java | 800 -------------------
4 files changed, 5 insertions(+), 886 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/487de3da/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/487de3da/NEWS.txt
----------------------------------------------------------------------
[15/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/740bcb54
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/740bcb54
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/740bcb54
Branch: refs/heads/cassandra-2.1
Commit: 740bcb540f2d5a540dcef379dfd7cd50d8916505
Parents: 4a69811 97e74ee
Author: Brandon Williams <br...@apache.org>
Authored: Tue Aug 5 17:55:01 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Tue Aug 5 17:55:01 2014 -0500
----------------------------------------------------------------------
conf/cassandra-env.sh | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
[39/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/32358d64
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/32358d64
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/32358d64
Branch: refs/heads/cassandra-2.1
Commit: 32358d646d7fc214a1bc16d58ca5e5d5b025bda6
Parents: f92ae20 756c85e
Author: Joshua McKenzie <Jo...@datastax.com>
Authored: Thu Aug 7 12:06:52 2014 -0500
Committer: Joshua McKenzie <Jo...@datastax.com>
Committed: Thu Aug 7 12:06:52 2014 -0500
----------------------------------------------------------------------
.../apache/cassandra/config/YamlConfigurationLoader.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/32358d64/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
----------------------------------------------------------------------
[46/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/d2b24def
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d2b24def
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d2b24def
Branch: refs/heads/cassandra-2.1
Commit: d2b24deffe7dfc1a7e5138641f44e5348dedef1d
Parents: 5205ce6 1fee615
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Mon Aug 11 13:46:07 2014 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Mon Aug 11 13:46:07 2014 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
src/java/org/apache/cassandra/thrift/CassandraServer.java | 2 +-
test/system/test_thrift_server.py | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2b24def/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2b24def/src/java/org/apache/cassandra/thrift/CassandraServer.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2b24def/test/system/test_thrift_server.py
----------------------------------------------------------------------
[10/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/7dd320c9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7dd320c9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7dd320c9
Branch: refs/heads/cassandra-2.1
Commit: 7dd320c9e764a980099e8fe247a4dcb3ada4a925
Parents: f64a113 7e71d01
Author: Brandon Williams <br...@apache.org>
Authored: Tue Aug 5 14:02:21 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Tue Aug 5 14:02:21 2014 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[27/50] [abbrv] git commit: fix build
Posted by jm...@apache.org.
fix build
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a1924ba3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a1924ba3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a1924ba3
Branch: refs/heads/cassandra-2.1
Commit: a1924ba3946c9f7f0cc67ef119768b2d9251bc63
Parents: 821a2fe
Author: Brandon Williams <br...@apache.org>
Authored: Wed Aug 6 14:27:20 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Aug 6 14:27:20 2014 -0500
----------------------------------------------------------------------
.../apache/cassandra/hadoop/cql3/CqlConfigHelper.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1924ba3/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java
index b375ce2..7a5fd47 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java
@@ -422,15 +422,15 @@ public class CqlConfigHelper
poolingOptions.setCoreConnectionsPerHost(HostDistance.LOCAL, coreConnections.get());
if (maxConnections.isPresent())
poolingOptions.setMaxConnectionsPerHost(HostDistance.LOCAL, maxConnections.get());
- if (maxSimultaneousRequests.isPresent())
- poolingOptions.setMaxSimultaneousRequestsPerConnectionThreshold(HostDistance.LOCAL, maxSimultaneousRequests.get());
if (minSimultaneousRequests.isPresent())
poolingOptions.setMinSimultaneousRequestsPerConnectionThreshold(HostDistance.LOCAL, minSimultaneousRequests.get());
+ if (maxSimultaneousRequests.isPresent())
+ poolingOptions.setMaxSimultaneousRequestsPerConnectionThreshold(HostDistance.LOCAL, maxSimultaneousRequests.get());
poolingOptions.setCoreConnectionsPerHost(HostDistance.REMOTE, 0)
.setMaxConnectionsPerHost(HostDistance.REMOTE, 0)
- .setMaxSimultaneousRequestsPerConnectionThreshold(HostDistance.REMOTE, 0)
- .setMinSimultaneousRequestsPerConnectionThreshold(HostDistance.REMOTE, 0);
+ .setMinSimultaneousRequestsPerConnectionThreshold(HostDistance.REMOTE, 0)
+ .setMaxSimultaneousRequestsPerConnectionThreshold(HostDistance.REMOTE, 0);
return poolingOptions;
}
@@ -519,6 +519,11 @@ public class CqlConfigHelper
}
@Override
+ public void onSuspected(Host host)
+ {
+ }
+
+ @Override
public HostDistance distance(Host host)
{
if (host.getAddress().getHostName().equals(stickHost))
[38/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/f92ae20a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f92ae20a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f92ae20a
Branch: refs/heads/cassandra-2.1
Commit: f92ae20a84cc22d303234a9c8847ba1e8fa0b6d7
Parents: d1e41c0 319eeab
Author: Brandon Williams <br...@apache.org>
Authored: Thu Aug 7 11:57:22 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Aug 7 11:57:22 2014 -0500
----------------------------------------------------------------------
.../cassandra/pig/CqlTableDataTypeTest.java | 39 ++-----------
.../org/apache/cassandra/pig/CqlTableTest.java | 61 ++++++++------------
.../cassandra/pig/ThriftColumnFamilyTest.java | 14 -----
3 files changed, 28 insertions(+), 86 deletions(-)
----------------------------------------------------------------------
[48/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/755d345f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/755d345f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/755d345f
Branch: refs/heads/cassandra-2.1
Commit: 755d345fefafa1384e26269e6381e5b517216a42
Parents: c7e191b 0c6078a
Author: Brandon Williams <br...@apache.org>
Authored: Mon Aug 11 13:03:47 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Mon Aug 11 13:03:47 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 4 +
.../cql3/statements/AlterTableStatement.java | 23 +++-
.../cassandra/hadoop/cql3/CqlConfigHelper.java | 2 +-
.../cassandra/hadoop/cql3/CqlRecordReader.java | 138 ++++++++++++++++++-
.../cassandra/hadoop/pig/CqlNativeStorage.java | 15 +-
.../apache/cassandra/hadoop/pig/CqlStorage.java | 4 +-
.../apache/cassandra/cql3/AlterTableTest.java | 86 ++++++++++++
7 files changed, 260 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/755d345f/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/755d345f/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/755d345f/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/755d345f/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
----------------------------------------------------------------------
[23/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/b8b37760
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b8b37760
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b8b37760
Branch: refs/heads/cassandra-2.1
Commit: b8b377603d18b993fd0ba96959dc13c99e88959d
Parents: 862d7f9 821a2fe
Author: Brandon Williams <br...@apache.org>
Authored: Wed Aug 6 13:21:58 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Aug 6 13:21:58 2014 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[16/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/f7fab28e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f7fab28e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f7fab28e
Branch: refs/heads/cassandra-2.1
Commit: f7fab28ecb235faf2ba807720cdca091be7461d0
Parents: 740bcb5 40a1cd3
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Wed Aug 6 11:11:37 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Wed Aug 6 11:11:37 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../AbstractCompoundCellNameType.java | 21 +++++++++++-------
.../org/apache/cassandra/cql3/CQLTester.java | 22 +++++++++++++++++++
.../apache/cassandra/cql3/UserTypesTest.java | 23 ++++++++++++++++++++
4 files changed, 59 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f7fab28e/CHANGES.txt
----------------------------------------------------------------------
[36/50] [abbrv] git commit: merge
Posted by jm...@apache.org.
merge
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/56141aee
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/56141aee
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/56141aee
Branch: refs/heads/cassandra-2.1
Commit: 56141aee857eb81109531b92029bd827e6976d76
Parents: f95b40c 46193d7
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Aug 7 09:27:54 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Aug 7 09:27:54 2014 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[30/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/fe30c2c2
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fe30c2c2
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fe30c2c2
Branch: refs/heads/cassandra-2.1
Commit: fe30c2c23b7b12c3b3a9a4bb246362922193bf95
Parents: 87dc93e 368b63f
Author: Brandon Williams <br...@apache.org>
Authored: Wed Aug 6 14:28:17 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Aug 6 14:28:17 2014 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[47/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/c7e191ba
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c7e191ba
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c7e191ba
Branch: refs/heads/cassandra-2.1
Commit: c7e191ba128841b3e67a168e0d0fb97ca2eed2dd
Parents: d2b24de 50ee3a7
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Mon Aug 11 17:33:47 2014 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Mon Aug 11 17:33:47 2014 +0300
----------------------------------------------------------------------
----------------------------------------------------------------------
[45/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/5205ce66
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5205ce66
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5205ce66
Branch: refs/heads/cassandra-2.1
Commit: 5205ce669fd43560cd8c6cf4f9c13b665fb34121
Parents: 25411bf f2f2d47
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Mon Aug 11 01:08:53 2014 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Mon Aug 11 01:08:53 2014 +0300
----------------------------------------------------------------------
CHANGES.txt | 4 +-
NEWS.txt | 5 +-
build.xml | 2 +-
debian/changelog | 6 ++
.../cql3/functions/BytesConversionFcts.java | 22 ++++-
.../cassandra/cql3/functions/FunctionCall.java | 23 ++++-
.../apache/cassandra/db/RangeTombstoneList.java | 79 +++++++++++++++---
.../cassandra/hadoop/pig/CqlNativeStorage.java | 17 ++++
test/system/test_thrift_server.py | 49 +++++------
.../cassandra/db/RangeTombstoneListTest.java | 88 ++++++++++++++++++++
10 files changed, 247 insertions(+), 48 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5205ce66/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5205ce66/NEWS.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5205ce66/build.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5205ce66/src/java/org/apache/cassandra/cql3/functions/FunctionCall.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5205ce66/test/system/test_thrift_server.py
----------------------------------------------------------------------
[21/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/beeca7d2
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/beeca7d2
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/beeca7d2
Branch: refs/heads/cassandra-2.1
Commit: beeca7d24c44398072325af76a5d3215aeb0bd95
Parents: 1528064 304260d
Author: Brandon Williams <br...@apache.org>
Authored: Wed Aug 6 12:58:44 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Aug 6 12:58:44 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 2 +-
conf/cassandra-env.sh | 4 ---
.../cassandra/hadoop/cql3/CqlConfigHelper.java | 13 +++-------
.../cassandra/hadoop/cql3/CqlInputFormat.java | 19 ++++++--------
.../cassandra/locator/SimpleSeedProvider.java | 27 ++++----------------
.../service/EmbeddedCassandraService.java | 5 ----
6 files changed, 18 insertions(+), 52 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/beeca7d2/CHANGES.txt
----------------------------------------------------------------------
[33/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/17055bfd
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/17055bfd
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/17055bfd
Branch: refs/heads/cassandra-2.1
Commit: 17055bfdb0eb4f0a3d43b7c920aff3d1fa2a6ce6
Parents: 59123b6 78b734e
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Thu Aug 7 16:07:46 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Aug 7 16:07:46 2014 +0200
----------------------------------------------------------------------
.../apache/cassandra/config/DatabaseDescriptor.java | 5 +++++
.../org/apache/cassandra/service/StorageService.java | 6 ++++++
.../apache/cassandra/service/StorageServiceMBean.java | 3 +++
src/java/org/apache/cassandra/tools/NodeProbe.java | 4 ++++
src/java/org/apache/cassandra/tools/NodeTool.java | 14 ++++++++++++++
5 files changed, 32 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/17055bfd/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/17055bfd/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/17055bfd/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/17055bfd/src/java/org/apache/cassandra/tools/NodeTool.java
----------------------------------------------------------------------
[28/50] [abbrv] git commit: fix build
Posted by jm...@apache.org.
fix build
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/41f36778
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/41f36778
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/41f36778
Branch: refs/heads/cassandra-2.1
Commit: 41f3677841b0e959b912091e4ad36d8f388649fa
Parents: 9e43a2f
Author: Brandon Williams <br...@apache.org>
Authored: Wed Aug 6 14:27:20 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Aug 6 14:27:47 2014 -0500
----------------------------------------------------------------------
.../apache/cassandra/hadoop/cql3/CqlConfigHelper.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/41f36778/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java
index b375ce2..7a5fd47 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java
@@ -422,15 +422,15 @@ public class CqlConfigHelper
poolingOptions.setCoreConnectionsPerHost(HostDistance.LOCAL, coreConnections.get());
if (maxConnections.isPresent())
poolingOptions.setMaxConnectionsPerHost(HostDistance.LOCAL, maxConnections.get());
- if (maxSimultaneousRequests.isPresent())
- poolingOptions.setMaxSimultaneousRequestsPerConnectionThreshold(HostDistance.LOCAL, maxSimultaneousRequests.get());
if (minSimultaneousRequests.isPresent())
poolingOptions.setMinSimultaneousRequestsPerConnectionThreshold(HostDistance.LOCAL, minSimultaneousRequests.get());
+ if (maxSimultaneousRequests.isPresent())
+ poolingOptions.setMaxSimultaneousRequestsPerConnectionThreshold(HostDistance.LOCAL, maxSimultaneousRequests.get());
poolingOptions.setCoreConnectionsPerHost(HostDistance.REMOTE, 0)
.setMaxConnectionsPerHost(HostDistance.REMOTE, 0)
- .setMaxSimultaneousRequestsPerConnectionThreshold(HostDistance.REMOTE, 0)
- .setMinSimultaneousRequestsPerConnectionThreshold(HostDistance.REMOTE, 0);
+ .setMinSimultaneousRequestsPerConnectionThreshold(HostDistance.REMOTE, 0)
+ .setMaxSimultaneousRequestsPerConnectionThreshold(HostDistance.REMOTE, 0);
return poolingOptions;
}
@@ -519,6 +519,11 @@ public class CqlConfigHelper
}
@Override
+ public void onSuspected(Host host)
+ {
+ }
+
+ @Override
public HostDistance distance(Host host)
{
if (host.getAddress().getHostName().equals(stickHost))
[11/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/8625661d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8625661d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8625661d
Branch: refs/heads/cassandra-2.1
Commit: 8625661d59fd0863414ec5d55aa3775764047d29
Parents: 7dd320c f759881
Author: Brandon Williams <br...@apache.org>
Authored: Tue Aug 5 14:05:27 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Tue Aug 5 14:05:27 2014 -0500
----------------------------------------------------------------------
src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
[29/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/87dc93ec
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/87dc93ec
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/87dc93ec
Branch: refs/heads/cassandra-2.1
Commit: 87dc93ec403822fb21c574803f0c1bafe3ce6b1d
Parents: 41f3677 a1924ba
Author: Brandon Williams <br...@apache.org>
Authored: Wed Aug 6 14:27:51 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Aug 6 14:27:51 2014 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[40/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/4c3ba4f3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4c3ba4f3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4c3ba4f3
Branch: refs/heads/cassandra-2.1
Commit: 4c3ba4f30acf65d769517009f8d263f6d87ede81
Parents: 32358d6 2c701f8
Author: Jake Luciani <ja...@apache.org>
Authored: Thu Aug 7 14:53:30 2014 -0400
Committer: Jake Luciani <ja...@apache.org>
Committed: Thu Aug 7 14:53:30 2014 -0400
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../cassandra/service/CassandraDaemon.java | 9 +
.../apache/cassandra/cql3/CorruptionTest.java | 195 +++++++++++++++++++
3 files changed, 205 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/4c3ba4f3/CHANGES.txt
----------------------------------------------------------------------
[18/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/94cfec89
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/94cfec89
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/94cfec89
Branch: refs/heads/cassandra-2.1
Commit: 94cfec89b8bf9401a7f4f1b49d59679e4c50f598
Parents: 774f3ac 7fc89ad
Author: Brandon Williams <br...@apache.org>
Authored: Wed Aug 6 09:08:42 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Aug 6 09:08:42 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 2 ++
.../cassandra/hadoop/cql3/CqlInputFormat.java | 19 +++++++++++--------
2 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/94cfec89/CHANGES.txt
----------------------------------------------------------------------
[22/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/862d7f94
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/862d7f94
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/862d7f94
Branch: refs/heads/cassandra-2.1
Commit: 862d7f94a8e9e3ab42fc5d5b581ff4f45520b0b2
Parents: beeca7d fa388ec
Author: Brandon Williams <br...@apache.org>
Authored: Wed Aug 6 13:10:37 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Aug 6 13:10:37 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 50 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/862d7f94/CHANGES.txt
----------------------------------------------------------------------
[04/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/efe57f23
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/efe57f23
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/efe57f23
Branch: refs/heads/cassandra-2.1
Commit: efe57f2306945daaa09da68c3e7c2247f845b2d3
Parents: 277ca64 6a8d978
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Tue Aug 5 15:22:21 2014 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Tue Aug 5 15:22:21 2014 +0100
----------------------------------------------------------------------
build.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/efe57f23/build.xml
----------------------------------------------------------------------
[25/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/2919a509
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2919a509
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2919a509
Branch: refs/heads/cassandra-2.1
Commit: 2919a509c966820422c8f6c87f5602d8f4e52433
Parents: e607d94 579a853
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Aug 6 13:34:03 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Wed Aug 6 13:34:03 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2919a509/CHANGES.txt
----------------------------------------------------------------------
[35/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/f95b40c1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f95b40c1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f95b40c1
Branch: refs/heads/cassandra-2.1
Commit: f95b40c1de385108b47e5aa32c0057c120e2ac03
Parents: 17055bf 24d8571
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Aug 7 09:25:25 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Aug 7 09:25:25 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 2 +
.../DebuggableThreadPoolExecutor.java | 8 +-
.../db/compaction/CompactionManager.java | 4 +-
.../apache/cassandra/tools/SSTableExport.java | 131 +++++++++++--------
4 files changed, 83 insertions(+), 62 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f95b40c1/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f95b40c1/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f95b40c1/src/java/org/apache/cassandra/tools/SSTableExport.java
----------------------------------------------------------------------
[26/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/9e43a2f8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9e43a2f8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9e43a2f8
Branch: refs/heads/cassandra-2.1
Commit: 9e43a2f8afd8448d4424bb03bcb2b794070d7ec9
Parents: 2919a50 bb0112b
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Wed Aug 6 14:02:30 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Wed Aug 6 14:02:30 2014 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[37/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/d1e41c01
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d1e41c01
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d1e41c01
Branch: refs/heads/cassandra-2.1
Commit: d1e41c01eeebe9c8cf034e42d41e94dcc2265d49
Parents: 56141ae 0c2bbef
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Thu Aug 7 18:36:33 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Aug 7 18:36:33 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../db/index/AbstractSimplePerColumnSecondaryIndex.java | 6 ++++++
.../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++++++++++
.../apache/cassandra/db/index/SecondaryIndexManager.java | 4 ++--
4 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d1e41c01/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d1e41c01/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
----------------------------------------------------------------------
[05/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/26cd4408
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/26cd4408
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/26cd4408
Branch: refs/heads/cassandra-2.1
Commit: 26cd4408f3c0c527d3033262e9984724bdd2ce8b
Parents: efe57f2 9faf905
Author: Brandon Williams <br...@apache.org>
Authored: Tue Aug 5 10:35:37 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Tue Aug 5 10:35:37 2014 -0500
----------------------------------------------------------------------
src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
[17/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/774f3acb
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/774f3acb
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/774f3acb
Branch: refs/heads/cassandra-2.1
Commit: 774f3acbfdcff3ab20c838023f6f1de0eb2d5626
Parents: f7fab28 6386abc
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Wed Aug 6 12:14:36 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Wed Aug 6 12:14:36 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/service/EmbeddedCassandraService.java | 5 +++++
2 files changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774f3acb/CHANGES.txt
----------------------------------------------------------------------
[14/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@apache.org.
Merge branch 'cassandra-2.1' into trunk
Conflicts:
src/java/org/apache/cassandra/cql3/ErrorCollector.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4a69811e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4a69811e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4a69811e
Branch: refs/heads/cassandra-2.1
Commit: 4a69811ee492ca6dcf98f0e5a6375d20e31ba49d
Parents: 5019182 72241f6
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Tue Aug 5 17:26:05 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Tue Aug 5 17:26:05 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/cql3/ErrorCollector.java | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/4a69811e/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 991331f,9ef6cc3..c8bb11b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,20 -1,5 +1,21 @@@
+3.0
+ * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
+ * Move sstable RandomAccessReader to nio2, which allows using the
+ FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
+ * Remove CQL2 (CASSANDRA-5918)
+ * Add Thrift get_multi_slice call (CASSANDRA-6757)
+ * Optimize fetching multiple cells by name (CASSANDRA-6933)
+ * Allow compilation in java 8 (CASSANDRA-7028)
+ * Make incremental repair default (CASSANDRA-7250)
+ * Enable code coverage thru JaCoCo (CASSANDRA-7226)
+ * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369)
+ * Shorten SSTable path (CASSANDRA-6962)
+ * Use unsafe mutations for most unit tests (CASSANDRA-6969)
+ * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
+
+
2.1.1
+ * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
* SSTableExport uses correct validator to create string representation of partition
keys (CASSANDRA-7498)
* Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/4a69811e/src/java/org/apache/cassandra/cql3/ErrorCollector.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/ErrorCollector.java
index 40949de,cd628b8..ad0f703
--- a/src/java/org/apache/cassandra/cql3/ErrorCollector.java
+++ b/src/java/org/apache/cassandra/cql3/ErrorCollector.java
@@@ -160,34 -157,21 +160,49 @@@ public final class ErrorCollector imple
}
/**
+ * Checks if the specified tokens are valid.
+ *
+ * @param token the tokens to check
+ * @return <code>true</code> if all the specified tokens are valid ones,
+ * <code>false</code> otherwise.
+ */
+ private static boolean areTokensValid(Token... tokens)
+ {
+ for (Token token : tokens)
+ {
+ if (!isTokenValid(token))
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Checks that the specified token is valid.
+ *
+ * @param token the token to check
+ * @return <code>true</code> if it is considered as valid, <code>false</code> otherwise.
+ */
+ private static boolean isTokenValid(Token token)
+ {
+ return token.getLine() > 0 && token.getCharPositionInLine() >= 0;
+ }
+
+ /**
+ * Returns the index of the offending token. <p>In the case where the offending token is an extra
+ * character at the end, the index returned by the <code>TokenStream</code> might be after the last token.
+ * To avoid that problem we need to make sure that the index of the offending token is a valid index
+ * (one for which a token exist).</p>
+ *
+ * @param index the token index returned by the <code>TokenStream</code>
+ * @param size the <code>TokenStream</code> size
+ * @return the valid index of the offending token
+ */
+ private static int getOffendingTokenIndex(int index, int size)
+ {
+ return Math.min(index, size - 1);
+ }
+
+ /**
* Puts the specified token within square brackets.
*
* @param line the line containing the token
[13/50] [abbrv] git commit: merge from 2.1
Posted by jm...@apache.org.
merge from 2.1
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/50191828
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/50191828
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/50191828
Branch: refs/heads/cassandra-2.1
Commit: 50191828f4d421ae8acfa85019bec5eaecdfa6bb
Parents: 2504177 91d61b3
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Aug 5 16:48:13 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Aug 5 16:48:13 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 2 +
.../apache/cassandra/tools/SSTableExport.java | 40 +++++-----
.../apache/cassandra/tools/SSTableImport.java | 23 ++++--
.../unit/org/apache/cassandra/SchemaLoader.java | 3 +-
test/unit/org/apache/cassandra/Util.java | 6 ++
.../cassandra/tools/SSTableExportTest.java | 79 +++++++++++++++-----
.../cassandra/tools/SSTableImportTest.java | 56 ++++++++++++--
7 files changed, 160 insertions(+), 49 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/50191828/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index d60ed3d,79c84b2..991331f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,20 -1,6 +1,22 @@@
+3.0
+ * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
+ * Move sstable RandomAccessReader to nio2, which allows using the
+ FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
+ * Remove CQL2 (CASSANDRA-5918)
+ * Add Thrift get_multi_slice call (CASSANDRA-6757)
+ * Optimize fetching multiple cells by name (CASSANDRA-6933)
+ * Allow compilation in java 8 (CASSANDRA-7028)
+ * Make incremental repair default (CASSANDRA-7250)
+ * Enable code coverage thru JaCoCo (CASSANDRA-7226)
+ * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369)
+ * Shorten SSTable path (CASSANDRA-6962)
+ * Use unsafe mutations for most unit tests (CASSANDRA-6969)
+ * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
+
+
2.1.1
+ * SSTableExport uses correct validator to create string representation of partition
+ keys (CASSANDRA-7498)
* Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689)
* Add support for custom 2i validation (CASSANDRA-7575)
* Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/50191828/src/java/org/apache/cassandra/tools/SSTableExport.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/50191828/src/java/org/apache/cassandra/tools/SSTableImport.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/50191828/test/unit/org/apache/cassandra/SchemaLoader.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/50191828/test/unit/org/apache/cassandra/Util.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/50191828/test/unit/org/apache/cassandra/tools/SSTableExportTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/tools/SSTableExportTest.java
index dbc6703,c3f3419..f1b7564
--- a/test/unit/org/apache/cassandra/tools/SSTableExportTest.java
+++ b/test/unit/org/apache/cassandra/tools/SSTableExportTest.java
@@@ -18,30 -18,26 +18,33 @@@
*/
package org.apache.cassandra.tools;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
- import java.io.OutputStream;
import java.io.PrintStream;
++import org.junit.BeforeClass;
++import org.junit.Test;
++
import org.apache.cassandra.SchemaLoader;
import org.apache.cassandra.Util;
import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.db.*;
+import org.apache.cassandra.config.KSMetaData;
- import org.apache.cassandra.db.*;
++import org.apache.cassandra.db.ArrayBackedSortedColumns;
++import org.apache.cassandra.db.BufferCell;
++import org.apache.cassandra.db.BufferCounterCell;
++import org.apache.cassandra.db.BufferExpiringCell;
++import org.apache.cassandra.db.ColumnFamily;
++import org.apache.cassandra.db.ColumnFamilyStore;
++import org.apache.cassandra.db.DeletionInfo;
++import org.apache.cassandra.db.Keyspace;
import org.apache.cassandra.db.filter.QueryFilter;
+ import org.apache.cassandra.db.marshal.AsciiType;
import org.apache.cassandra.db.marshal.BytesType;
+import org.apache.cassandra.db.marshal.CounterColumnType;
import org.apache.cassandra.db.marshal.UTF8Type;
+import org.apache.cassandra.db.marshal.UUIDType;
+import org.apache.cassandra.exceptions.ConfigurationException;
import org.apache.cassandra.io.sstable.Descriptor;
import org.apache.cassandra.io.sstable.SSTableReader;
import org.apache.cassandra.io.sstable.SSTableWriter;
@@@ -54,30 -48,10 +57,35 @@@ import org.json.simple.JSONArray
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
import org.json.simple.parser.ParseException;
- import org.junit.BeforeClass;
--import org.junit.Test;
+
-public class SSTableExportTest extends SchemaLoader
++import static org.apache.cassandra.Util.column;
++import static org.apache.cassandra.io.sstable.SSTableUtils.tempSSTableFile;
++import static org.apache.cassandra.utils.ByteBufferUtil.bytesToHex;
++import static org.apache.cassandra.utils.ByteBufferUtil.hexToBytes;
++import static org.junit.Assert.assertEquals;
++import static org.junit.Assert.assertNotNull;
+
+public class SSTableExportTest
{
+ public static final String KEYSPACE1 = "SSTableExportTest";
+ public static final String CF_STANDARD = "Standard1";
+ public static final String CF_COUNTER = "Counter1";
+ public static final String CF_UUID = "UUIDKeys";
+ public static final String CF_VALSWITHQUOTES = "ValuesWithQuotes";
+
+ @BeforeClass
+ public static void defineSchema() throws ConfigurationException, IOException, TException
+ {
+ SchemaLoader.prepareServer();
+ SchemaLoader.createKeyspace(KEYSPACE1,
+ SimpleStrategy.class,
+ KSMetaData.optsWithRF(1),
+ SchemaLoader.standardCFMD(KEYSPACE1, CF_STANDARD),
+ CFMetaData.denseCFMetaData(KEYSPACE1, CF_COUNTER, BytesType.instance).defaultValidator(CounterColumnType.instance),
+ SchemaLoader.standardCFMD(KEYSPACE1, CF_UUID).keyValidator(UUIDType.instance),
+ CFMetaData.denseCFMetaData(KEYSPACE1, CF_VALSWITHQUOTES, BytesType.instance).defaultValidator(UTF8Type.instance));
+ }
+
public String asHex(String str)
{
return bytesToHex(ByteBufferUtil.bytes(str));
@@@ -195,11 -172,12 +206,12 @@@
// Export to JSON and verify
File tempJson = File.createTempFile("Standard1", ".json");
- SSTableExport.export(reader, new PrintStream(tempJson.getPath()), new String[]{asHex("rowExclude")});
+ SSTableExport.export(reader, new PrintStream(tempJson.getPath()), new String[]{asHex("rowExclude")},
+ CFMetaData.sparseCFMetaData("Keyspace1", "Standard1", BytesType.instance));
// Import JSON to another SSTable file
- File tempSS2 = tempSSTableFile("Keyspace1", "Standard1");
- new SSTableImport().importJson(tempJson.getPath(), "Keyspace1", "Standard1", tempSS2.getPath());
+ File tempSS2 = tempSSTableFile(KEYSPACE1, "Standard1");
+ new SSTableImport().importJson(tempJson.getPath(), KEYSPACE1, "Standard1", tempSS2.getPath());
reader = SSTableReader.open(Descriptor.fromFilename(tempSS2.getPath()));
QueryFilter qf = Util.namesQueryFilter(cfs, Util.dk("rowA"), "name");
http://git-wip-us.apache.org/repos/asf/cassandra/blob/50191828/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/tools/SSTableImportTest.java
index dba8408,edaf0fd..8ea0ab8
--- a/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
+++ b/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
@@@ -18,10 -18,10 +18,6 @@@
*/
package org.apache.cassandra.tools;
--import static org.junit.Assert.assertEquals;
--import static org.apache.cassandra.io.sstable.SSTableUtils.tempSSTableFile;
--import static org.apache.cassandra.utils.ByteBufferUtil.hexToBytes;
--
import java.io.File;
import java.io.IOException;
import java.net.URI;
@@@ -32,36 -33,14 +28,47 @@@ import org.junit.Test
import org.apache.cassandra.SchemaLoader;
import org.apache.cassandra.Util;
-import org.apache.cassandra.db.*;
+import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.config.KSMetaData;
- import org.apache.cassandra.db.*;
++import org.apache.cassandra.db.ArrayBackedSortedColumns;
++import org.apache.cassandra.db.BufferDeletedCell;
++import org.apache.cassandra.db.Cell;
++import org.apache.cassandra.db.ColumnFamily;
++import org.apache.cassandra.db.CounterCell;
++import org.apache.cassandra.db.DeletionInfo;
++import org.apache.cassandra.db.ExpiringCell;
import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
import org.apache.cassandra.db.filter.QueryFilter;
++import org.apache.cassandra.db.marshal.AsciiType;
+import org.apache.cassandra.db.marshal.BytesType;
+import org.apache.cassandra.db.marshal.CounterColumnType;
+import org.apache.cassandra.exceptions.ConfigurationException;
- import org.apache.cassandra.locator.SimpleStrategy;
import org.apache.cassandra.io.sstable.Descriptor;
import org.apache.cassandra.io.sstable.SSTableReader;
++import org.apache.cassandra.locator.SimpleStrategy;
+import org.apache.thrift.TException;
-public class SSTableImportTest extends SchemaLoader
++import static org.apache.cassandra.io.sstable.SSTableUtils.tempSSTableFile;
++import static org.apache.cassandra.utils.ByteBufferUtil.hexToBytes;
++import static org.junit.Assert.assertEquals;
++
+public class SSTableImportTest
{
+ public static final String KEYSPACE1 = "SSTableImportTest";
+ public static final String CF_STANDARD = "Standard1";
+ public static final String CF_COUNTER = "Counter1";
+
+ @BeforeClass
+ public static void defineSchema() throws ConfigurationException, IOException, TException
+ {
+ SchemaLoader.prepareServer();
+ SchemaLoader.createKeyspace(KEYSPACE1,
+ SimpleStrategy.class,
+ KSMetaData.optsWithRF(1),
+ SchemaLoader.standardCFMD(KEYSPACE1, CF_STANDARD),
+ CFMetaData.denseCFMetaData(KEYSPACE1, CF_COUNTER, BytesType.instance).defaultValidator(CounterColumnType.instance));
+ }
+
@Test
public void testImportSimpleCf() throws IOException, URISyntaxException
{
[43/50] [abbrv] Support pure user-defined functions
Posted by jm...@apache.org.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/transport/Server.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/transport/Server.java b/src/java/org/apache/cassandra/transport/Server.java
index 8dd5e73..0e2c36c 100644
--- a/src/java/org/apache/cassandra/transport/Server.java
+++ b/src/java/org/apache/cassandra/transport/Server.java
@@ -388,6 +388,10 @@ public class Server implements CassandraDaemon.Server
server.connectionTracker.send(new Event.SchemaChange(Event.SchemaChange.Change.CREATED, Event.SchemaChange.Target.TYPE, ksName, typeName));
}
+ public void onCreateFunction(String namespace, String functionName)
+ {
+ }
+
public void onUpdateKeyspace(String ksName)
{
server.connectionTracker.send(new Event.SchemaChange(Event.SchemaChange.Change.UPDATED, ksName));
@@ -403,6 +407,10 @@ public class Server implements CassandraDaemon.Server
server.connectionTracker.send(new Event.SchemaChange(Event.SchemaChange.Change.UPDATED, Event.SchemaChange.Target.TYPE, ksName, typeName));
}
+ public void onUpdateFunction(String namespace, String functionName)
+ {
+ }
+
public void onDropKeyspace(String ksName)
{
server.connectionTracker.send(new Event.SchemaChange(Event.SchemaChange.Change.DROPPED, ksName));
@@ -417,5 +425,9 @@ public class Server implements CassandraDaemon.Server
{
server.connectionTracker.send(new Event.SchemaChange(Event.SchemaChange.Change.DROPPED, Event.SchemaChange.Target.TYPE, ksName, typeName));
}
+
+ public void onDropFunction(String namespace, String functionName)
+ {
+ }
}
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/test/unit/org/apache/cassandra/cql3/UFTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/UFTest.java b/test/unit/org/apache/cassandra/cql3/UFTest.java
new file mode 100644
index 0000000..100e4e5
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql3/UFTest.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3;
+
+import org.junit.Test;
+
+import org.apache.cassandra.exceptions.InvalidRequestException;
+
+public class UFTest extends CQLTester
+{
+ public static Double sin(Double val)
+ {
+ return val != null ? Math.sin(val) : null;
+ }
+
+ public static Float sin(Float val)
+ {
+ return val != null ? (float)Math.sin(val) : null;
+ }
+
+ public Float nonStaticMethod(Float val)
+ {
+ return new Float(1.0);
+ }
+
+ private static Float privateMethod(Float val)
+ {
+ return new Float(1.0);
+ }
+
+ @Test
+ public void ddlCreateFunction() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+
+ execute("create function foo::cf ( input double ) returns double 'org.apache.cassandra.cql3.UFTest#sin'");
+ execute("drop function foo::cf");
+ }
+
+ @Test(expected = InvalidRequestException.class)
+ public void ddlCreateFunctionFail() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+
+ execute("create function foo::cff ( input double ) returns double 'org.apache.cassandra.cql3.UFTest#sin'");
+ execute("create function foo::cff ( input double ) returns double 'org.apache.cassandra.cql3.UFTest#sin'");
+ }
+
+
+ @Test
+ public void ddlCreateIfNotExistsFunction() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+
+ execute("create function if not exists foo::cfine ( input double ) returns double 'org.apache.cassandra.cql3.UFTest#sin'");
+ execute("drop function foo::cfine");
+ }
+
+
+ @Test(expected = InvalidRequestException.class)
+ public void ddlCreateFunctionBadClass() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+ execute("create function foo::cff ( input double ) returns double 'org.apache.cassandra.cql3.DoesNotExist#doesnotexist'");
+ }
+
+ @Test(expected = InvalidRequestException.class)
+ public void ddlCreateFunctionBadMethod() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+ execute("create function foo::cff ( input double ) returns double 'org.apache.cassandra.cql3.UFTest#doesnotexist'");
+ }
+
+ @Test(expected = InvalidRequestException.class)
+ public void ddlCreateFunctionBadArgType() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+ execute("create function foo::cff ( input text ) returns double 'org.apache.cassandra.cql3.UFTest#sin'");
+ }
+
+ @Test(expected = InvalidRequestException.class)
+ public void ddlCreateFunctionBadReturnType() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+ execute("create function foo::cff ( input double ) returns text 'org.apache.cassandra.cql3.UFTest#sin'");
+ }
+
+ @Test(expected = InvalidRequestException.class)
+ public void ddlCreateFunctionNonStaticMethod() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+ execute("create function foo::cff ( input float ) returns float 'org.apache.cassandra.cql3.UFTest#nonStaticMethod'");
+ }
+
+ @Test(expected = InvalidRequestException.class)
+ public void ddlCreateFunctionNonPublicMethod() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+ execute("create function foo::cff ( input float ) returns float 'org.apache.cassandra.cql3.UFTest#privateMethod'");
+ }
+
+ @Test(expected = InvalidRequestException.class)
+ public void ddlCreateIfNotExistsFunctionFail() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+
+ execute("create function if not exists foo::cfinef ( input double ) returns double 'org.apache.cassandra.cql3.UFTest#sin'");
+ execute("create function if not exists foo::cfinef ( input double ) returns double 'org.apache.cassandra.cql3.UFTest#sin'");
+ }
+
+ @Test
+ public void ddlCreateOrReplaceFunction() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+
+ execute("create function foo::corf ( input double ) returns double 'org.apache.cassandra.cql3.UFTest#sin'");
+ execute("create or replace function foo::corf ( input double ) returns double 'org.apache.cassandra.cql3.UFTest#sin'");
+ }
+
+ @Test(expected = InvalidRequestException.class)
+ public void ddlDropNonExistingFunction() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+
+ execute("drop function foo::dnef");
+ }
+
+ @Test
+ public void ddlDropIfExistsNonExistingFunction() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)"); // not used, but required by CQLTester
+
+ execute("drop function if exists foo::dienef");
+ }
+
+ @Test
+ public void namespaceUserFunctions() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)");
+
+ execute("create or replace function math::sin ( input double ) returns double 'org.apache.cassandra.cql3.UFTest'");
+
+ execute("INSERT INTO %s (key, val) VALUES (?, ?)", 1, 1d);
+ execute("INSERT INTO %s (key, val) VALUES (?, ?)", 2, 2d);
+ execute("INSERT INTO %s (key, val) VALUES (?, ?)", 3, 3d);
+
+ assertRows(execute("SELECT key, val, math::sin(val) FROM %s"),
+ row(1, 1d, Math.sin(1d)),
+ row(2, 2d, Math.sin(2d)),
+ row(3, 3d, Math.sin(3d))
+ );
+ }
+
+ @Test
+ public void nonNamespaceUserFunctions() throws Throwable
+ {
+ createTable("CREATE TABLE %s (key int primary key, val double)");
+
+ execute("create or replace function sin ( input double ) returns double 'org.apache.cassandra.cql3.udf.StdLibMath'");
+
+ execute("INSERT INTO %s (key, val) VALUES (?, ?)", 1, 1d);
+ execute("INSERT INTO %s (key, val) VALUES (?, ?)", 2, 2d);
+ execute("INSERT INTO %s (key, val) VALUES (?, ?)", 3, 3d);
+
+ assertRows(execute("SELECT key, val, sin(val) FROM %s"),
+ row(1, 1d, Math.sin(1d)),
+ row(2, 2d, Math.sin(2d)),
+ row(3, 3d, Math.sin(3d))
+ );
+ }
+}
[44/50] [abbrv] git commit: Support pure user-defined functions
Posted by jm...@apache.org.
Support pure user-defined functions
Patch by Robert Stupp; reviewed by Tyler Hobbs for CASSANDRA-7395
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/25411bf1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/25411bf1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/25411bf1
Branch: refs/heads/cassandra-2.1
Commit: 25411bf1d15a35bf17002cf7664173357c6dc6cf
Parents: 2f25e6e
Author: Robert Stupp <sn...@snazy.de>
Authored: Fri Aug 8 14:11:01 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Fri Aug 8 14:11:01 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
build.xml | 2 +-
pylib/cqlshlib/cql3handling.py | 2 +-
src/java/org/apache/cassandra/auth/Auth.java | 12 +
.../org/apache/cassandra/config/CFMetaData.java | 14 +-
.../org/apache/cassandra/config/KSMetaData.java | 1 +
.../org/apache/cassandra/config/UFMetaData.java | 309 +++++++++++++++++++
.../cassandra/cql3/AssignementTestable.java | 4 +-
src/java/org/apache/cassandra/cql3/Cql.g | 73 ++++-
.../org/apache/cassandra/cql3/TypeCast.java | 2 +-
.../cassandra/cql3/functions/FunctionCall.java | 26 +-
.../cassandra/cql3/functions/Functions.java | 7 +-
.../statements/CreateFunctionStatement.java | 180 +++++++++++
.../cql3/statements/DropFunctionStatement.java | 94 ++++++
.../statements/SchemaAlteringStatement.java | 6 +-
.../cassandra/cql3/statements/Selectable.java | 9 +-
.../cassandra/cql3/statements/Selection.java | 21 +-
.../cql3/udf/UDFFunctionOverloads.java | 87 ++++++
.../apache/cassandra/cql3/udf/UDFRegistry.java | 146 +++++++++
.../apache/cassandra/cql3/udf/UDFunction.java | 178 +++++++++++
.../org/apache/cassandra/db/DefsTables.java | 83 +++++
.../org/apache/cassandra/db/SystemKeyspace.java | 14 +-
.../cassandra/service/CassandraDaemon.java | 4 +
.../cassandra/service/IMigrationListener.java | 4 +
.../cassandra/service/MigrationManager.java | 42 +++
.../org/apache/cassandra/transport/Event.java | 40 +--
.../org/apache/cassandra/transport/Server.java | 12 +
test/unit/org/apache/cassandra/cql3/UFTest.java | 186 +++++++++++
28 files changed, 1517 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b33399b..f6285fe 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.0
+ * Support pure user-defined functions (CASSANDRA-7395)
* Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
* Move sstable RandomAccessReader to nio2, which allows using the
FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index e904ca2..057bf3d 100644
--- a/build.xml
+++ b/build.xml
@@ -1461,7 +1461,7 @@
</java>
</target>
- <target name="javadoc" depends="init" description="Create javadoc">
+ <target name="javadoc" depends="init" description="Create javadoc" unless="no-javadoc">
<create-javadoc destdir="${javadoc.dir}">
<filesets>
<fileset dir="${build.src.java}" defaultexcludes="yes">
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 72461db..d912c67 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -212,7 +212,7 @@ JUNK ::= /([ \t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ;
<mapLiteral> ::= "{" <term> ":" <term> ( "," <term> ":" <term> )* "}"
;
-<functionName> ::= <identifier>
+<functionName> ::= ( <identifier> ":" ":" )? <identifier>
;
<statementBody> ::= <useStatement>
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/auth/Auth.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/auth/Auth.java b/src/java/org/apache/cassandra/auth/Auth.java
index 7c532b0..bc23d05 100644
--- a/src/java/org/apache/cassandra/auth/Auth.java
+++ b/src/java/org/apache/cassandra/auth/Auth.java
@@ -291,6 +291,10 @@ public class Auth
{
}
+ public void onDropFunction(String namespace, String functionName)
+ {
+ }
+
public void onCreateKeyspace(String ksName)
{
}
@@ -303,6 +307,10 @@ public class Auth
{
}
+ public void onCreateFunction(String namespace, String functionName)
+ {
+ }
+
public void onUpdateKeyspace(String ksName)
{
}
@@ -314,5 +322,9 @@ public class Auth
public void onUpdateUserType(String ksName, String userType)
{
}
+
+ public void onUpdateFunction(String namespace, String functionName)
+ {
+ }
}
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java
index 5a347f7..37f586d 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -213,6 +213,19 @@ public final class CFMetaData
+ "PRIMARY KEY (keyspace_name, type_name)"
+ ") WITH COMMENT='Defined user types' AND gc_grace_seconds=604800");
+ public static final CFMetaData SchemaFunctionsCf = compile("CREATE TABLE " + SystemKeyspace.SCHEMA_FUNCTIONS_CF + " ("
+ + "namespace text,"
+ + "name text,"
+ + "signature text,"
+ + "argument_names list<text>,"
+ + "argument_types list<text>,"
+ + "return_type text,"
+ + "deterministic boolean,"
+ + "language text,"
+ + "body text,"
+ + "primary key ((namespace, name), signature)"
+ + ") WITH COMMENT='user defined functions' AND gc_grace_seconds=604800");
+
public static final CFMetaData HintsCf = compile("CREATE TABLE " + SystemKeyspace.HINTS_CF + " ("
+ "target_id uuid,"
+ "hint_id timeuuid,"
@@ -331,7 +344,6 @@ public final class CFMetaData
+ "PRIMARY KEY (id)"
+ ") WITH COMMENT='show all compaction history' AND DEFAULT_TIME_TO_LIVE=604800");
-
public static class SpeculativeRetry
{
public enum RetryType
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/config/KSMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/KSMetaData.java b/src/java/org/apache/cassandra/config/KSMetaData.java
index 8c99191..64ac3ff 100644
--- a/src/java/org/apache/cassandra/config/KSMetaData.java
+++ b/src/java/org/apache/cassandra/config/KSMetaData.java
@@ -101,6 +101,7 @@ public final class KSMetaData
CFMetaData.SchemaColumnsCf,
CFMetaData.SchemaTriggersCf,
CFMetaData.SchemaUserTypesCf,
+ CFMetaData.SchemaFunctionsCf,
CFMetaData.CompactionLogCf,
CFMetaData.CompactionHistoryCf,
CFMetaData.PaxosCf,
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/config/UFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/UFMetaData.java b/src/java/org/apache/cassandra/config/UFMetaData.java
new file mode 100644
index 0000000..18484f3
--- /dev/null
+++ b/src/java/org/apache/cassandra/config/UFMetaData.java
@@ -0,0 +1,309 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.config;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.CharStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.TokenStream;
+import org.apache.cassandra.cql3.AssignementTestable;
+import org.apache.cassandra.cql3.CQL3Type;
+import org.apache.cassandra.cql3.ColumnIdentifier;
+import org.apache.cassandra.cql3.ColumnSpecification;
+import org.apache.cassandra.cql3.CqlLexer;
+import org.apache.cassandra.cql3.CqlParser;
+import org.apache.cassandra.cql3.QueryProcessor;
+import org.apache.cassandra.cql3.UntypedResultSet;
+import org.apache.cassandra.cql3.udf.UDFFunctionOverloads;
+import org.apache.cassandra.cql3.udf.UDFRegistry;
+import org.apache.cassandra.db.CFRowAdder;
+import org.apache.cassandra.db.ColumnFamily;
+import org.apache.cassandra.db.Keyspace;
+import org.apache.cassandra.db.Mutation;
+import org.apache.cassandra.db.RangeTombstone;
+import org.apache.cassandra.db.Row;
+import org.apache.cassandra.db.SystemKeyspace;
+import org.apache.cassandra.db.composites.Composite;
+import org.apache.cassandra.db.marshal.AbstractType;
+import org.apache.cassandra.db.marshal.CompositeType;
+import org.apache.cassandra.db.marshal.UTF8Type;
+import org.apache.cassandra.exceptions.ConfigurationException;
+import org.apache.cassandra.exceptions.InvalidRequestException;
+import org.apache.cassandra.exceptions.SyntaxException;
+
+/**
+ * Defined (and loaded) user functions.
+ * <p/>
+ * In practice, because user functions are global, we have only one instance of
+ * this class that retrieve through the Schema class.
+ */
+public final class UFMetaData
+{
+ public final String namespace;
+ public final String functionName;
+ public final String qualifiedName;
+ public final String returnType;
+ public final List<String> argumentNames;
+ public final List<String> argumentTypes;
+ public final String language;
+ public final String body;
+ public final boolean deterministic;
+
+ public final String signature;
+ public final List<CQL3Type> cqlArgumentTypes;
+ public final CQL3Type cqlReturnType;
+
+ static final CompositeType partKey = (CompositeType) CFMetaData.SchemaFunctionsCf.getKeyValidator();
+
+ // TODO tracking "valid" status via an exception field is really bad style - but we need some way to mark a function as "dead"
+ public InvalidRequestException invalid;
+
+ public UFMetaData(String namespace, String functionName, boolean deterministic, List<String> argumentNames,
+ List<String> argumentTypes, String returnType, String language, String body)
+ {
+ this.namespace = namespace != null ? namespace.toLowerCase() : "";
+ this.functionName = functionName.toLowerCase();
+ this.qualifiedName = qualifiedName(namespace, functionName);
+ this.returnType = returnType;
+ this.argumentNames = argumentNames;
+ this.argumentTypes = argumentTypes;
+ this.language = language == null ? "class" : language.toLowerCase();
+ this.body = body;
+ this.deterministic = deterministic;
+
+ this.cqlArgumentTypes = new ArrayList<>(argumentTypes.size());
+ InvalidRequestException inv = null;
+ CQL3Type rt = null;
+ try
+ {
+ rt = parseCQLType(returnType);
+ for (String argumentType : argumentTypes)
+ cqlArgumentTypes.add(parseCQLType(argumentType));
+ }
+ catch (InvalidRequestException e)
+ {
+ inv = e;
+ }
+ this.invalid = inv;
+ this.cqlReturnType = rt;
+
+ StringBuilder signature = new StringBuilder();
+ signature.append(qualifiedName);
+ for (String argumentType : argumentTypes)
+ {
+ signature.append(',');
+ signature.append(argumentType);
+ }
+ this.signature = signature.toString();
+ }
+
+ public boolean compatibleArgs(String ksName, String cfName, List<? extends AssignementTestable> providedArgs)
+ {
+ int cnt = cqlArgumentTypes.size();
+ if (cnt != providedArgs.size())
+ return false;
+ for (int i = 0; i < cnt; i++)
+ {
+ AssignementTestable provided = providedArgs.get(i);
+
+ if (provided == null)
+ continue;
+
+ AbstractType<?> argType = cqlArgumentTypes.get(i).getType();
+
+ ColumnSpecification expected = makeArgSpec(ksName, cfName, argType, i);
+ if (!provided.isAssignableTo(ksName, expected))
+ return false;
+ }
+
+ return true;
+ }
+
+ public ColumnSpecification makeArgSpec(String ksName, String cfName, AbstractType<?> argType, int i)
+ {
+ return new ColumnSpecification(ksName,
+ cfName,
+ new ColumnIdentifier("arg" + i + "(" + qualifiedName + ")", true), argType);
+ }
+
+ private static CQL3Type parseCQLType(String cqlType)
+ throws InvalidRequestException
+ {
+ CharStream stream = new ANTLRStringStream(cqlType);
+ CqlLexer lexer = new CqlLexer(stream);
+
+ TokenStream tokenStream = new CommonTokenStream(lexer);
+ CqlParser parser = new CqlParser(tokenStream);
+ try
+ {
+ CQL3Type.Raw rawType = parser.comparatorType();
+ // TODO CASSANDRA-7563 use appropiate keyspace here ... keyspace must be fully qualified
+ CQL3Type t = rawType.prepare(null);
+ // TODO CASSANDRA-7563 support "complex" types (UDT, tuples, collections), remove catch-NPE below
+ if (!(t instanceof CQL3Type.Native))
+ throw new InvalidRequestException("non-native CQL type '" + cqlType + "' not supported");
+ return t;
+ }
+ catch (NullPointerException | InvalidRequestException | RecognitionException e)
+ {
+ throw new InvalidRequestException("invalid CQL type '" + cqlType + "'");
+ }
+ }
+
+ public static String qualifiedName(String namespace, String functionName)
+ {
+ if (namespace == null)
+ return "::" + functionName;
+ return (namespace + "::" + functionName).toLowerCase();
+ }
+
+ public static Mutation dropFunction(long timestamp, String namespace, String functionName)
+ {
+ UDFFunctionOverloads sigMap = UDFRegistry.getFunctionSigMap(UFMetaData.qualifiedName(namespace, functionName));
+ if (sigMap == null || sigMap.isEmpty())
+ return null;
+
+ Mutation mutation = new Mutation(Keyspace.SYSTEM_KS, partKey.decompose(namespace, functionName));
+ ColumnFamily cf = mutation.addOrGet(SystemKeyspace.SCHEMA_FUNCTIONS_CF);
+
+ int ldt = (int) (System.currentTimeMillis() / 1000);
+ for (UFMetaData f : sigMap.values())
+ udfRemove(timestamp, cf, ldt, f);
+
+ return mutation;
+ }
+
+ private static Composite udfSignatureKey(UFMetaData function)
+ {
+ return CFMetaData.SchemaFunctionsCf.comparator.make(function.signature);
+ }
+
+ private static void udfRemove(long timestamp, ColumnFamily cf, int ldt, UFMetaData f)
+ {
+ Composite prefix = udfSignatureKey(f);
+ cf.addAtom(new RangeTombstone(prefix, prefix.end(), timestamp, ldt));
+ }
+
+ public static Mutation createOrReplaceFunction(long timestamp, UFMetaData f)
+ throws ConfigurationException, SyntaxException
+ {
+ Mutation mutation = new Mutation(Keyspace.SYSTEM_KS, partKey.decompose(f.namespace, f.functionName));
+ ColumnFamily cf = mutation.addOrGet(SystemKeyspace.SCHEMA_FUNCTIONS_CF);
+
+ Composite prefix = udfSignatureKey(f);
+ CFRowAdder adder = new CFRowAdder(cf, prefix, timestamp);
+
+ adder.resetCollection("argument_names");
+ adder.resetCollection("argument_types");
+ adder.add("name", f.functionName);
+ adder.add("return_type", f.returnType);
+ adder.add("language", f.language);
+ adder.add("body", f.body);
+ adder.add("deterministic", f.deterministic);
+
+ for (String argName : f.argumentNames)
+ adder.addListEntry("argument_names", argName);
+ for (String argType : f.argumentTypes)
+ adder.addListEntry("argument_types", argType);
+
+ return mutation;
+ }
+
+ public static UFMetaData fromSchema(UntypedResultSet.Row row)
+ {
+ String namespace = row.getString("namespace");
+ String name = row.getString("name");
+ List<String> argumentNames = row.getList("argument_names", UTF8Type.instance);
+ List<String> argumentTypes = row.getList("argument_types", UTF8Type.instance);
+ String returnType = row.getString("return_type");
+ boolean deterministic = row.getBoolean("deterministic");
+ String language = row.getString("language");
+ String body = row.getString("body");
+
+ return new UFMetaData(namespace, name, deterministic, argumentNames, argumentTypes, returnType, language, body);
+ }
+
+ public static Map<String, UFMetaData> fromSchema(Row row)
+ {
+ UntypedResultSet results = QueryProcessor.resultify("SELECT * FROM system." + SystemKeyspace.SCHEMA_FUNCTIONS_CF, row);
+ Map<String, UFMetaData> udfs = new HashMap<>(results.size());
+ for (UntypedResultSet.Row result : results)
+ {
+ UFMetaData udf = fromSchema(result);
+ udfs.put(udf.signature, udf);
+ }
+ return udfs;
+ }
+
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ UFMetaData that = (UFMetaData) o;
+ if (!signature.equals(that.signature))
+ return false;
+ if (deterministic != that.deterministic)
+ return false;
+ if (argumentNames != null ? !argumentNames.equals(that.argumentNames) : that.argumentNames != null)
+ return false;
+ if (body != null ? !body.equals(that.body) : that.body != null)
+ return false;
+ if (!namespace.equals(that.namespace))
+ return false;
+ if (!language.equals(that.language))
+ return false;
+ if (returnType != null ? !returnType.equals(that.returnType) : that.returnType != null)
+ return false;
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ int result = signature.hashCode();
+ result = 31 * result + (returnType != null ? returnType.hashCode() : 0);
+ result = 31 * result + (argumentNames != null ? argumentNames.hashCode() : 0);
+ result = 31 * result + (argumentTypes.hashCode());
+ result = 31 * result + (language.hashCode());
+ result = 31 * result + (body != null ? body.hashCode() : 0);
+ result = 31 * result + (deterministic ? 1 : 0);
+ return result;
+ }
+
+ public String toString()
+ {
+ return new ToStringBuilder(this)
+ .append("signature", signature)
+ .append("returnType", returnType)
+ .append("deterministic", deterministic)
+ .append("language", language)
+ .append("body", body)
+ .toString();
+ }
+}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/AssignementTestable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/AssignementTestable.java b/src/java/org/apache/cassandra/cql3/AssignementTestable.java
index 2253cf7..02b3013 100644
--- a/src/java/org/apache/cassandra/cql3/AssignementTestable.java
+++ b/src/java/org/apache/cassandra/cql3/AssignementTestable.java
@@ -17,12 +17,10 @@
*/
package org.apache.cassandra.cql3;
-import org.apache.cassandra.exceptions.InvalidRequestException;
-
public interface AssignementTestable
{
/**
* @return whether this object can be assigned to the provided receiver
*/
- public boolean isAssignableTo(String keyspace, ColumnSpecification receiver) throws InvalidRequestException;
+ public boolean isAssignableTo(String keyspace, ColumnSpecification receiver);
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g
index 268bce5..96a668b 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -242,6 +242,8 @@ cqlStatement returns [ParsedStatement stmt]
| st25=createTypeStatement { $stmt = st25; }
| st26=alterTypeStatement { $stmt = st26; }
| st27=dropTypeStatement { $stmt = st27; }
+ | st28=createFunctionStatement { $stmt = st28; }
+ | st29=dropFunctionStatement { $stmt = st29; }
;
/*
@@ -298,7 +300,8 @@ unaliasedSelector returns [Selectable s]
: ( c=cident { tmp = c; }
| K_WRITETIME '(' c=cident ')' { tmp = new Selectable.WritetimeOrTTL(c, true); }
| K_TTL '(' c=cident ')' { tmp = new Selectable.WritetimeOrTTL(c, false); }
- | f=functionName args=selectionFunctionArgs { tmp = new Selectable.WithFunction(f, args); }
+ | f=functionName args=selectionFunctionArgs { tmp = new Selectable.WithFunction("", f, args); }
+ | bn=udfName '::' fn=udfName args=selectionFunctionArgs { tmp = new Selectable.WithFunction(bn, fn, args); }
) ( '.' fi=cident { tmp = new Selectable.WithFieldSelection(tmp, fi); } )* { $s = tmp; }
;
@@ -485,6 +488,48 @@ batchStatementObjective returns [ModificationStatement.Parsed statement]
| d=deleteStatement { $statement = d; }
;
+createFunctionStatement returns [CreateFunctionStatement expr]
+ @init {
+ boolean orReplace = false;
+ boolean ifNotExists = false;
+
+ boolean deterministic = true;
+ String language = "CLASS";
+ String bodyOrClassName = null;
+ List<CreateFunctionStatement.Argument> args = new ArrayList<CreateFunctionStatement.Argument>();
+ }
+ : K_CREATE (K_OR K_REPLACE { orReplace = true; })?
+ ((K_NON { deterministic = false; })? K_DETERMINISTIC)?
+ K_FUNCTION
+ (K_IF K_NOT K_EXISTS { ifNotExists = true; })?
+ ( bn=udfName '::' )?
+ fn=udfName
+ '('
+ (
+ k=cident v=comparatorType { args.add(new CreateFunctionStatement.Argument(k, v)); }
+ ( ',' k=cident v=comparatorType { args.add(new CreateFunctionStatement.Argument(k, v)); } )*
+ )?
+ ')'
+ K_RETURNS
+ rt=comparatorType
+ (
+ ( { language="CLASS"; } cls = STRING_LITERAL { bodyOrClassName = $cls.text; } )
+ | ( K_LANGUAGE l = IDENT { language=$l.text; } K_BODY body = ((~K_END_BODY)*) { bodyOrClassName = $body.text; } K_END_BODY )
+ )
+ { $expr = new CreateFunctionStatement(bn, fn, language, bodyOrClassName, deterministic, rt, args, orReplace, ifNotExists); }
+ ;
+
+dropFunctionStatement returns [DropFunctionStatement expr]
+ @init {
+ boolean ifExists = false;
+ }
+ : K_DROP K_FUNCTION
+ (K_IF K_EXISTS { ifExists = true; } )?
+ ( bn=udfName '::' )?
+ fn=udfName
+ { $expr = new DropFunctionStatement(bn, fn, ifExists); }
+ ;
+
/**
* CREATE KEYSPACE [IF NOT EXISTS] <KEYSPACE> WITH attr1 = value1 AND attr2 = value2;
*/
@@ -917,6 +962,11 @@ functionName returns [String s]
| K_TOKEN { $s = "token"; }
;
+udfName returns [String s]
+ : f=IDENT { $s = $f.text; }
+ | u=unreserved_function_keyword { $s = u; }
+ ;
+
functionArgs returns [List<Term.Raw> a]
: '(' ')' { $a = Collections.emptyList(); }
| '(' t1=term { List<Term.Raw> args = new ArrayList<Term.Raw>(); args.add(t1); }
@@ -926,7 +976,8 @@ functionArgs returns [List<Term.Raw> a]
term returns [Term.Raw term]
: v=value { $term = v; }
- | f=functionName args=functionArgs { $term = new FunctionCall.Raw(f, args); }
+ | f=functionName args=functionArgs { $term = new FunctionCall.Raw("", f, args); }
+ | bn=udfName '::' fn=udfName args=functionArgs { $term = new FunctionCall.Raw(bn, fn, args); }
| '(' c=comparatorType ')' t=term { $term = new TypeCast(c, t); }
;
@@ -1180,10 +1231,16 @@ basic_unreserved_keyword returns [String str]
| K_DISTINCT
| K_CONTAINS
| K_STATIC
+ | K_FUNCTION
+ | K_RETURNS
+ | K_LANGUAGE
+ | K_NON
+ | K_DETERMINISTIC
+ | K_BODY
+ | K_END_BODY
) { $str = $k.text; }
;
-
// Case-insensitive keywords
K_SELECT: S E L E C T;
K_FROM: F R O M;
@@ -1287,6 +1344,16 @@ K_TUPLE: T U P L E;
K_TRIGGER: T R I G G E R;
K_STATIC: S T A T I C;
+K_FUNCTION: F U N C T I O N;
+K_RETURNS: R E T U R N S;
+K_LANGUAGE: L A N G U A G E;
+K_NON: N O N;
+K_OR: O R;
+K_REPLACE: R E P L A C E;
+K_DETERMINISTIC: D E T E R M I N I S T I C;
+K_END_BODY: E N D '_' B O D Y;
+K_BODY: B O D Y;
+
// Case-insensitive alpha characters
fragment A: ('a'|'A');
fragment B: ('b'|'B');
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/TypeCast.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/TypeCast.java b/src/java/org/apache/cassandra/cql3/TypeCast.java
index e325e4d..3250e3b 100644
--- a/src/java/org/apache/cassandra/cql3/TypeCast.java
+++ b/src/java/org/apache/cassandra/cql3/TypeCast.java
@@ -46,7 +46,7 @@ public class TypeCast implements Term.Raw
return new ColumnSpecification(receiver.ksName, receiver.cfName, new ColumnIdentifier(toString(), true), type.prepare(keyspace).getType());
}
- public boolean isAssignableTo(String keyspace, ColumnSpecification receiver) throws InvalidRequestException
+ public boolean isAssignableTo(String keyspace, ColumnSpecification receiver)
{
try
{
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/functions/FunctionCall.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/functions/FunctionCall.java b/src/java/org/apache/cassandra/cql3/functions/FunctionCall.java
index a0c7447..fe2c2ee 100644
--- a/src/java/org/apache/cassandra/cql3/functions/FunctionCall.java
+++ b/src/java/org/apache/cassandra/cql3/functions/FunctionCall.java
@@ -22,6 +22,8 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.cassandra.cql3.*;
+import org.apache.cassandra.cql3.udf.UDFunction;
+import org.apache.cassandra.cql3.udf.UDFRegistry;
import org.apache.cassandra.db.marshal.AbstractType;
import org.apache.cassandra.db.marshal.CollectionType;
import org.apache.cassandra.db.marshal.ListType;
@@ -93,18 +95,33 @@ public class FunctionCall extends Term.NonTerminal
public static class Raw implements Term.Raw
{
+ private final String namespace;
private final String functionName;
private final List<Term.Raw> terms;
- public Raw(String functionName, List<Term.Raw> terms)
+ public Raw(String namespace, String functionName, List<Term.Raw> terms)
{
+ this.namespace = namespace;
this.functionName = functionName;
this.terms = terms;
}
public Term prepare(String keyspace, ColumnSpecification receiver) throws InvalidRequestException
{
- Function fun = Functions.get(keyspace, functionName, terms, receiver);
+ Function fun = null;
+ if (namespace.isEmpty())
+ fun = Functions.get(keyspace, functionName, terms, receiver);
+
+ if (fun == null)
+ {
+ UDFunction udf = UDFRegistry.resolveFunction(namespace, functionName, receiver.ksName, receiver.cfName, terms);
+ if (udf != null)
+ // got a user defined function to call
+ fun = udf.create(terms);
+ }
+
+ if (fun == null)
+ throw new InvalidRequestException(String.format("Unknown function %s called", namespace.isEmpty() ? functionName : namespace + "::" + functionName));
List<Term> parameters = new ArrayList<Term>(terms.size());
boolean allTerminal = true;
@@ -149,10 +166,13 @@ public class FunctionCall extends Term.NonTerminal
public String toString()
{
StringBuilder sb = new StringBuilder();
+ if (!namespace.isEmpty())
+ sb.append(namespace).append("::");
sb.append(functionName).append("(");
for (int i = 0; i < terms.size(); i++)
{
- if (i > 0) sb.append(", ");
+ if (i > 0)
+ sb.append(", ");
sb.append(terms.get(i));
}
return sb.append(")").toString();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/functions/Functions.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/functions/Functions.java b/src/java/org/apache/cassandra/cql3/functions/Functions.java
index 605e7b3..03dd13d 100644
--- a/src/java/org/apache/cassandra/cql3/functions/Functions.java
+++ b/src/java/org/apache/cassandra/cql3/functions/Functions.java
@@ -62,6 +62,11 @@ public abstract class Functions
declared.put("blobasvarchar", AbstractFunction.factory(BytesConversionFcts.BlobAsVarcharFact));
}
+ public static boolean contains(String functionName)
+ {
+ return declared.containsKey(functionName);
+ }
+
public static AbstractType<?> getReturnType(String functionName, String ksName, String cfName)
{
List<Function.Factory> factories = declared.get(functionName.toLowerCase());
@@ -82,7 +87,7 @@ public abstract class Functions
{
List<Function.Factory> factories = declared.get(name.toLowerCase());
if (factories.isEmpty())
- throw new InvalidRequestException(String.format("Unknown CQL3 function %s called", name));
+ return null;
// Fast path if there is not choice
if (factories.size() == 1)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/statements/CreateFunctionStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/CreateFunctionStatement.java b/src/java/org/apache/cassandra/cql3/statements/CreateFunctionStatement.java
new file mode 100644
index 0000000..094c318
--- /dev/null
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateFunctionStatement.java
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3.statements;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.cassandra.auth.Permission;
+import org.apache.cassandra.config.Schema;
+import org.apache.cassandra.config.UFMetaData;
+import org.apache.cassandra.cql3.CQL3Type;
+import org.apache.cassandra.cql3.ColumnIdentifier;
+import org.apache.cassandra.cql3.QueryOptions;
+import org.apache.cassandra.cql3.functions.Functions;
+import org.apache.cassandra.cql3.udf.UDFRegistry;
+import org.apache.cassandra.exceptions.InvalidRequestException;
+import org.apache.cassandra.exceptions.RequestValidationException;
+import org.apache.cassandra.exceptions.UnauthorizedException;
+import org.apache.cassandra.service.ClientState;
+import org.apache.cassandra.service.MigrationManager;
+import org.apache.cassandra.service.QueryState;
+import org.apache.cassandra.transport.Event;
+import org.apache.cassandra.transport.messages.ResultMessage;
+
+/**
+ * A <code>CREATE FUNCTION</code> statement parsed from a CQL query.
+ */
+public final class CreateFunctionStatement extends SchemaAlteringStatement
+{
+ final boolean orReplace;
+ final boolean ifNotExists;
+ final String namespace;
+ final String functionName;
+ final String qualifiedName;
+ final String language;
+ final String body;
+ final boolean deterministic;
+ final CQL3Type.Raw returnType;
+ final List<Argument> arguments;
+
+ private UFMetaData ufMeta;
+
+ public CreateFunctionStatement(String namespace, String functionName, String language, String body, boolean deterministic,
+ CQL3Type.Raw returnType, List<Argument> arguments, boolean orReplace, boolean ifNotExists)
+ {
+ super();
+ this.namespace = namespace != null ? namespace : "";
+ this.functionName = functionName;
+ this.qualifiedName = UFMetaData.qualifiedName(namespace, functionName);
+ this.language = language;
+ this.body = body;
+ this.deterministic = deterministic;
+ this.returnType = returnType;
+ this.arguments = arguments;
+ assert functionName != null : "null function name";
+ assert language != null : "null function language";
+ assert body != null : "null function body";
+ assert returnType != null : "null function returnType";
+ assert arguments != null : "null function arguments";
+ this.orReplace = orReplace;
+ this.ifNotExists = ifNotExists;
+ }
+
+ public void checkAccess(ClientState state) throws UnauthorizedException
+ {
+ // TODO CASSANDRA-7557 (function DDL permission)
+
+ state.hasAllKeyspacesAccess(Permission.CREATE);
+ }
+
+ /**
+ * The <code>CqlParser</code> only goes as far as extracting the keyword arguments
+ * from these statements, so this method is responsible for processing and
+ * validating.
+ *
+ * @throws org.apache.cassandra.exceptions.InvalidRequestException if arguments are missing or unacceptable
+ */
+ public void validate(ClientState state) throws RequestValidationException
+ {
+ if (!namespace.isEmpty() && !namespace.matches("\\w+"))
+ throw new InvalidRequestException(String.format("\"%s\" is not a valid function name", qualifiedName));
+ if (!functionName.matches("\\w+"))
+ throw new InvalidRequestException(String.format("\"%s\" is not a valid function name", qualifiedName));
+ if (namespace.length() > Schema.NAME_LENGTH)
+ throw new InvalidRequestException(String.format("UDF namespace names shouldn't be more than %s characters long (got \"%s\")", Schema.NAME_LENGTH, qualifiedName));
+ if (functionName.length() > Schema.NAME_LENGTH)
+ throw new InvalidRequestException(String.format("UDF function names shouldn't be more than %s characters long (got \"%s\")", Schema.NAME_LENGTH, qualifiedName));
+ }
+
+ public Event.SchemaChange changeEvent()
+ {
+ return null;
+ }
+
+ public ResultMessage executeInternal(QueryState state, QueryOptions options)
+ {
+ try
+ {
+ doExecute();
+ return super.executeInternal(state, options);
+ }
+ catch (RequestValidationException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public ResultMessage execute(QueryState state, QueryOptions options) throws RequestValidationException
+ {
+ doExecute();
+ return super.execute(state, options);
+ }
+
+ private void doExecute() throws RequestValidationException
+ {
+ boolean exists = UDFRegistry.hasFunction(qualifiedName);
+ if (exists && ifNotExists)
+ throw new InvalidRequestException(String.format("Function '%s' already exists.", qualifiedName));
+ if (exists && !orReplace)
+ throw new InvalidRequestException(String.format("Function '%s' already exists.", qualifiedName));
+
+ if (namespace.isEmpty() && Functions.contains(functionName))
+ throw new InvalidRequestException(String.format("Function name '%s' is reserved by CQL.", qualifiedName));
+
+ List<Argument> args = arguments;
+ List<String> argumentNames = new ArrayList<>(args.size());
+ List<String> argumentTypes = new ArrayList<>(args.size());
+ for (Argument arg : args)
+ {
+ argumentNames.add(arg.getName().toString());
+ argumentTypes.add(arg.getType().toString());
+ }
+ this.ufMeta = new UFMetaData(namespace, functionName, deterministic, argumentNames, argumentTypes,
+ returnType.toString(), language, body);
+
+ UDFRegistry.tryCreateFunction(ufMeta);
+ }
+
+ public void announceMigration(boolean isLocalOnly) throws RequestValidationException
+ {
+ MigrationManager.announceNewFunction(ufMeta, isLocalOnly);
+ }
+
+ public static final class Argument
+ {
+ final ColumnIdentifier name;
+ final CQL3Type.Raw type;
+
+ public Argument(ColumnIdentifier name, CQL3Type.Raw type)
+ {
+ this.name = name;
+ this.type = type;
+ }
+
+ public ColumnIdentifier getName()
+ {
+ return name;
+ }
+
+ public CQL3Type.Raw getType()
+ {
+ return type;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java b/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java
new file mode 100644
index 0000000..7627ab4
--- /dev/null
+++ b/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3.statements;
+
+import org.apache.cassandra.auth.Permission;
+import org.apache.cassandra.config.Schema;
+import org.apache.cassandra.config.UFMetaData;
+import org.apache.cassandra.exceptions.InvalidRequestException;
+import org.apache.cassandra.exceptions.RequestValidationException;
+import org.apache.cassandra.exceptions.UnauthorizedException;
+import org.apache.cassandra.service.ClientState;
+import org.apache.cassandra.service.MigrationManager;
+import org.apache.cassandra.transport.Event;
+
+/**
+ * A <code>DROP FUNCTION</code> statement parsed from a CQL query.
+ */
+public final class DropFunctionStatement extends SchemaAlteringStatement
+{
+ private final String namespace;
+ private final String functionName;
+ private final String qualifiedName;
+ private final boolean ifExists;
+
+ public DropFunctionStatement(String namespace, String functionName, boolean ifExists)
+ {
+ super();
+ this.namespace = namespace == null ? "" : namespace;
+ this.functionName = functionName;
+ this.qualifiedName = UFMetaData.qualifiedName(namespace, functionName);
+ this.ifExists = ifExists;
+ }
+
+ public void checkAccess(ClientState state) throws UnauthorizedException
+ {
+ // TODO CASSANDRA-7557 (function DDL permission)
+
+ state.hasAllKeyspacesAccess(Permission.DROP);
+ }
+
+ /**
+ * The <code>CqlParser</code> only goes as far as extracting the keyword arguments
+ * from these statements, so this method is responsible for processing and
+ * validating.
+ *
+ * @throws org.apache.cassandra.exceptions.InvalidRequestException if arguments are missing or unacceptable
+ */
+ public void validate(ClientState state) throws RequestValidationException
+ {
+ if (!namespace.isEmpty() && !namespace.matches("\\w+"))
+ throw new InvalidRequestException(String.format("\"%s\" is not a valid function name", qualifiedName));
+ if (!functionName.matches("\\w+"))
+ throw new InvalidRequestException(String.format("\"%s\" is not a valid function name", qualifiedName));
+ if (namespace.length() > Schema.NAME_LENGTH)
+ throw new InvalidRequestException(String.format("UDF namespace names shouldn't be more than %s characters long (got \"%s\")", Schema.NAME_LENGTH, qualifiedName));
+ if (functionName.length() > Schema.NAME_LENGTH)
+ throw new InvalidRequestException(String.format("UDF function names shouldn't be more than %s characters long (got \"%s\")", Schema.NAME_LENGTH, qualifiedName));
+ }
+
+ public Event.SchemaChange changeEvent()
+ {
+ return null;
+ }
+
+ // no execute() - drop propagated via MigrationManager
+
+ public void announceMigration(boolean isLocalOnly) throws RequestValidationException
+ {
+ try
+ {
+ MigrationManager.announceFunctionDrop(namespace, functionName, isLocalOnly);
+ }
+ catch (InvalidRequestException e)
+ {
+ if (!ifExists)
+ throw e;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/statements/SchemaAlteringStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/SchemaAlteringStatement.java b/src/java/org/apache/cassandra/cql3/statements/SchemaAlteringStatement.java
index e70aac9..876568a 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SchemaAlteringStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SchemaAlteringStatement.java
@@ -70,7 +70,8 @@ public abstract class SchemaAlteringStatement extends CFStatement implements CQL
public ResultMessage execute(QueryState state, QueryOptions options) throws RequestValidationException
{
announceMigration(false);
- return new ResultMessage.SchemaChange(changeEvent());
+ Event.SchemaChange ce = changeEvent();
+ return ce == null ? new ResultMessage.Void() : new ResultMessage.SchemaChange(ce);
}
public ResultMessage executeInternal(QueryState state, QueryOptions options)
@@ -78,7 +79,8 @@ public abstract class SchemaAlteringStatement extends CFStatement implements CQL
try
{
announceMigration(true);
- return new ResultMessage.SchemaChange(changeEvent());
+ Event.SchemaChange ce = changeEvent();
+ return ce == null ? new ResultMessage.Void() : new ResultMessage.SchemaChange(ce);
}
catch (RequestValidationException e)
{
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/statements/Selectable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/Selectable.java b/src/java/org/apache/cassandra/cql3/statements/Selectable.java
index 448301c..ab0a5a3 100644
--- a/src/java/org/apache/cassandra/cql3/statements/Selectable.java
+++ b/src/java/org/apache/cassandra/cql3/statements/Selectable.java
@@ -44,11 +44,13 @@ public interface Selectable
public static class WithFunction implements Selectable
{
+ public final String namespace;
public final String functionName;
public final List<Selectable> args;
- public WithFunction(String functionName, List<Selectable> args)
+ public WithFunction(String namespace, String functionName, List<Selectable> args)
{
+ this.namespace = namespace;
this.functionName = functionName;
this.args = args;
}
@@ -57,10 +59,13 @@ public interface Selectable
public String toString()
{
StringBuilder sb = new StringBuilder();
+ if (!namespace.isEmpty())
+ sb.append(namespace).append("::");
sb.append(functionName).append("(");
for (int i = 0; i < args.size(); i++)
{
- if (i > 0) sb.append(", ");
+ if (i > 0)
+ sb.append(", ");
sb.append(args.get(i));
}
return sb.append(")").toString();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/statements/Selection.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/Selection.java b/src/java/org/apache/cassandra/cql3/statements/Selection.java
index 0f0cb62..325ef15 100644
--- a/src/java/org/apache/cassandra/cql3/statements/Selection.java
+++ b/src/java/org/apache/cassandra/cql3/statements/Selection.java
@@ -29,6 +29,8 @@ import org.apache.cassandra.cql3.functions.Function;
import org.apache.cassandra.cql3.functions.Functions;
import org.apache.cassandra.config.CFMetaData;
import org.apache.cassandra.config.ColumnDefinition;
+import org.apache.cassandra.cql3.udf.UDFunction;
+import org.apache.cassandra.cql3.udf.UDFRegistry;
import org.apache.cassandra.db.Cell;
import org.apache.cassandra.db.CounterCell;
import org.apache.cassandra.db.ExpiringCell;
@@ -156,13 +158,26 @@ public abstract class Selection
else
{
Selectable.WithFunction withFun = (Selectable.WithFunction)raw.selectable;
- List<Selector> args = new ArrayList<Selector>(withFun.args.size());
+ List<Selector> args = new ArrayList<>(withFun.args.size());
for (Selectable rawArg : withFun.args)
args.add(makeSelector(cfm, new RawSelector(rawArg, null), defs, null));
+ // resolve built-in functions before user defined functions
AbstractType<?> returnType = Functions.getReturnType(withFun.functionName, cfm.ksName, cfm.cfName);
if (returnType == null)
- throw new InvalidRequestException(String.format("Unknown function '%s'", withFun.functionName));
+ {
+ UDFunction userFun = UDFRegistry.resolveFunction(withFun.namespace, withFun.functionName, cfm.ksName, cfm.cfName, args);
+ if (userFun != null)
+ {
+ // got a user defined function to call
+ Function fun = userFun.create(args);
+ ColumnSpecification spec = makeFunctionSpec(cfm, withFun, fun.returnType(), raw.alias);
+ if (metadata != null)
+ metadata.add(spec);
+ return new FunctionSelector(userFun.create(args), args);
+ }
+ throw new InvalidRequestException(String.format("Unknown function '%s'", withFun.namespace.isEmpty() ? withFun.functionName : withFun.namespace + "::" + withFun.functionName));
+ }
ColumnSpecification spec = makeFunctionSpec(cfm, withFun, returnType, raw.alias);
Function fun = Functions.get(cfm.ksName, withFun.functionName, args, spec);
if (metadata != null)
@@ -193,7 +208,7 @@ public abstract class Selection
ColumnIdentifier alias) throws InvalidRequestException
{
if (returnType == null)
- throw new InvalidRequestException(String.format("Unknown function %s called in selection clause", fun.functionName));
+ throw new InvalidRequestException(String.format("Unknown function %s called in selection clause", fun.namespace.isEmpty() ? fun.functionName : fun.namespace +"::"+fun.functionName));
return new ColumnSpecification(cfm.ksName,
cfm.cfName,
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/udf/UDFFunctionOverloads.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/udf/UDFFunctionOverloads.java b/src/java/org/apache/cassandra/cql3/udf/UDFFunctionOverloads.java
new file mode 100644
index 0000000..aa6892a
--- /dev/null
+++ b/src/java/org/apache/cassandra/cql3/udf/UDFFunctionOverloads.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3.udf;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.cassandra.config.UFMetaData;
+import org.apache.cassandra.cql3.AssignementTestable;
+import org.apache.cassandra.exceptions.InvalidRequestException;
+
+public final class UDFFunctionOverloads
+{
+ final Map<String, UFMetaData> signatureMap = new ConcurrentHashMap<>();
+ final Map<String, UDFunction> udfInstances = new ConcurrentHashMap<>();
+
+ public void addAndInit(UFMetaData uf, boolean addIfInvalid)
+ {
+ try
+ {
+ UDFunction UDFunction = new UDFunction(uf);
+ udfInstances.put(uf.signature, UDFunction);
+ }
+ catch (InvalidRequestException e)
+ {
+ uf.invalid = e;
+ }
+
+ if (uf.invalid == null || addIfInvalid)
+ signatureMap.put(uf.signature, uf);
+ }
+
+ public void remove(UFMetaData uf)
+ {
+ signatureMap.remove(uf.signature);
+ udfInstances.remove(uf.signature);
+ }
+
+ public Collection<UFMetaData> values()
+ {
+ return signatureMap.values();
+ }
+
+ public boolean isEmpty()
+ {
+ return signatureMap.isEmpty();
+ }
+
+ public UDFunction resolveFunction(String ksName, String cfName, List<? extends AssignementTestable> args)
+ throws InvalidRequestException
+ {
+ for (UFMetaData candidate : signatureMap.values())
+ {
+ // Currently the UDF implementation must use concrete types (like Double, Integer) instead of base types (like Number).
+ // To support handling of base types it is necessary to construct new, temporary instances of UDFFunction with the
+ // signature for the current request in UDFFunction#argsType + UDFFunction#returnType.
+ // Additionally we need the requested return type (AssignementTestable) has a parameter for this method.
+ if (candidate.compatibleArgs(ksName, cfName, args))
+ {
+
+ // TODO CASSANDRA-7557 (specific per-function EXECUTE permission ??)
+
+ if (candidate.invalid != null)
+ throw new InvalidRequestException(candidate.invalid.getMessage());
+ return udfInstances.get(candidate.signature);
+ }
+ }
+ return null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/udf/UDFRegistry.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/udf/UDFRegistry.java b/src/java/org/apache/cassandra/cql3/udf/UDFRegistry.java
new file mode 100644
index 0000000..cb3f1a1
--- /dev/null
+++ b/src/java/org/apache/cassandra/cql3/udf/UDFRegistry.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.cql3.udf;
+
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.cassandra.config.UFMetaData;
+import org.apache.cassandra.cql3.AssignementTestable;
+import org.apache.cassandra.cql3.QueryProcessor;
+import org.apache.cassandra.cql3.UntypedResultSet;
+import org.apache.cassandra.cql3.functions.Functions;
+import org.apache.cassandra.db.Keyspace;
+import org.apache.cassandra.db.SystemKeyspace;
+import org.apache.cassandra.exceptions.InvalidRequestException;
+
+/**
+ * Central registry for user defined functions (CASSANDRA-7395).
+ * <p/>
+ * UDFs are maintained in {@code system.schema_functions} table and distributed to all nodes.
+ * <p/>
+ * UDFs are not maintained in {@link org.apache.cassandra.cql3.functions.Functions} class to have a strict
+ * distinction between 'core CQL' functions provided by Cassandra and functions provided by the user.
+ * 'Core CQL' functions have precedence over UDFs.
+ */
+public class UDFRegistry
+{
+ private static final Logger logger = LoggerFactory.getLogger(UDFRegistry.class);
+
+ static final String SELECT_CQL = "SELECT namespace, name, signature, deterministic, argument_names, argument_types, " +
+ "return_type, language, body FROM " +
+ Keyspace.SYSTEM_KS + '.' + SystemKeyspace.SCHEMA_FUNCTIONS_CF;
+
+ private static final Map<String, UDFFunctionOverloads> functions = new ConcurrentHashMap<>();
+
+ public static void init()
+ {
+ refreshInitial();
+ }
+
+ /**
+ * Initial loading of all existing UDFs.
+ */
+ public static void refreshInitial()
+ {
+ logger.debug("Refreshing UDFs");
+ for (UntypedResultSet.Row row : QueryProcessor.executeOnceInternal(SELECT_CQL))
+ {
+ UFMetaData uf = UFMetaData.fromSchema(row);
+ UDFFunctionOverloads sigMap = functions.get(uf.qualifiedName);
+ if (sigMap == null)
+ functions.put(uf.qualifiedName, sigMap = new UDFFunctionOverloads());
+
+ if (Functions.contains(uf.qualifiedName))
+ logger.warn("The UDF '" + uf.functionName + "' cannot be used because it uses the same name as the CQL " +
+ "function with the same name. You should drop this function but can do a " +
+ "'DESCRIBE FUNCTION "+uf.functionName+";' in cqlsh before to get more information about it.");
+
+ // add the function to the registry even if it is invalid (to be able to drop it)
+ sigMap.addAndInit(uf, true);
+
+ if (uf.invalid != null)
+ logger.error("Loaded invalid UDF : " + uf.invalid.getMessage());
+ }
+ }
+
+ public static boolean hasFunction(String qualifiedName)
+ {
+ UDFFunctionOverloads sigMap = functions.get(qualifiedName.toLowerCase());
+ return sigMap != null && !sigMap.isEmpty();
+ }
+
+ public static UDFunction resolveFunction(String namespace, String functionName, String ksName, String cfName,
+ List<? extends AssignementTestable> args)
+ throws InvalidRequestException
+ {
+ UDFFunctionOverloads sigMap = functions.get(UFMetaData.qualifiedName(namespace, functionName));
+ if (sigMap != null)
+ return sigMap.resolveFunction(ksName, cfName, args);
+ return null;
+ }
+
+ public static void migrateDropFunction(UFMetaData uf)
+ {
+ UDFFunctionOverloads sigMap = functions.get(uf.qualifiedName);
+ if (sigMap == null)
+ return;
+
+ sigMap.remove(uf);
+ }
+
+ public static void migrateUpdateFunction(UFMetaData uf)
+ {
+ migrateAddFunction(uf);
+ }
+
+ public static void migrateAddFunction(UFMetaData uf)
+ {
+ addFunction(uf, true);
+ }
+
+ /**
+ * Used by {@link org.apache.cassandra.cql3.statements.CreateFunctionStatement} to create or replace a new function.
+ */
+ public static void tryCreateFunction(UFMetaData ufMeta) throws InvalidRequestException
+ {
+ addFunction(ufMeta, false);
+
+ if (ufMeta.invalid != null)
+ throw ufMeta.invalid;
+ }
+
+ private static void addFunction(UFMetaData uf, boolean addIfInvalid)
+ {
+ UDFFunctionOverloads sigMap = functions.get(uf.qualifiedName);
+ if (sigMap == null)
+ functions.put(uf.qualifiedName, sigMap = new UDFFunctionOverloads());
+
+ sigMap.addAndInit(uf, addIfInvalid);
+ }
+
+ public static UDFFunctionOverloads getFunctionSigMap(String qualifiedName)
+ {
+ return functions.get(qualifiedName);
+ }
+}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/cql3/udf/UDFunction.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/udf/UDFunction.java b/src/java/org/apache/cassandra/cql3/udf/UDFunction.java
new file mode 100644
index 0000000..4866c22
--- /dev/null
+++ b/src/java/org/apache/cassandra/cql3/udf/UDFunction.java
@@ -0,0 +1,178 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.cql3.udf;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.cassandra.config.UFMetaData;
+import org.apache.cassandra.cql3.AssignementTestable;
+import org.apache.cassandra.cql3.functions.Function;
+import org.apache.cassandra.db.marshal.AbstractType;
+import org.apache.cassandra.exceptions.InvalidRequestException;
+
+/**
+ * UDFunction contains the <i>invokable</i> instance of a user defined function.
+ * Currently (as of CASSANDRA-7395) only {@code public static} methods in a {@link public} class
+ * can be invoked.
+ * CASSANDRA-7562 will introduce Java source code UDFs and CASSANDRA-7526 will introduce JSR-223 scripting languages.
+ * Invocations of UDFs are routed via this class.
+ */
+public class UDFunction
+{
+ private static final Logger logger = LoggerFactory.getLogger(UDFunction.class);
+
+ public final UFMetaData meta;
+
+ public final Method method;
+
+ UDFunction(UFMetaData meta) throws InvalidRequestException
+ {
+ this.meta = meta;
+
+ Method m;
+ switch (meta.language)
+ {
+ case "class":
+ m = resolveClassMethod();
+ break;
+ default:
+ throw new InvalidRequestException("Invalid UDF language " + meta.language + " for '" + meta.qualifiedName + '\'');
+ }
+ this.method = m;
+ }
+
+ private Method resolveClassMethod() throws InvalidRequestException
+ {
+ Class<?> jReturnType = meta.cqlReturnType.getType().getSerializer().getType();
+ Class<?> paramTypes[] = new Class[meta.cqlArgumentTypes.size()];
+ for (int i = 0; i < paramTypes.length; i++)
+ paramTypes[i] = meta.cqlArgumentTypes.get(i).getType().getSerializer().getType();
+
+ String className;
+ String methodName;
+ int i = meta.body.indexOf('#');
+ if (i != -1)
+ {
+ methodName = meta.body.substring(i + 1);
+ className = meta.body.substring(0, i);
+ }
+ else
+ {
+ methodName = meta.functionName;
+ className = meta.body;
+ }
+ try
+ {
+ Class<?> cls = Class.forName(className, false, Thread.currentThread().getContextClassLoader());
+
+ Method method = cls.getMethod(methodName, paramTypes);
+
+ if (!jReturnType.isAssignableFrom(method.getReturnType()))
+ {
+ throw new InvalidRequestException("Method " + className + '.' + methodName + '(' + Arrays.toString(paramTypes) + ") " +
+ "has incompatible return type " + method.getReturnType() + " (not assignable to " + jReturnType + ')');
+ }
+
+ return method;
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new InvalidRequestException("Class " + className + " does not exist");
+ }
+ catch (NoSuchMethodException e)
+ {
+ throw new InvalidRequestException("Method " + className + '.' + methodName + '(' + Arrays.toString(paramTypes) + ") does not exist");
+ }
+ }
+
+ public Function create(List<? extends AssignementTestable> providedArgs) throws InvalidRequestException
+ {
+ final int argCount = providedArgs.size();
+ final List<AbstractType<?>> argsType = new ArrayList<>(argCount);
+ final AbstractType<?> returnType = meta.cqlReturnType.getType();
+ for (int i = 0; i < argCount; i++)
+ {
+ AbstractType<?> argType = meta.cqlArgumentTypes.get(i).getType();
+ argsType.add(argType);
+ }
+
+ return new Function()
+ {
+ public String name()
+ {
+ return meta.qualifiedName;
+ }
+
+ public List<AbstractType<?>> argsType()
+ {
+ return argsType;
+ }
+
+ public AbstractType<?> returnType()
+ {
+ return returnType;
+ }
+
+ public ByteBuffer execute(List<ByteBuffer> parameters) throws InvalidRequestException
+ {
+ Object[] parms = new Object[argCount];
+ for (int i = 0; i < parms.length; i++)
+ {
+ ByteBuffer bb = parameters.get(i);
+ if (bb != null)
+ {
+ AbstractType<?> argType = argsType.get(i);
+ parms[i] = argType.compose(bb);
+ }
+ }
+
+ Object result;
+ try
+ {
+ result = method.invoke(null, parms);
+ @SuppressWarnings("unchecked") ByteBuffer r = result != null ? ((AbstractType) returnType).decompose(result) : null;
+ return r;
+ }
+ catch (InvocationTargetException e)
+ {
+ Throwable c = e.getCause();
+ logger.error("Invocation of UDF {} failed", meta.qualifiedName, c);
+ throw new InvalidRequestException("Invocation of UDF " + meta.qualifiedName + " failed: " + c);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new InvalidRequestException("UDF " + meta.qualifiedName + " invocation failed: " + e);
+ }
+ }
+
+ public boolean isPure()
+ {
+ return meta.deterministic;
+ }
+ };
+ }
+}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/db/DefsTables.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/DefsTables.java b/src/java/org/apache/cassandra/db/DefsTables.java
index fc43c27..33a112a 100644
--- a/src/java/org/apache/cassandra/db/DefsTables.java
+++ b/src/java/org/apache/cassandra/db/DefsTables.java
@@ -24,6 +24,8 @@ import java.util.*;
import com.google.common.collect.Iterables;
import com.google.common.collect.MapDifference;
import com.google.common.collect.Maps;
+import org.apache.cassandra.config.UFMetaData;
+import org.apache.cassandra.cql3.udf.UDFRegistry;
import org.apache.cassandra.db.commitlog.CommitLog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -177,6 +179,7 @@ public class DefsTables
Map<DecoratedKey, ColumnFamily> oldKeyspaces = SystemKeyspace.getSchema(SystemKeyspace.SCHEMA_KEYSPACES_CF, keyspaces);
Map<DecoratedKey, ColumnFamily> oldColumnFamilies = SystemKeyspace.getSchema(SystemKeyspace.SCHEMA_COLUMNFAMILIES_CF, keyspaces);
Map<DecoratedKey, ColumnFamily> oldTypes = SystemKeyspace.getSchema(SystemKeyspace.SCHEMA_USER_TYPES_CF, keyspaces);
+ Map<DecoratedKey, ColumnFamily> oldFunctions = SystemKeyspace.getSchema(SystemKeyspace.SCHEMA_FUNCTIONS_CF);
for (Mutation mutation : mutations)
mutation.apply();
@@ -188,10 +191,12 @@ public class DefsTables
Map<DecoratedKey, ColumnFamily> newKeyspaces = SystemKeyspace.getSchema(SystemKeyspace.SCHEMA_KEYSPACES_CF, keyspaces);
Map<DecoratedKey, ColumnFamily> newColumnFamilies = SystemKeyspace.getSchema(SystemKeyspace.SCHEMA_COLUMNFAMILIES_CF, keyspaces);
Map<DecoratedKey, ColumnFamily> newTypes = SystemKeyspace.getSchema(SystemKeyspace.SCHEMA_USER_TYPES_CF, keyspaces);
+ Map<DecoratedKey, ColumnFamily> newFunctions = SystemKeyspace.getSchema(SystemKeyspace.SCHEMA_FUNCTIONS_CF);
Set<String> keyspacesToDrop = mergeKeyspaces(oldKeyspaces, newKeyspaces);
mergeColumnFamilies(oldColumnFamilies, newColumnFamilies);
mergeTypes(oldTypes, newTypes);
+ mergeFunctions(oldFunctions, newFunctions);
// it is safe to drop a keyspace only when all nested ColumnFamilies where deleted
for (String keyspaceToDrop : keyspacesToDrop)
@@ -377,6 +382,54 @@ public class DefsTables
}
}
+ private static void mergeFunctions(Map<DecoratedKey, ColumnFamily> old, Map<DecoratedKey, ColumnFamily> updated)
+ {
+ MapDifference<DecoratedKey, ColumnFamily> diff = Maps.difference(old, updated);
+
+ // New namespace with functions
+ for (Map.Entry<DecoratedKey, ColumnFamily> entry : diff.entriesOnlyOnRight().entrySet())
+ {
+ ColumnFamily cfFunctions = entry.getValue();
+ if (!cfFunctions.hasColumns())
+ continue;
+
+ for (UFMetaData uf : UFMetaData.fromSchema(new Row(entry.getKey(), cfFunctions)).values())
+ addFunction(uf);
+ }
+
+ for (Map.Entry<DecoratedKey, MapDifference.ValueDifference<ColumnFamily>> modifiedEntry : diff.entriesDiffering().entrySet())
+ {
+ DecoratedKey namespace = modifiedEntry.getKey();
+ ColumnFamily prevCFFunctions = modifiedEntry.getValue().leftValue(); // state before external modification
+ ColumnFamily newCFFunctions = modifiedEntry.getValue().rightValue(); // updated state
+
+ if (!prevCFFunctions.hasColumns()) // whole namespace was deleted and now it's re-created
+ {
+ for (UFMetaData uf : UFMetaData.fromSchema(new Row(namespace, newCFFunctions)).values())
+ addFunction(uf);
+ }
+ else if (!newCFFunctions.hasColumns()) // whole namespace is deleted
+ {
+ for (UFMetaData uf : UFMetaData.fromSchema(new Row(namespace, prevCFFunctions)).values())
+ dropFunction(uf);
+ }
+ else // has modifications in the functions, need to perform nested diff to determine what was really changed
+ {
+ MapDifference<String, UFMetaData> functionsDiff = Maps.difference(UFMetaData.fromSchema(new Row(namespace, prevCFFunctions)),
+ UFMetaData.fromSchema(new Row(namespace, newCFFunctions)));
+
+ for (UFMetaData function : functionsDiff.entriesOnlyOnRight().values())
+ addFunction(function);
+
+ for (UFMetaData function : functionsDiff.entriesOnlyOnLeft().values())
+ dropFunction(function);
+
+ for (MapDifference.ValueDifference<UFMetaData> tdiff : functionsDiff.entriesDiffering().values())
+ updateFunction(tdiff.rightValue()); // use the most recent value
+ }
+ }
+ }
+
private static void addKeyspace(KSMetaData ksm)
{
assert Schema.instance.getKSMetaData(ksm.name) == null;
@@ -425,6 +478,16 @@ public class DefsTables
MigrationManager.instance.notifyCreateUserType(ut);
}
+ private static void addFunction(UFMetaData uf)
+ {
+ logger.info("Loading {}", uf);
+
+ UDFRegistry.migrateAddFunction(uf);
+
+ if (!StorageService.instance.isClientMode())
+ MigrationManager.instance.notifyCreateFunction(uf);
+ }
+
private static void updateKeyspace(KSMetaData newState)
{
KSMetaData oldKsm = Schema.instance.getKSMetaData(newState.name);
@@ -467,6 +530,16 @@ public class DefsTables
MigrationManager.instance.notifyUpdateUserType(ut);
}
+ private static void updateFunction(UFMetaData uf)
+ {
+ logger.info("Updating {}", uf);
+
+ UDFRegistry.migrateUpdateFunction(uf);
+
+ if (!StorageService.instance.isClientMode())
+ MigrationManager.instance.notifyUpdateFunction(uf);
+ }
+
private static void dropKeyspace(String ksName)
{
KSMetaData ksm = Schema.instance.getKSMetaData(ksName);
@@ -546,6 +619,16 @@ public class DefsTables
MigrationManager.instance.notifyDropUserType(ut);
}
+ private static void dropFunction(UFMetaData uf)
+ {
+ logger.info("Drop {}", uf);
+
+ UDFRegistry.migrateDropFunction(uf);
+
+ if (!StorageService.instance.isClientMode())
+ MigrationManager.instance.notifyDropFunction(uf);
+ }
+
private static KSMetaData makeNewKeyspaceDefinition(KSMetaData ksm, CFMetaData toExclude)
{
// clone ksm but do not include the new def
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/db/SystemKeyspace.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/SystemKeyspace.java b/src/java/org/apache/cassandra/db/SystemKeyspace.java
index 3c647b6..8b62740 100644
--- a/src/java/org/apache/cassandra/db/SystemKeyspace.java
+++ b/src/java/org/apache/cassandra/db/SystemKeyspace.java
@@ -80,6 +80,7 @@ public class SystemKeyspace
public static final String SCHEMA_COLUMNS_CF = "schema_columns";
public static final String SCHEMA_TRIGGERS_CF = "schema_triggers";
public static final String SCHEMA_USER_TYPES_CF = "schema_usertypes";
+ public static final String SCHEMA_FUNCTIONS_CF = "schema_functions";
public static final String COMPACTION_LOG = "compactions_in_progress";
public static final String PAXOS_CF = "paxos";
public static final String SSTABLE_ACTIVITY_CF = "sstable_activity";
@@ -91,7 +92,8 @@ public class SystemKeyspace
SCHEMA_COLUMNFAMILIES_CF,
SCHEMA_COLUMNS_CF,
SCHEMA_TRIGGERS_CF,
- SCHEMA_USER_TYPES_CF);
+ SCHEMA_USER_TYPES_CF,
+ SCHEMA_FUNCTIONS_CF);
private static volatile Map<UUID, Pair<ReplayPosition, Long>> truncationRecords;
@@ -769,6 +771,16 @@ public class SystemKeyspace
}
}
+ public static Map<DecoratedKey, ColumnFamily> getSchema(String cfName)
+ {
+ Map<DecoratedKey, ColumnFamily> schema = new HashMap<>();
+
+ for (Row schemaEntity : SystemKeyspace.serializedSchema(cfName))
+ schema.put(schemaEntity.key, schemaEntity.cf);
+
+ return schema;
+ }
+
public static Map<DecoratedKey, ColumnFamily> getSchema(String schemaCfName, Set<String> keyspaces)
{
Map<DecoratedKey, ColumnFamily> schema = new HashMap<>();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/service/CassandraDaemon.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 5c88cb1..71cba23 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -33,6 +33,7 @@ import javax.management.StandardMBean;
import com.google.common.collect.Iterables;
import com.google.common.util.concurrent.Uninterruptibles;
+import org.apache.cassandra.cql3.udf.UDFRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -372,6 +373,9 @@ public class CassandraDaemon
if (!FBUtilities.getBroadcastAddress().equals(InetAddress.getLoopbackAddress()))
waitForGossipToSettle();
+ // UDF
+ UDFRegistry.init();
+
// Thift
InetAddress rpcAddr = DatabaseDescriptor.getRpcAddress();
int rpcPort = DatabaseDescriptor.getRpcPort();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/service/IMigrationListener.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/IMigrationListener.java b/src/java/org/apache/cassandra/service/IMigrationListener.java
index 4d142bd..b4eb392 100644
--- a/src/java/org/apache/cassandra/service/IMigrationListener.java
+++ b/src/java/org/apache/cassandra/service/IMigrationListener.java
@@ -22,12 +22,16 @@ public interface IMigrationListener
public void onCreateKeyspace(String ksName);
public void onCreateColumnFamily(String ksName, String cfName);
public void onCreateUserType(String ksName, String typeName);
+ public void onCreateFunction(String namespace, String functionName);
public void onUpdateKeyspace(String ksName);
public void onUpdateColumnFamily(String ksName, String cfName);
public void onUpdateUserType(String ksName, String typeName);
+ public void onUpdateFunction(String namespace, String functionName);
public void onDropKeyspace(String ksName);
public void onDropColumnFamily(String ksName, String cfName);
public void onDropUserType(String ksName, String typeName);
+ public void onDropFunction(String namespace, String functionName);
+
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/service/MigrationManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java
index 5dd2534..28e3e39 100644
--- a/src/java/org/apache/cassandra/service/MigrationManager.java
+++ b/src/java/org/apache/cassandra/service/MigrationManager.java
@@ -29,6 +29,9 @@ import java.util.concurrent.*;
import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
+import org.apache.cassandra.config.UFMetaData;
+import org.apache.cassandra.exceptions.InvalidRequestException;
+import org.apache.cassandra.exceptions.SyntaxException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -173,6 +176,24 @@ public class MigrationManager
listener.onCreateUserType(ut.keyspace, ut.getNameAsString());
}
+ public void notifyCreateFunction(UFMetaData uf)
+ {
+ for (IMigrationListener listener : listeners)
+ listener.onCreateFunction(uf.namespace, uf.functionName);
+ }
+
+ public void notifyUpdateFunction(UFMetaData uf)
+ {
+ for (IMigrationListener listener : listeners)
+ listener.onUpdateFunction(uf.namespace, uf.functionName);
+ }
+
+ public void notifyDropFunction(UFMetaData uf)
+ {
+ for (IMigrationListener listener : listeners)
+ listener.onDropFunction(uf.namespace, uf.functionName);
+ }
+
public void notifyUpdateKeyspace(KSMetaData ksm)
{
for (IMigrationListener listener : listeners)
@@ -352,6 +373,27 @@ public class MigrationManager
announce(addSerializedKeyspace(UTMetaData.dropFromSchema(droppedType, FBUtilities.timestampMicros()), droppedType.keyspace), announceLocally);
}
+ public static void announceFunctionDrop(String namespace, String functionName, boolean announceLocally) throws InvalidRequestException
+ {
+ Mutation mutation = UFMetaData.dropFunction(FBUtilities.timestampMicros(), namespace, functionName);
+ if (mutation == null)
+ throw new InvalidRequestException(String.format("Cannot drop non existing function '%s'.", functionName));
+
+ logger.info(String.format("Drop Function '%s::%s'", namespace, functionName));
+ announce(mutation, announceLocally);
+ }
+
+ public static void announceNewFunction(UFMetaData function, boolean announceLocally)
+ throws ConfigurationException, SyntaxException
+ {
+ Mutation mutation = UFMetaData.createOrReplaceFunction(FBUtilities.timestampMicros(), function);
+ if (mutation == null)
+ throw new ConfigurationException(String.format("Function '%s' already exists.", function.qualifiedName));
+
+ logger.info(String.format("Create Function '%s'", function));
+ announce(mutation, announceLocally);
+ }
+
/**
* actively announce a new version to active hosts via rpc
* @param schema The schema mutation to be applied
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25411bf1/src/java/org/apache/cassandra/transport/Event.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/transport/Event.java b/src/java/org/apache/cassandra/transport/Event.java
index b7c5e68..85943cf 100644
--- a/src/java/org/apache/cassandra/transport/Event.java
+++ b/src/java/org/apache/cassandra/transport/Event.java
@@ -208,18 +208,18 @@ public abstract class Event
public final Change change;
public final Target target;
- public final String keyspace;
- public final String tableOrType;
+ public final String keyOrNamespace;
+ public final String tableOrTypeOrFunction;
- public SchemaChange(Change change, Target target, String keyspace, String tableOrType)
+ public SchemaChange(Change change, Target target, String keyOrNamespace, String tableOrTypeOrFunction)
{
super(Type.SCHEMA_CHANGE);
this.change = change;
this.target = target;
- this.keyspace = keyspace;
- this.tableOrType = tableOrType;
+ this.keyOrNamespace = keyOrNamespace;
+ this.tableOrTypeOrFunction = tableOrTypeOrFunction;
if (target != Target.KEYSPACE)
- assert this.tableOrType != null : "Table or type should be set for non-keyspace schema change events";
+ assert this.tableOrTypeOrFunction != null : "Table or type should be set for non-keyspace schema change events";
}
public SchemaChange(Change change, String keyspace)
@@ -252,9 +252,9 @@ public abstract class Event
{
CBUtil.writeEnumValue(change, dest);
CBUtil.writeEnumValue(target, dest);
- CBUtil.writeString(keyspace, dest);
+ CBUtil.writeString(keyOrNamespace, dest);
if (target != Target.KEYSPACE)
- CBUtil.writeString(tableOrType, dest);
+ CBUtil.writeString(tableOrTypeOrFunction, dest);
}
else
{
@@ -263,14 +263,14 @@ public abstract class Event
// For the v1/v2 protocol, we have no way to represent type changes, so we simply say the keyspace
// was updated. See CASSANDRA-7617.
CBUtil.writeEnumValue(Change.UPDATED, dest);
- CBUtil.writeString(keyspace, dest);
+ CBUtil.writeString(keyOrNamespace, dest);
CBUtil.writeString("", dest);
}
else
{
CBUtil.writeEnumValue(change, dest);
- CBUtil.writeString(keyspace, dest);
- CBUtil.writeString(target == Target.KEYSPACE ? "" : tableOrType, dest);
+ CBUtil.writeString(keyOrNamespace, dest);
+ CBUtil.writeString(target == Target.KEYSPACE ? "" : tableOrTypeOrFunction, dest);
}
}
}
@@ -281,10 +281,10 @@ public abstract class Event
{
int size = CBUtil.sizeOfEnumValue(change)
+ CBUtil.sizeOfEnumValue(target)
- + CBUtil.sizeOfString(keyspace);
+ + CBUtil.sizeOfString(keyOrNamespace);
if (target != Target.KEYSPACE)
- size += CBUtil.sizeOfString(tableOrType);
+ size += CBUtil.sizeOfString(tableOrTypeOrFunction);
return size;
}
@@ -293,25 +293,25 @@ public abstract class Event
if (target == Target.TYPE)
{
return CBUtil.sizeOfEnumValue(Change.UPDATED)
- + CBUtil.sizeOfString(keyspace)
+ + CBUtil.sizeOfString(keyOrNamespace)
+ CBUtil.sizeOfString("");
}
return CBUtil.sizeOfEnumValue(change)
- + CBUtil.sizeOfString(keyspace)
- + CBUtil.sizeOfString(target == Target.KEYSPACE ? "" : tableOrType);
+ + CBUtil.sizeOfString(keyOrNamespace)
+ + CBUtil.sizeOfString(target == Target.KEYSPACE ? "" : tableOrTypeOrFunction);
}
}
@Override
public String toString()
{
- return change + " " + target + " " + keyspace + (tableOrType == null ? "" : "." + tableOrType);
+ return change + " " + target + " " + keyOrNamespace + (tableOrTypeOrFunction == null ? "" : "." + tableOrTypeOrFunction);
}
@Override
public int hashCode()
{
- return Objects.hashCode(change, target, keyspace, tableOrType);
+ return Objects.hashCode(change, target, keyOrNamespace, tableOrTypeOrFunction);
}
@Override
@@ -323,8 +323,8 @@ public abstract class Event
SchemaChange scc = (SchemaChange)other;
return Objects.equal(change, scc.change)
&& Objects.equal(target, scc.target)
- && Objects.equal(keyspace, scc.keyspace)
- && Objects.equal(tableOrType, scc.tableOrType);
+ && Objects.equal(keyOrNamespace, scc.keyOrNamespace)
+ && Objects.equal(tableOrTypeOrFunction, scc.tableOrTypeOrFunction);
}
}
}
[06/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/80820109
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/80820109
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/80820109
Branch: refs/heads/cassandra-2.1
Commit: 80820109b8ad38b1be048666a1d9ef7672ff129c
Parents: 26cd440 b4741d0
Author: Brandon Williams <br...@apache.org>
Authored: Tue Aug 5 10:46:27 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Tue Aug 5 10:46:27 2014 -0500
----------------------------------------------------------------------
src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java | 4 ----
1 file changed, 4 deletions(-)
----------------------------------------------------------------------
[08/50] [abbrv] git commit: Merge branch 'cassandra-2.0' into
cassandra-2.1
Posted by jm...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1e0b4c5e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1e0b4c5e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1e0b4c5e
Branch: refs/heads/cassandra-2.1
Commit: 1e0b4c5e9618e740803a1653c51a82b78df7808c
Parents: b4741d0 d5d1adb
Author: Brandon Williams <br...@apache.org>
Authored: Tue Aug 5 13:59:56 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Tue Aug 5 13:59:56 2014 -0500
----------------------------------------------------------------------
.../cassandra/hadoop/cql3/CqlConfigHelper.java | 5 ++++
.../cassandra/locator/SimpleSeedProvider.java | 27 ++++++++++++++++----
2 files changed, 27 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/1e0b4c5e/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/locator/SimpleSeedProvider.java
index 6f36cd0,eda9fff..8e7d9fc
--- a/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java
+++ b/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java
@@@ -63,9 -80,9 +80,9 @@@ public class SimpleSeedProvider impleme
catch (UnknownHostException ex)
{
// not fatal... DD will bark if there end up being zero seeds.
- logger.warn("Seed provider couldn't lookup host " + host);
+ logger.warn("Seed provider couldn't lookup host {}", host);
}
}
- return Collections.unmodifiableList(seeds);
+ return seeds;
}
}
[42/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/2f25e6e6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2f25e6e6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2f25e6e6
Branch: refs/heads/cassandra-2.1
Commit: 2f25e6e6ea1b1f428873eb964dfc8df401d2bb2d
Parents: 05eac99 8aed419
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Fri Aug 8 12:51:12 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri Aug 8 12:51:12 2014 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
build.xml | 5 +++++
debian/rules | 1 +
3 files changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2f25e6e6/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2f25e6e6/build.xml
----------------------------------------------------------------------
[49/50] [abbrv] git commit: Prompt on missing dependency in cqlsh on
Windows Patch by Josh McKenzie, reviewed by Jonathan Ellis for CASSANDRA-7749
Posted by jm...@apache.org.
Prompt on missing dependency in cqlsh on Windows
Patch by Josh McKenzie, reviewed by Jonathan Ellis for CASSANDRA-7749
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/70d9f895
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70d9f895
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70d9f895
Branch: refs/heads/cassandra-2.1
Commit: 70d9f895da5ddcdeb2799baffa160fb4eaa72717
Parents: cb8ce83
Author: Joshua McKenzie <Jo...@datastax.com>
Authored: Mon Aug 11 15:30:19 2014 -0500
Committer: Joshua McKenzie <Jo...@datastax.com>
Committed: Mon Aug 11 15:30:19 2014 -0500
----------------------------------------------------------------------
bin/cqlsh | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/70d9f895/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index a4ad6d0..5b63696 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -728,6 +728,8 @@ class Shell(cmd.Cmd):
try:
import readline
except ImportError:
+ if platform.system() == 'Windows':
+ print "WARNING: pyreadline dependency missing. Install to enable tab completion."
pass
else:
old_completer = readline.get_completer()
[41/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/05eac99d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05eac99d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05eac99d
Branch: refs/heads/cassandra-2.1
Commit: 05eac99d350b9841dd01ec6b6261a5a1d5c0ef08
Parents: 4c3ba4f fcb79b7
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Fri Aug 8 12:44:32 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri Aug 8 12:44:32 2014 +0200
----------------------------------------------------------------------
tools/lib/cassandra-driver-core-2.0.1.jar | Bin 519771 -> 0 bytes
tools/lib/cassandra-driver-core-2.0.4.jar | Bin 0 -> 544025 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
[31/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/00d7e4c7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/00d7e4c7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/00d7e4c7
Branch: refs/heads/cassandra-2.1
Commit: 00d7e4c7fd8f746f862a21736e80053ba2c779f5
Parents: fe30c2c 2cbc280
Author: Tyler Hobbs <ty...@datastax.com>
Authored: Wed Aug 6 14:48:56 2014 -0500
Committer: Tyler Hobbs <ty...@datastax.com>
Committed: Wed Aug 6 14:48:56 2014 -0500
----------------------------------------------------------------------
pylib/cqlshlib/test/test_cqlsh_output.py | 30 +++++++++++++++++++--------
1 file changed, 21 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
[20/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/15280641
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/15280641
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/15280641
Branch: refs/heads/cassandra-2.1
Commit: 1528064146298a4d628fb51db47e5313d0340e59
Parents: 487de3d b4aa750
Author: Brandon Williams <br...@apache.org>
Authored: Wed Aug 6 11:16:24 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Aug 6 11:16:24 2014 -0500
----------------------------------------------------------------------
.../cql3/IterableCqlPagingRecordReader.java | 73 --------------------
1 file changed, 73 deletions(-)
----------------------------------------------------------------------
[32/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@apache.org.
Merge branch 'cassandra-2.1' into trunk
Conflicts:
build.xml
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/59123b6f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/59123b6f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/59123b6f
Branch: refs/heads/cassandra-2.1
Commit: 59123b6f7d8d8d84a61716f9f2bb4a18c620a764
Parents: 00d7e4c 6beb13f
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Thu Aug 7 00:51:07 2014 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Thu Aug 7 00:51:07 2014 +0300
----------------------------------------------------------------------
build.xml | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/59123b6f/build.xml
----------------------------------------------------------------------
[50/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@apache.org.
Merge branch 'cassandra-2.1' into trunk
Conflicts:
test/system/test_thrift_server.py
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cb8ce832
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cb8ce832
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cb8ce832
Branch: refs/heads/cassandra-2.1
Commit: cb8ce83257c0f90e7b338bf16064142d571f0132
Parents: 755d345 334969f
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Tue Aug 12 00:18:54 2014 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Tue Aug 12 00:18:54 2014 +0300
----------------------------------------------------------------------
test/system/__init__.py | 184 ---
test/system/test_thrift_server.py | 2113 --------------------------------
2 files changed, 2297 deletions(-)
----------------------------------------------------------------------
[12/50] [abbrv] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jm...@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/25041771
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/25041771
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/25041771
Branch: refs/heads/cassandra-2.1
Commit: 25041771f74ad842aee66f79f0d3c09cdadb0872
Parents: 8625661 bd191f1
Author: Brandon Williams <br...@apache.org>
Authored: Tue Aug 5 14:22:20 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Tue Aug 5 14:22:20 2014 -0500
----------------------------------------------------------------------
src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------