You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2014/09/03 19:48:59 UTC

[1/6] git commit: Make disruptor_thrift_server invocation pool configurable patch by Pavel Yaskevich; reviewed by Jason Brown for CASSANDRA-7594

Repository: cassandra
Updated Branches:
  refs/heads/trunk a88a78380 -> 936dea895


Make disruptor_thrift_server invocation pool configurable
patch by Pavel Yaskevich; reviewed by Jason Brown for CASSANDRA-7594


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b22089d7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b22089d7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b22089d7

Branch: refs/heads/trunk
Commit: b22089d7c8f723defec10359e026c767cae57224
Parents: 968ffd8
Author: Pavel Yaskevich <xe...@apache.org>
Authored: Tue Sep 2 15:44:48 2014 -0700
Committer: Pavel Yaskevich <xe...@apache.org>
Committed: Tue Sep 2 16:14:27 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                        |   1 +
 build.xml                                          |   4 ++--
 lib/thrift-server-0.3.6.jar                        | Bin 0 -> 39588 bytes
 lib/thrift-server-internal-only-0.3.3.jar          | Bin 39191 -> 0 bytes
 .../cassandra/thrift/THsHaDisruptorServer.java     |  13 +++++++++++++
 5 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b22089d7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6d77f3c..4954b7f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -5,6 +5,7 @@
  * Always reject inequality on the partition key without token()
    (CASSANDRA-7722)
  * Always send Paxos commit to all replicas (CASSANDRA-7479)
+ * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594)
 
 
 2.0.10

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b22089d7/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index dd59bd2..f456fa8 100644
--- a/build.xml
+++ b/build.xml
@@ -361,7 +361,7 @@
           <dependency groupId="com.googlecode.json-simple" artifactId="json-simple" version="1.1"/>
           <dependency groupId="com.github.stephenc.high-scale-lib" artifactId="high-scale-lib" version="1.1.2"/>
           <dependency groupId="com.github.stephenc" artifactId="jamm" version="0.2.5"/>
-	   <dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.3"/>
+	   <dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.6"/>
           <dependency groupId="org.yaml" artifactId="snakeyaml" version="1.11"/>
           <dependency groupId="org.apache.thrift" artifactId="libthrift" version="0.9.1"/>
 
@@ -467,7 +467,7 @@
         <dependency groupId="org.mindrot" artifactId="jbcrypt"/>
         <dependency groupId="com.yammer.metrics" artifactId="metrics-core"/>
         <dependency groupId="com.addthis.metrics" artifactId="reporter-config"/>
-        <dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.3"/>
+        <dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.6"/>
         <dependency groupId="net.sf.supercsv" artifactId="super-csv" version="2.1.0" />
 
         <dependency groupId="log4j" artifactId="log4j"/>

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b22089d7/lib/thrift-server-0.3.6.jar
----------------------------------------------------------------------
diff --git a/lib/thrift-server-0.3.6.jar b/lib/thrift-server-0.3.6.jar
new file mode 100644
index 0000000..c974f75
Binary files /dev/null and b/lib/thrift-server-0.3.6.jar differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b22089d7/lib/thrift-server-internal-only-0.3.3.jar
----------------------------------------------------------------------
diff --git a/lib/thrift-server-internal-only-0.3.3.jar b/lib/thrift-server-internal-only-0.3.3.jar
deleted file mode 100644
index 6a1fbae..0000000
Binary files a/lib/thrift-server-internal-only-0.3.3.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b22089d7/src/java/org/apache/cassandra/thrift/THsHaDisruptorServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/THsHaDisruptorServer.java b/src/java/org/apache/cassandra/thrift/THsHaDisruptorServer.java
index e3b89d2..dd501ec 100644
--- a/src/java/org/apache/cassandra/thrift/THsHaDisruptorServer.java
+++ b/src/java/org/apache/cassandra/thrift/THsHaDisruptorServer.java
@@ -19,9 +19,14 @@
 package org.apache.cassandra.thrift;
 
 import java.net.InetSocketAddress;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
 
 import com.thinkaurelius.thrift.Message;
 import com.thinkaurelius.thrift.TDisruptorServer;
