Merge branch 'cassandra-2.1' into trunk

Conflicts:
        src/java/org/apache/cassandra/config/Config.java
        src/java/org/apache/cassandra/config/DatabaseDescriptor.java


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

Branch: refs/heads/trunk
Commit: 0e5e7d93be1a8b9a91db387b8208daa90dc4a664
Parents: 21bdf87 8284964
Author: Benedict Elliott Smith <bened...@apache.org>
Authored: Wed Mar 18 10:39:32 2015 +0000
Committer: Benedict Elliott Smith <bened...@apache.org>
Committed: Wed Mar 18 10:39:32 2015 +0000

----------------------------------------------------------------------
 CHANGES.txt                                     |   1 +
 .../org/apache/cassandra/config/Config.java     |  22 +
 .../cassandra/config/DatabaseDescriptor.java    |  10 +
 .../cassandra/net/IncomingTcpConnection.java    |   5 +-
 .../cassandra/net/OutboundTcpConnection.java    | 117 +++-
 .../cassandra/utils/CoalescingStrategies.java   | 544 +++++++++++++++++++
 .../utils/NanoTimeToCurrentTimeMillis.java      |  88 +++
 .../utils/CoalescingStrategiesTest.java         | 445 +++++++++++++++
 .../utils/NanoTimeToCurrentTimeMillisTest.java  |  52 ++
 9 files changed, 1254 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e5e7d93/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index e090647,68df77e..2661723
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,77 -1,5 +1,78 @@@
 +3.0
 + * Add nodetool command to validate all sstables in a node (CASSANDRA-5791)
 + * Add WriteFailureException to native protocol, notify coordinator of
 +   write failures (CASSANDRA-8592)
 + * Convert SequentialWriter to nio (CASSANDRA-8709)
 + * Add role based access control (CASSANDRA-7653, 8650, 7216, 8760, 8849, 
8761, 8850)
 + * Record client ip address in tracing sessions (CASSANDRA-8162)
 + * Indicate partition key columns in response metadata for prepared
 +   statements (CASSANDRA-7660)
 + * Merge UUIDType and TimeUUIDType parse logic (CASSANDRA-8759)
 + * Avoid memory allocation when searching index summary (CASSANDRA-8793)
 + * Optimise (Time)?UUIDType Comparisons (CASSANDRA-8730)
 + * Make CRC32Ex into a separate maven dependency (CASSANDRA-8836)
 + * Use preloaded jemalloc w/ Unsafe (CASSANDRA-8714)
 + * Avoid accessing partitioner through StorageProxy (CASSANDRA-8244, 8268)
 + * Upgrade Metrics library and remove depricated metrics (CASSANDRA-5657)
 + * Serializing Row cache alternative, fully off heap (CASSANDRA-7438)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Make CassandraException unchecked, extend RuntimeException (CASSANDRA-8560)
 + * Support direct buffer decompression for reads (CASSANDRA-8464)
 + * DirectByteBuffer compatible LZ4 methods (CASSANDRA-7039)
 + * Group sstables for anticompaction correctly (CASSANDRA-8578)
 + * Add ReadFailureException to native protocol, respond
 +   immediately when replicas encounter errors while handling
 +   a read request (CASSANDRA-7886)
 + * Switch CommitLogSegment from RandomAccessFile to nio (CASSANDRA-8308)
 + * Allow mixing token and partition key restrictions (CASSANDRA-7016)
 + * Support index key/value entries on map collections (CASSANDRA-8473)
 + * Modernize schema tables (CASSANDRA-8261)
 + * Support for user-defined aggregation functions (CASSANDRA-8053)
 + * Fix NPE in SelectStatement with empty IN values (CASSANDRA-8419)
 + * Refactor SelectStatement, return IN results in natural order instead
 +   of IN value list order and ignore duplicate values in partition key IN 
