You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2016/05/16 09:24:34 UTC

[1/4] storm git commit: Test Pacemaker Fix

Repository: storm
Updated Branches:
  refs/heads/master 6ff3fb252 -> a558a1f07


Test Pacemaker Fix


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

Branch: refs/heads/master
Commit: 9c2ac7df68753835454a8abb5c6efcabb4c9370c
Parents: a536937
Author: Kyle Nusbaum <Ky...@gmail.com>
Authored: Mon May 2 14:29:06 2016 -0500
Committer: Kyle Nusbaum <Ky...@gmail.com>
Committed: Wed May 4 10:47:14 2016 -0500

----------------------------------------------------------------------
 .../apache/storm/pacemaker/PacemakerServer.java |  9 +++++++--
 .../storm/pacemaker/codec/ThriftDecoder.java    | 21 ++++++++------------
 2 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/9c2ac7df/storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerServer.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerServer.java b/storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerServer.java
index 46ba364..fa73d96 100644
--- a/storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerServer.java
+++ b/storm-core/src/jvm/org/apache/storm/pacemaker/PacemakerServer.java
@@ -138,8 +138,13 @@ class PacemakerServer implements ISaslServer {
         LOG.debug("received message. Passing to handler. {} : {} : {}",
                   handler.toString(), m.toString(), channel.toString());
         HBMessage response = handler.handleMessage(m, authenticated);
-        LOG.debug("Got Response from handler: {}", response.toString());
-        channel.write(response);
+        if(response != null) {
+            LOG.debug("Got Response from handler: {}", response);
+            channel.write(response);
+        }
+        else {
+            LOG.info("Got null response from handler handling message: {}", m);
+        }
     }
 
     public void closeChannel(Channel c) {

http://git-wip-us.apache.org/repos/asf/storm/blob/9c2ac7df/storm-core/src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java b/storm-core/src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java
index 25edefe..7f21cf8 100644
--- a/storm-core/src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java
+++ b/storm-core/src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java
@@ -29,18 +29,20 @@ import org.apache.storm.messaging.netty.SaslMessageToken;
 
 public class ThriftDecoder extends FrameDecoder {
 
+    private static final int INTEGER_SIZE = 4;
+
     @Override
     protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception {
 
         long available = buf.readableBytes();
-        if(available < 2) {
+        if(available < INTEGER_SIZE) {
             return null;
         }
 
         buf.markReaderIndex();
 
         int thriftLen = buf.readInt();
-        available -= 4;
+        available -= INTEGER_SIZE;
 
         if(available < thriftLen) {
             // We haven't received the entire object yet, return and wait for more bytes.
@@ -48,18 +50,11 @@ public class ThriftDecoder extends FrameDecoder {
             return null;
         }
 
-        buf.discardReadBytes();
+        
+        byte serialized[] = new byte[thriftLen];
+        buf.readBytes(serialized, 0, thriftLen);
+        HBMessage m = (HBMessage)Utils.thriftDeserialize(HBMessage.class, serialized);
 
-        HBMessage m;
-        if(buf.hasArray()) {
-            m = Utils.thriftDeserialize(HBMessage.class, buf.array(), 0, thriftLen);
-            buf.readerIndex(buf.readerIndex() + thriftLen);
-        }
-        else {
-            byte serialized[] = new byte[thriftLen];
-            buf.readBytes(serialized, 0, thriftLen);
-            m = Utils.thriftDeserialize(HBMessage.class, serialized);
-        }
 
         if(m.get_type() == HBServerMessageType.CONTROL_MESSAGE) {
             ControlMessage cm = ControlMessage.read(m.get_data().get_message_blob());


[2/4] storm git commit: Bit of cleanup

Posted by ka...@apache.org.
Bit of cleanup


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

Branch: refs/heads/master
Commit: 2fa4d255bc44cbf31bae577551bfe406626a68ef
Parents: 9c2ac7d
Author: Kyle Nusbaum <Ky...@gmail.com>
Authored: Wed May 4 11:00:51 2016 -0500
Committer: Kyle Nusbaum <Ky...@gmail.com>
Committed: Wed May 4 11:00:51 2016 -0500

----------------------------------------------------------------------
 .../src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java    | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/2fa4d255/storm-core/src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java b/storm-core/src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java
index 7f21cf8..ce9c899 100644
--- a/storm-core/src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java
+++ b/storm-core/src/jvm/org/apache/storm/pacemaker/codec/ThriftDecoder.java
@@ -50,12 +50,10 @@ public class ThriftDecoder extends FrameDecoder {
             return null;
         }
 
-        
         byte serialized[] = new byte[thriftLen];
         buf.readBytes(serialized, 0, thriftLen);
         HBMessage m = (HBMessage)Utils.thriftDeserialize(HBMessage.class, serialized);
 
-
         if(m.get_type() == HBServerMessageType.CONTROL_MESSAGE) {
             ControlMessage cm = ControlMessage.read(m.get_data().get_message_blob());
             return cm;


[4/4] storm git commit: add STORM-1764 to CHANGELOG.md

Posted by ka...@apache.org.
add STORM-1764 to CHANGELOG.md


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

Branch: refs/heads/master
Commit: a558a1f07fdef11595329e7c5e31f862820a56f8
Parents: 354fcaf
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Mon May 16 18:17:27 2016 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Mon May 16 18:17:27 2016 +0900

----------------------------------------------------------------------
 CHANGELOG.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/a558a1f0/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e021b09..679dea8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -89,6 +89,7 @@
  * STORM-1720: Support GEO in storm-redis
 
 ## 1.0.2
+ * STORM-1764: Pacemaker is throwing some stack traces
  * STORM-1761: Storm-Solr Example Throws ArrayIndexOutOfBoundsException in Remote Cluster Mode
  * STORM-1756: Explicitly null KafkaServer reference in KafkaTestBroker to prevent out of memory on large test classes.
  * STORM-1750: Ensure worker dies when report-error-and-die is called.


[3/4] storm git commit: Merge branch 'master' of https://github.com/knusbaum/incubator-storm into STORM-1764

Posted by ka...@apache.org.
Merge branch 'master' of https://github.com/knusbaum/incubator-storm into STORM-1764


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

Branch: refs/heads/master
Commit: 354fcaf64567f3332b3311681308a841ee83cf34
Parents: 6ff3fb2 2fa4d25
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Mon May 16 18:16:25 2016 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Mon May 16 18:16:25 2016 +0900

----------------------------------------------------------------------
 .../apache/storm/pacemaker/PacemakerServer.java |  9 +++++++--
 .../storm/pacemaker/codec/ThriftDecoder.java    | 21 +++++++-------------
 2 files changed, 14 insertions(+), 16 deletions(-)
----------------------------------------------------------------------