+import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor;
+import org.apache.cassandra.concurrent.NamedThreadFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -78,6 +83,13 @@ public class THsHaDisruptorServer extends TDisruptorServer
                 throw new RuntimeException(String.format("Unable to create thrift socket to %s:%s", addr.getAddress(), addr.getPort()), e);
             }
 
+            ThreadPoolExecutor invoker = new JMXEnabledThreadPoolExecutor(DatabaseDescriptor.getRpcMinThreads(),
+                                                                          DatabaseDescriptor.getRpcMaxThreads(),
+                                                                          60L,
+                                                                          TimeUnit.SECONDS,
+                                                                          new SynchronousQueue<Runnable>(),
+                                                                          new NamedThreadFactory("RPC-Thread"), "RPC-THREAD-POOL");
+
             com.thinkaurelius.thrift.util.TBinaryProtocol.Factory protocolFactory = new com.thinkaurelius.thrift.util.TBinaryProtocol.Factory(true, true);
 
             TDisruptorServer.Args serverArgs = new TDisruptorServer.Args(serverTransport).useHeapBasedAllocation(true)
@@ -87,6 +99,7 @@ public class THsHaDisruptorServer extends TDisruptorServer
                                                                                          .outputProtocolFactory(protocolFactory)
                                                                                          .processor(args.processor)
                                                                                          .maxFrameSizeInBytes(DatabaseDescriptor.getThriftFramedTransportSize())
+                                                                                         .invocationExecutor(invoker)
                                                                                          .alwaysReallocateBuffers(true);
 
             return new THsHaDisruptorServer(serverArgs);


[6/6] git commit: Merge branch 'cassandra-2.1' into trunk

Posted by ja...@apache.org.
Merge branch 'cassandra-2.1' into trunk

Conflicts:
	CHANGES.txt


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/936dea89
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/936dea89
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/936dea89

Branch: refs/heads/trunk
Commit: 936dea8952820b4eb16b87963a86a358389321f0
Parents: a88a783 c99f37e
Author: Jason Brown <ja...@apple.com>
Authored: Wed Sep 3 10:48:50 2014 -0700
Committer: Jason Brown <ja...@apple.com>
Committed: Wed Sep 3 10:48:50 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                        |   9 +++++++++
 build.xml                                          |   4 ++--
 lib/thrift-server-0.3.5.jar                        | Bin 39220 -> 0 bytes
 lib/thrift-server-0.3.6.jar                        | Bin 0 -> 39588 bytes
 .../cassandra/thrift/THsHaDisruptorServer.java     |  13 +++++++++++++
 5 files changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/936dea89/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 281b63b,e93b16c..dd847cd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -86,6 -65,14 +86,15 @@@ Merged from 2.0
   * Always reject inequality on the partition key without token()
     (CASSANDRA-7722)
   * Always send Paxos commit to all replicas (CASSANDRA-7479)
+  * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594)
+ 
+ 
+ 2.0.10
+ >>>>>>> cassandra-2.0
+  * Don't send schema change responses and events for no-op DDL
+    statements (CASSANDRA-7600)
+  * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774)
++>>>>>>> cassandra-2.1
   * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753)
   * Fix ALTER clustering column type from DateType to TimestampType when
     using DESC clustering order (CASSANRDA-7797)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/936dea89/build.xml
----------------------------------------------------------------------


[2/6] git commit: Fix NPE when using collections in frozen tuple

Posted by ja...@apache.org.
Fix NPE when using collections in frozen tuple

patch by omichallat; reviewed by slebresne for CASSANDRA-7869


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cf76ac66
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cf76ac66
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cf76ac66

Branch: refs/heads/trunk
Commit: cf76ac66af4344acaaf44f8dec3ef584cff79bf2
Parents: 82136e3
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Wed Sep 3 19:01:20 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Wed Sep 3 19:01:20 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  4 ++
 .../org/apache/cassandra/cql3/CQL3Type.java     |  3 +-
 .../apache/cassandra/cql3/TupleTypeTest.java    | 39 ++++++++++++++++++++
 3 files changed, 45 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf76ac66/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b33bec4..93d77c1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.1.0
