cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1102505 - in /cassandra/branches/cassandra-0.8: ./ contrib/ debian/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/net/ src/java/org/apache/cassandra/service/
Date Thu, 12 May 2011 23:13:32 GMT
Author: jbellis
Date: Thu May 12 23:13:32 2011
New Revision: 1102505

URL: http://svn.apache.org/viewvc?rev=1102505&view=rev
Log:
merge from 0.7

Modified:
    cassandra/branches/cassandra-0.8/   (props changed)
    cassandra/branches/cassandra-0.8/CHANGES.txt
    cassandra/branches/cassandra-0.8/NEWS.txt
    cassandra/branches/cassandra-0.8/contrib/   (props changed)
    cassandra/branches/cassandra-0.8/debian/init
    cassandra/branches/cassandra-0.8/debian/rules
    cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
  (props changed)
    cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
  (props changed)
    cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
  (props changed)
    cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
  (props changed)
    cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
  (props changed)
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingService.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AbstractRowResolver.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/DatacenterReadCallback.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/IResponseResolver.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/RangeSliceResponseResolver.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/ReadCallback.java

Propchange: cassandra/branches/cassandra-0.8/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 12 23:13:32 2011
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7:1026516-1102355
+/cassandra/branches/cassandra-0.7:1026516-1102504
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689
 /cassandra/trunk:1090978-1090979

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1102505&r1=1102504&r2=1102505&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Thu May 12 23:13:32 2011
@@ -25,6 +25,8 @@
  * initialize local ep state prior to gossip startup if needed (CASSANDRA-2638)
  * fix counter increment lost after restart (CASSANDRA-2642)
  * add quote-escaping via backslash to CLI (CASSANDRA-2623)
+ * fig pig example script (CASSANDRA-2487)
+ * fix dynamic snitch race in adding latencies (CASSANDRA-2618)
 
 
 0.8.0-beta2

Modified: cassandra/branches/cassandra-0.8/NEWS.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/NEWS.txt?rev=1102505&r1=1102504&r2=1102505&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/NEWS.txt (original)
+++ cassandra/branches/cassandra-0.8/NEWS.txt Thu May 12 23:13:32 2011
@@ -62,6 +62,15 @@ JMX
     - By default, JMX now listens on port 7199.
 
 
+0.7.6
+=====
+
+Upgrading
+---------
+    - Nothing specific to 0.7.6, but see 0.7.3 Upgrading if upgrading
+      from earlier than 0.7.1.
+
+
 0.7.5
 =====
 

Propchange: cassandra/branches/cassandra-0.8/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 12 23:13:32 2011
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
-/cassandra/branches/cassandra-0.7/contrib:1026516-1102355
+/cassandra/branches/cassandra-0.7/contrib:1026516-1102504
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689
 /cassandra/trunk/contrib:1090978-1090979

Modified: cassandra/branches/cassandra-0.8/debian/init
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/debian/init?rev=1102505&r1=1102504&r2=1102505&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/debian/init (original)
+++ cassandra/branches/cassandra-0.8/debian/init Thu May 12 23:13:32 2011
@@ -1,8 +1,10 @@
 #! /bin/sh
 ### BEGIN INIT INFO
 # Provides:          cassandra
-# Required-Start:    $remote_fs
-# Required-Stop:     $remote_fs
+# Required-Start:    $remote_fs $network $named $time
+# Required-Stop:     $remote_fs $network $named $time
+# Should-Start:      ntp mdadm
+# Should-Stop:       ntp mdadm
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: distributed storage system for structured data

Modified: cassandra/branches/cassandra-0.8/debian/rules
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/debian/rules?rev=1102505&r1=1102504&r2=1102505&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/debian/rules (original)
+++ cassandra/branches/cassandra-0.8/debian/rules Thu May 12 23:13:32 2011
@@ -51,7 +51,7 @@ binary-indep: build install
 	dh_testdir
 	dh_testroot
 	dh_installchangelogs