restrictions (CASSANDRA-7981)
 + * Support UDTs, tuples, and collections in user-defined
 +   functions (CASSANDRA-7563)
 + * Fix aggregate fn results on empty selection, result column name,
 +   and cqlsh parsing (CASSANDRA-8229)
 + * Mark sstables as repaired after full repair (CASSANDRA-7586)
 + * Extend Descriptor to include a format value and refactor reader/writer
 +   APIs (CASSANDRA-7443)
 + * Integrate JMH for microbenchmarks (CASSANDRA-8151)
 + * Keep sstable levels when bootstrapping (CASSANDRA-7460)
 + * Add Sigar library and perform basic OS settings check on startup 
(CASSANDRA-7838)
 + * Support for aggregation functions (CASSANDRA-4914)
 + * Remove cassandra-cli (CASSANDRA-7920)
 + * Accept dollar quoted strings in CQL (CASSANDRA-7769)
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any partition key column (CASSANDRA-7855)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Support user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 
7929,
 +   7924, 7812, 8063, 7813, 7708)
 + * 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)
 + * Fail on very large batch sizes (CASSANDRA-8011)
 + * Improve concurrency of repair (CASSANDRA-6455, 8208)
 + * Select optimal CRC32 implementation at runtime (CASSANDRA-8614)
 + * Evaluate MurmurHash of Token once per query (CASSANDRA-7096)
 + * Generalize progress reporting (CASSANDRA-8901)
 +
  2.1.4
+  * Introduce intra-cluster message coalescing (CASSANDRA-8692)
   * DatabaseDescriptor throws NPE when rpc_interface is used (CASSANDRA-8839)
   * Don't check if an sstable is live for offline compactions (CASSANDRA-8841)
   * Don't set clientMode in SSTableLoader (CASSANDRA-8238)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e5e7d93/src/java/org/apache/cassandra/config/Config.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/Config.java
index cd52f2b,378a1ad..7ade647
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@@ -229,10 -229,22 +235,26 @@@ public class Confi
      private static final CsvPreference 
STANDARD_SURROUNDING_SPACES_NEED_QUOTES = new 
CsvPreference.Builder(CsvPreference.STANDARD_PREFERENCE)
                                                                                
                    .surroundingSpacesNeedQuotes(true).build();
  
 +    // TTL for different types of trace events.
 +    public int tracetype_query_ttl = (int) TimeUnit.DAYS.toSeconds(1);
 +    public int tracetype_repair_ttl = (int) TimeUnit.DAYS.toSeconds(7);
 +
+     /*
+      * Strategy to use for coalescing messages in OutboundTcpConnection.
+      * Can be fixed, movingaverage, timehorizon, disabled. Setting is case 
and leading/trailing
+      * whitespace insensitive. You can also specify a subclass of 
CoalescingStrategies.CoalescingStrategy by name.
+      */
 -    public String otc_coalescing_strategy = "DISABLED";
++    public String otc_coalescing_strategy = "TIMEHORIZON";
+ 
+     /*
+      * How many microseconds to wait for coalescing. For fixed strategy this 
is the amount of time after the first
+      * messgae is received before it will be sent with any accompanying 
messages. For moving average this is the
+      * maximum amount of time that will be waited as well as the interval at 
which messages must arrive on average
+      * for coalescing to be enabled.
+      */
+     public static final int otc_coalescing_window_us_default = 200;
+     public int otc_coalescing_window_us = otc_coalescing_window_us_default;
+ 
      public static boolean getOutboundBindAny()
      {
          return outboundBindAny;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e5e7d93/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index fa88de8,d0db9f4..c5e185b
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@@ -1620,13 -1683,13 +1620,23 @@@ public class DatabaseDescripto
          return arch.contains("64") || arch.contains("sparcv9");
      }
  
 +    public static int getTracetypeRepairTTL()
 +    {
 +        return conf.tracetype_repair_ttl;
 +    }
 +
 +    public static int getTracetypeQueryTTL()
 +    {
 +        return conf.tracetype_query_ttl;
 +    }
++
+     public static String getOtcCoalescingStrategy()
+     {
+         return conf.otc_coalescing_strategy;
+     }
+ 
+     public static int getOtcCoalescingWindow()
+     {
+         return conf.otc_coalescing_window_us;
+     }
  }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e5e7d93/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
----------------------------------------------------------------------

Reply via email to