+ * Add null check for keys when freezing collection (CASSANDRA-7869)
+
+
 2.1.0-rc7
  * Add frozen keyword and require UDT to be frozen (CASSANDRA-7857)
  * Track added sstable size correctly (CASSANDRA-7239)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf76ac66/src/java/org/apache/cassandra/cql3/CQL3Type.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/CQL3Type.java b/src/java/org/apache/cassandra/cql3/CQL3Type.java
index 1589d6a..bb3bc62 100644
--- a/src/java/org/apache/cassandra/cql3/CQL3Type.java
+++ b/src/java/org/apache/cassandra/cql3/CQL3Type.java
@@ -404,7 +404,8 @@ public interface CQL3Type
 
             public Raw freeze()
             {
-                keys.freeze();
+                if (keys != null)
+                    keys.freeze();
                 values.freeze();
                 return super.freeze();
             }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf76ac66/test/unit/org/apache/cassandra/cql3/TupleTypeTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/TupleTypeTest.java b/test/unit/org/apache/cassandra/cql3/TupleTypeTest.java
index 4ce24f8..f8771c1 100644
--- a/test/unit/org/apache/cassandra/cql3/TupleTypeTest.java
+++ b/test/unit/org/apache/cassandra/cql3/TupleTypeTest.java
@@ -100,4 +100,43 @@ public class TupleTypeTest extends CQLTester
     {
         assertInvalid("CREATE TABLE wrong (k int PRIMARY KEY, v tuple<int, text>)");
     }
+
+    @Test
+    public void testFrozenTupleWithList() throws Throwable
+    {
+        createTable("CREATE TABLE %s (k int PRIMARY KEY, t frozen<tuple<text, list<int>>>)");
+
+        execute("INSERT INTO %s (k, t) VALUES (?, ?)", 0, tuple("foo", list(2, 1)));
+        execute("INSERT INTO %s (k, t) VALUES (?, ?)", 1, tuple("bar", list(3, 4)));
+        assertAllRows(
+            row(0, tuple("foo", list(2, 1))),
+            row(1, tuple("bar", list(3, 4)))
+        );
+    }
+
+    @Test
+    public void testFrozenTupleWithSet() throws Throwable
+    {
+        createTable("CREATE TABLE %s (k int PRIMARY KEY, t frozen<tuple<text, set<int>>>)");
+
+        execute("INSERT INTO %s (k, t) VALUES (?, ?)", 0, tuple("foo", set(2, 1)));
+        execute("INSERT INTO %s (k, t) VALUES (?, ?)", 1, tuple("bar", set(3, 4)));
+        assertAllRows(
+            row(0, tuple("foo", set(2, 1))),
+            row(1, tuple("bar", set(3, 4)))
+        );
+    }
+
+    @Test
+    public void testFrozenTupleWithMap() throws Throwable
+    {
+        createTable("CREATE TABLE %s (k int PRIMARY KEY, t frozen<tuple<text, map<int, int>>>)");
+
+        execute("INSERT INTO %s (k, t) VALUES (?, ?)", 0, tuple("foo", map(2, 1)));
+        execute("INSERT INTO %s (k, t) VALUES (?, ?)", 1, tuple("bar", map(3, 4)));
+        assertAllRows(
+            row(0, tuple("foo", map(2, 1))),
+            row(1, tuple("bar", map(3, 4)))
+        );
+    }
 }


[5/6] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

Posted by ja...@apache.org.
Merge branch 'cassandra-2.1.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/c99f37e1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c99f37e1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c99f37e1

Branch: refs/heads/trunk
Commit: c99f37e1959c072b1691cbe95eedd9dfd251df1f
Parents: cae8715 0de4135
Author: Jason Brown <ja...@apple.com>
Authored: Wed Sep 3 10:47:50 2014 -0700
Committer: Jason Brown <ja...@apple.com>
Committed: Wed Sep 3 10:47:50 2014 -0700

----------------------------------------------------------------------

----------------------------------------------------------------------