-	dh_installinit
+	dh_installinit -u'start 50 2 3 4 5 . stop 50 0 1 6'
 	dh_installdocs README.txt CHANGES.txt NEWS.txt
 	dh_compress
 	dh_fixperms

Propchange: cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 12 23:13:32 2011
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1102355
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1102504
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1051699-1053689
 /cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090978-1090979

Propchange: cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 12 23:13:32 2011
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1102355
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1102504
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1053690-1055654
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1051699-1053689
 /cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090978-1090979

Propchange: cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 12 23:13:32 2011
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026516-1102355
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026516-1102504
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1053690-1055654
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1051699-1053689
 /cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090978-1090979

Propchange: cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 12 23:13:32 2011
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026516-1102355
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026516-1102504
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1053690-1055654
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1051699-1053689
 /cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090978-1090979

Propchange: cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 12 23:13:32 2011
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026516-1102355
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026516-1102504
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1053690-1055654
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1051699-1053689
 /cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090978-1090979

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingService.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingService.java?rev=1102505&r1=1102504&r2=1102505&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingService.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingService.java
Thu May 12 23:13:32 2011
@@ -280,7 +280,6 @@ public final class MessagingService impl
     public String sendRR(Message message, InetAddress to, IMessageCallback cb)
     {
         String id = nextId();
-        logger_.debug("Message id to {} is {}", to, id);
         addCallback(cb, id, to);
         sendOneWay(message, id, to);
         return id;
@@ -288,9 +287,7 @@ public final class MessagingService impl
 
     public void sendOneWay(Message message, InetAddress to)
     {
-        String id = nextId();
-        logger_.debug("Message id to {} is {}", to, id);
-        sendOneWay(message, id, to);
+        sendOneWay(message, nextId(), to);
     }
 
     public void sendReply(Message message, String id, InetAddress to)

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AbstractRowResolver.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AbstractRowResolver.java?rev=1102505&r1=1102504&r2=1102505&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AbstractRowResolver.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AbstractRowResolver.java
Thu May 12 23:13:32 2011
@@ -55,15 +55,16 @@ public abstract class AbstractRowResolve
         this.table = table;
     }
 
-    public ReadResponse preprocess(Message message)
+    public void preprocess(Message message)
     {
         byte[] body = message.getMessageBody();
         ByteArrayInputStream bufIn = new ByteArrayInputStream(body);
         try
         {
             ReadResponse result = ReadResponse.serializer().deserialize(new DataInputStream(bufIn),
message.getVersion());
+            if (logger.isDebugEnabled())
+                logger.debug("Preprocessed {} response", result.isDigestQuery() ? "digest"
: "data");
             replies.put(message, result);
-            return result;
         }
         catch (IOException e)
         {

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/DatacenterReadCallback.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/DatacenterReadCallback.java?rev=1102505&r1=1102504&r2=1102505&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/DatacenterReadCallback.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/DatacenterReadCallback.java
Thu May 12 23:13:32 2011
@@ -48,11 +48,17 @@ public class DatacenterReadCallback<T> e
     }
 
     @Override
-    protected boolean waitingFor(ReadResponse response, InetAddress from)
+    protected boolean waitingFor(Message message)
+    {
+        return localdc.equals(snitch.getDatacenter(message.getFrom()));
+    }
+
+    @Override
+    protected boolean waitingFor(ReadResponse response)
     {
         // cheat and leverage our knowledge that a local read is the only way the ReadResponse
         // version of this method gets called
-        return localdc.equals(snitch.getDatacenter(from));
+        return true;
     }
         
     @Override

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/IResponseResolver.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/IResponseResolver.java?rev=1102505&r1=1102504&r2=1102505&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/IResponseResolver.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/IResponseResolver.java
Thu May 12 23:13:32 2011
@@ -20,7 +20,6 @@ package org.apache.cassandra.service;
 
 import java.io.IOException;
 
-import org.apache.cassandra.db.ReadResponse;
 import org.apache.cassandra.net.Message;
 
 public interface IResponseResolver<T> {
@@ -42,6 +41,6 @@ public interface IResponseResolver<T> {
      */
     public T getData() throws IOException;
 
-    public ReadResponse preprocess(Message message);
+    public void preprocess(Message message);
     public Iterable<Message> getMessages();
 }

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/RangeSliceResponseResolver.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/RangeSliceResponseResolver.java?rev=1102505&r1=1102504&r2=1102505&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/RangeSliceResponseResolver.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/RangeSliceResponseResolver.java
Thu May 12 23:13:32 2011
@@ -24,11 +24,16 @@ import java.util.*;
 import java.util.concurrent.LinkedBlockingQueue;
 
 import com.google.common.collect.AbstractIterator;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
 import org.apache.commons.collections.iterators.CollatingIterator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.cassandra.db.*;
+import org.apache.cassandra.db.ColumnFamily;
+import org.apache.cassandra.db.DecoratedKey;
+import org.apache.cassandra.db.RangeSliceReply;
+import org.apache.cassandra.db.Row;
 import org.apache.cassandra.net.Message;
 import org.apache.cassandra.utils.Pair;
 import org.apache.cassandra.utils.ReducingIterator;
@@ -109,7 +114,7 @@ public class RangeSliceResponseResolver 
         };
     }
 
