cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1026735 - in /cassandra/branches/cassandra-0.7: ./ interface/thrift/gen-java/org/apache/cassandra/thrift/ interface/thrift/gen-py/ src/java/org/apache/cassandra/config/
Date Sun, 24 Oct 2010 02:44:41 GMT
Author: jbellis
Date: Sun Oct 24 02:44:41 2010
New Revision: 1026735

URL: http://svn.apache.org/viewvc?rev=1026735&view=rev
Log:
merge 1026653, 1026730 from trunk

Modified:
    cassandra/branches/cassandra-0.7/   (props changed)
    cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
  (props changed)
    cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
  (props changed)
    cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
  (props changed)
    cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
  (props changed)
    cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
  (props changed)
    cassandra/branches/cassandra-0.7/interface/thrift/gen-py/   (props changed)
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/CFMetaData.java
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/Converter.java
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java

Propchange: cassandra/branches/cassandra-0.7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 24 02:44:41 2010
@@ -1,7 +1,6 @@
 /cassandra/branches/cassandra-0.6:922689-1024328
-/cassandra/trunk:978791
+/cassandra/trunk:1026516-1026734
 /incubator/cassandra/branches/cassandra-0.3:774578-796573
 /incubator/cassandra/branches/cassandra-0.4:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5:888872-915439
 /incubator/cassandra/branches/cassandra-0.6:911237-922688
-/incubator/cassandra/trunk:749219-911236

Propchange: cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 24 02:44:41 2010
@@ -1,8 +1,8 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1024328
-/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:978791
+/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1026734
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/Cassandra.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Cassandra.java:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/Cassandra.java:888872-903502
 /incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:911237-922688
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java:749219-768588
-/incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:749219-911236
+/incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:749219-904544

Propchange: cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 24 02:44:41 2010
@@ -1,9 +1,9 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1024328
-/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:978791
+/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1026734
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/column_t.java:774578-792198
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Column.java:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/Column.java:888872-903502
 /incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:911237-922688
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Column.java:749219-794428
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/column_t.java:749219-768588
-/incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:749219-911236
+/incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:749219-904544

Propchange: cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 24 02:44:41 2010
@@ -1,8 +1,8 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1024328
-/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:978791
+/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026516-1026734
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:888872-903502
 /incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:911237-922688
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:749219-768588
-/incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:749219-911236
+/incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:749219-904544

Propchange: cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 24 02:44:41 2010
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-1024328
-/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:978791
+/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026516-1026734
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:888872-903502

Propchange: cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 24 02:44:41 2010
@@ -1,9 +1,9 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:922689-1024328
-/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:978791
+/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026516-1026734
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:774578-792198
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/SuperColumn.java:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/SuperColumn.java:888872-903502
 /incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:911237-922688
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SuperColumn.java:749219-794428
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:749219-768588
-/incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:749219-911236
+/incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:749219-904544

Propchange: cassandra/branches/cassandra-0.7/interface/thrift/gen-py/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 24 02:44:41 2010
@@ -1,2 +1,3 @@
+/cassandra/trunk/interface/thrift/gen-py:1026516-1026734
 /incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-py:911237-922688
-/incubator/cassandra/trunk/interface/thrift/gen-py:749219-911236
+/incubator/cassandra/trunk/interface/thrift/gen-py:749219-907704

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/CFMetaData.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/CFMetaData.java?rev=1026735&r1=1026734&r2=1026735&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/CFMetaData.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/CFMetaData.java
Sun Oct 24 02:44:41 2010
@@ -60,8 +60,8 @@ public final class CFMetaData
     public final static int DEFAULT_MIN_COMPACTION_THRESHOLD = 4;
     public final static int DEFAULT_MAX_COMPACTION_THRESHOLD = 32;
     public final static int DEFAULT_MEMTABLE_LIFETIME_IN_MINS = 60;