[3/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

Posted by ja...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
	CHANGES.txt
	build.xml
	lib/thrift-server-0.3.5.jar
	lib/thrift-server-0.3.6.jar


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cae87157
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cae87157
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cae87157

Branch: refs/heads/trunk
Commit: cae87157501d57b83facc1a5719b24424301f469
Parents: e75fe5c b22089d
Author: Jason Brown <ja...@apple.com>
Authored: Wed Sep 3 10:45:52 2014 -0700
Committer: Jason Brown <ja...@apple.com>
Committed: Wed Sep 3 10:45:52 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                        |   5 +++++
 build.xml                                          |   4 ++--
 lib/thrift-server-0.3.5.jar                        | Bin 39220 -> 0 bytes
 lib/thrift-server-0.3.6.jar                        | Bin 0 -> 39588 bytes
 .../cassandra/thrift/THsHaDisruptorServer.java     |  13 +++++++++++++
 5 files changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cae87157/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index a58af8f,4954b7f..e93b16c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -65,6 -5,10 +65,11 @@@ Merged from 2.0
   * Always reject inequality on the partition key without token()
     (CASSANDRA-7722)
   * Always send Paxos commit to all replicas (CASSANDRA-7479)
+  * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594)
+ 
+ 
+ 2.0.10
++>>>>>>> cassandra-2.0
   * Don't send schema change responses and events for no-op DDL
     statements (CASSANDRA-7600)
   * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cae87157/build.xml
----------------------------------------------------------------------
diff --cc build.xml
index e678d88,f456fa8..0880975
--- a/build.xml
+++ b/build.xml
@@@ -366,11 -359,9 +366,11 @@@
              <exclusion groupId="junit" artifactId="junit"/>
            </dependency>
            <dependency groupId="com.googlecode.json-simple" artifactId="json-simple" version="1.1"/>
 -          <dependency groupId="com.github.stephenc.high-scale-lib" artifactId="high-scale-lib" version="1.1.2"/>
 -          <dependency groupId="com.github.stephenc" artifactId="jamm" version="0.2.5"/>
 -	   <dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.6"/>
 +          <dependency groupId="com.boundary" artifactId="high-scale-lib" version="1.0.6"/>
 +          <dependency groupId="com.github.jbellis" artifactId="jamm" version="0.2.6"/>
-           <dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.5">
++          <dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.6">
 +	      	<exclusion groupId="org.slf4j" artifactId="slf4j-log4j12"/>
 +          </dependency>
            <dependency groupId="org.yaml" artifactId="snakeyaml" version="1.11"/>
            <dependency groupId="org.apache.thrift" artifactId="libthrift" version="0.9.1"/>
  
@@@ -495,12 -466,13 +495,12 @@@
          <dependency groupId="org.mindrot" artifactId="jbcrypt"/>
          <dependency groupId="com.yammer.metrics" artifactId="metrics-core"/>
          <dependency groupId="com.addthis.metrics" artifactId="reporter-config"/>
-         <dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.5"/>
+         <dependency groupId="com.thinkaurelius.thrift" artifactId="thrift-server" version="0.3.6"/>
 +        <dependency groupId="com.clearspring.analytics" artifactId="stream" version="2.5.2" />
          <dependency groupId="net.sf.supercsv" artifactId="super-csv" version="2.1.0" />
  
 -        <dependency groupId="log4j" artifactId="log4j"/>
 -        <!-- cassandra has a hard dependency on log4j, so force slf4j's log4j provider at runtime -->
 -        <dependency groupId="org.slf4j" artifactId="slf4j-log4j12" scope="runtime"/>
 +        <dependency groupId="ch.qos.logback" artifactId="logback-core"/>
 +        <dependency groupId="ch.qos.logback" artifactId="logback-classic"/>
  
          <dependency groupId="org.apache.thrift" artifactId="libthrift"/>
          <dependency groupId="org.apache.cassandra" artifactId="cassandra-thrift"/>


[4/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0

Posted by ja...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0de4135f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0de4135f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0de4135f

Branch: refs/heads/trunk
Commit: 0de4135f9be9f397cd77becfd8e3fefe0c4e78ec
Parents: cf76ac6 b22089d
Author: Jason Brown <ja...@apple.com>
Authored: Wed Sep 3 10:47:14 2014 -0700
Committer: Jason Brown <ja...@apple.com>
Committed: Wed Sep 3 10:47:14 2014 -0700

----------------------------------------------------------------------

----------------------------------------------------------------------