cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1098622 - in /cassandra/branches/cassandra-0.8: CHANGES.txt src/java/org/apache/cassandra/config/DatabaseDescriptor.java src/java/org/apache/cassandra/thrift/CassandraDaemon.java
Date Mon, 02 May 2011 15:15:16 GMT
Author: jbellis
Date: Mon May  2 15:15:15 2011
New Revision: 1098622

URL: http://svn.apache.org/viewvc?rev=1098622&view=rev
Log:
remove unframed Thrift transport option
patch by jbellis; reviewed by eevans for CASSANDRA-2586

Modified:
    cassandra/branches/cassandra-0.8/CHANGES.txt
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/CassandraDaemon.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1098622&r1=1098621&r2=1098622&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Mon May  2 15:15:15 2011
@@ -17,6 +17,7 @@
  * refuse to apply migrations with older timestamps than the current 
    schema (CASSANDRA-2536)
  * Allow configuring the number of compaction thread (CASSANDRA-2558)
+ * remove unframed Thrift transport option
 
 
 0.8.0-beta1

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=1098622&r1=1098621&r2=1098622&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
Mon May  2 15:15:15 2011
@@ -275,6 +275,9 @@ public class DatabaseDescriptor
                 }
             }
 
+            if (conf.thrift_framed_transport_size_in_mb <= 0)
+                throw new ConfigurationException("thrift_framed_transport_size_in_mb must
be positive");
+
             if (conf.thrift_framed_transport_size_in_mb > 0 && conf.thrift_max_message_length_in_mb
< conf.thrift_framed_transport_size_in_mb)
             {
                 throw new ConfigurationException("thrift_max_message_length_in_mb must be
greater than thrift_framed_transport_size_in_mb when using TFramedTransport");
@@ -516,11 +519,6 @@ public class DatabaseDescriptor
         return authority;
     }
 
-    public static boolean isThriftFramed()
-    {
-        return conf.thrift_framed_transport_size_in_mb > 0;
-    }
-    
     public static int getThriftMaxMessageLength()
     {
         return conf.thrift_max_message_length_in_mb * 1024 * 1024;

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/CassandraDaemon.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/CassandraDaemon.java?rev=1098622&r1=1098621&r2=1098622&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/CassandraDaemon.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/CassandraDaemon.java
Mon May  2 15:15:15 2011
@@ -119,18 +119,10 @@ public class CassandraDaemon extends org
 
             // Transport factory
             TTransportFactory inTransportFactory, outTransportFactory;
-            if (DatabaseDescriptor.isThriftFramed())
-            {
-                int tFramedTransportSize = DatabaseDescriptor.getThriftFramedTransportSize();
-                inTransportFactory  = new TFramedTransport.Factory(tFramedTransportSize);
-                outTransportFactory = new TFramedTransport.Factory(tFramedTransportSize);
-                logger.info("Using TFastFramedTransport with a max frame size of {} bytes.",
tFramedTransportSize);
-            }
-            else
-            {
-                inTransportFactory = new TTransportFactory();
-                outTransportFactory = new TTransportFactory();
-            }
+            int tFramedTransportSize = DatabaseDescriptor.getThriftFramedTransportSize();
+            inTransportFactory  = new TFramedTransport.Factory(tFramedTransportSize);
+            outTransportFactory = new TFramedTransport.Factory(tFramedTransportSize);
+            logger.info("Using TFastFramedTransport with a max frame size of {} bytes.",
tFramedTransportSize);
 
             // ThreadPool Server
             TThreadPoolServer.Args args = new TThreadPoolServer.Args(tServerSocket)



Mime
View raw message