-    public final static int DEFAULT_MEMTABLE_THROUGHPUT_IN_MB = DatabaseDescriptor.sizeMemtableThroughput();
-    public final static double DEFAULT_MEMTABLE_OPERATIONS_IN_MILLIONS = DatabaseDescriptor.sizeMemtableOperations(DEFAULT_MEMTABLE_THROUGHPUT_IN_MB);
+    public final static int DEFAULT_MEMTABLE_THROUGHPUT_IN_MB = sizeMemtableThroughput();
+    public final static double DEFAULT_MEMTABLE_OPERATIONS_IN_MILLIONS = sizeMemtableOperations(DEFAULT_MEMTABLE_THROUGHPUT_IN_MB);
 
     private static final int MIN_CF_ID = 1000;
 
@@ -100,6 +100,22 @@ public final class CFMetaData
     }
 
     /**
+     * @return A calculated memtable throughput size for this machine.
+     */
+    public static int sizeMemtableThroughput()
+    {
+        return (int) (Runtime.getRuntime().maxMemory() / (1048576 * 16));
+    }
+
+    /**
+     * @return A calculated memtable operation count for this machine.
+     */
+    public static double sizeMemtableOperations(int mem_throughput)
+    {
+        return 0.3 * mem_throughput / 64.0;
+    }
+
+    /**
      * @return The (ksname,cfname) pair for the given id, or null if it has been dropped.
      */
     public static Pair<String,String> getCF(Integer cfId)

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/Converter.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/Converter.java?rev=1026735&r1=1026734&r2=1026735&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/Converter.java (original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/Converter.java Sun
Oct 24 02:44:41 2010
@@ -54,7 +54,6 @@ public class Converter
 
     private static List<RawKeyspace> readTablesFromXml(XMLUtils xmlUtils) throws ConfigurationException
     {
-
         List<RawKeyspace> keyspaces = new ArrayList<RawKeyspace>();
         /* Read the table related stuff from config */
         try
@@ -184,7 +183,6 @@ public class Converter
             throw new ConfigurationException("Error occurred during the transformation process.");
         }
     }
-
     
     private static void loadPreviousConfig(String config) throws ConfigurationException
     {
@@ -266,14 +264,9 @@ public class Converter
             String framedRaw = xmlUtils.getNodeValue("/Storage/ThriftFramedTransport");
             if (framedRaw != null && !Boolean.valueOf(framedRaw))
             {
-                conf.thrift_framed_transport_size_in_mb = 0;
-                System.out.println("WARN : Thrift uses framed Transport by default in 0.7!
Setting TFramedTransportSize to 0MB (disabled).");
-            }
-            else
-            {
-                conf.thrift_framed_transport_size_in_mb = 15;
-                System.out.println("TFramedTransport will have a maximum frame size of 15MB");
+                System.out.println("WARN : Cassandra uses a Thrift framed Transport by default
in 0.7! Clients will need to match.");
             }
+            conf.thrift_framed_transport_size_in_mb = 15;
             
             String sbc = xmlUtils.getNodeValue("/Storage/SnapshotBeforeCompaction");
             if (sbc != null)

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=1026735&r1=1026734&r2=1026735&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
Sun Oct 24 02:44:41 2010
@@ -561,12 +561,12 @@ public class    DatabaseDescriptor
 
                 if (cf.memtable_throughput_in_mb == null)
                 {
-                    cf.memtable_throughput_in_mb = sizeMemtableThroughput();
+                    cf.memtable_throughput_in_mb = CFMetaData.sizeMemtableThroughput();
                     logger.info("memtable_throughput_in_mb not configured for " + cf.name
+ ", using " + cf.memtable_throughput_in_mb);
                 }
                 if (cf.memtable_operations_in_millions == null)
                 {
-                    cf.memtable_operations_in_millions = sizeMemtableOperations(cf.memtable_throughput_in_mb);
+                    cf.memtable_operations_in_millions = CFMetaData.sizeMemtableOperations(cf.memtable_throughput_in_mb);
                     logger.info("memtable_operations_in_millions not configured for " + cf.name
+ ", using " + cf.memtable_operations_in_millions);
                 }
 
@@ -1099,13 +1099,4 @@ public class    DatabaseDescriptor
     {
         return conf.dynamic_snitch_badness_threshold;
     }
-
-    public static int sizeMemtableThroughput() {
-        return (int) (Runtime.getRuntime().maxMemory() / (1048576 * 16));
-    }
-
-    public static double sizeMemtableOperations(int mem_throughput) {
-        return 0.3 * mem_throughput / 64.0;
-    }
-
 }



Mime
View raw message