-    public ReadResponse preprocess(Message message)
+    public void preprocess(Message message)
     {
         responses.add(message);
     }

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/ReadCallback.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/ReadCallback.java?rev=1102505&r1=1102504&r2=1102505&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/ReadCallback.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/ReadCallback.java
Thu May 12 23:13:32 2011
@@ -42,7 +42,6 @@ import org.apache.cassandra.net.Message;
 import org.apache.cassandra.net.MessagingService;
 import org.apache.cassandra.thrift.ConsistencyLevel;
 import org.apache.cassandra.thrift.UnavailableException;
-import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.SimpleCondition;
 import org.apache.cassandra.utils.WrappedRunnable;
 
@@ -126,13 +125,10 @@ public class ReadCallback<T> implements 
 
     public void response(Message message)
     {
-        ReadResponse result = resolver.preprocess(message);
-        int n = waitingFor(result, message.getFrom())
+        resolver.preprocess(message);
+        int n = waitingFor(message)
               ? received.incrementAndGet()
               : received.get();
-        if (logger.isDebugEnabled())
-            logger.debug("{} response; {} qualifying responses seen.  Data is {}present",
-                         new Object[] { result.isDigestQuery() ? "digest" : "data", n, resolver.isDataPresent()
? "" : "not " });
         if (n >= blockfor && resolver.isDataPresent())
         {
             condition.signal();
@@ -141,9 +137,18 @@ public class ReadCallback<T> implements 
     }
 
     /**
+     * @return true if the message counts towards the blockfor threshold
+     * TODO turn the Message into a response so we don't need two versions of this method
+     */
+    protected boolean waitingFor(Message message)
+    {
+        return true;
+    }
+
+    /**
      * @return true if the response counts towards the blockfor threshold
      */
-    protected boolean waitingFor(ReadResponse response, InetAddress from)
+    protected boolean waitingFor(ReadResponse response)
     {
         return true;
     }
@@ -151,9 +156,7 @@ public class ReadCallback<T> implements 
     public void response(ReadResponse result)
     {
         ((RowDigestResolver) resolver).injectPreProcessed(result);
-        if (logger.isDebugEnabled())
-            logger.debug("Preprocessed {} response", result.isDigestQuery() ? "digest" :
"data");
-        int n = waitingFor(result, FBUtilities.getLocalAddress())
+        int n = waitingFor(result)
               ? received.incrementAndGet()
               : received.get();
         if (n >= blockfor && resolver.isDataPresent())



Mime
View raw message