Github user revans2 commented on a diff in the pull request:

    https://github.com/apache/incubator-storm/pull/103#discussion_r12813854
  
    --- Diff: 
storm-core/src/jvm/backtype/storm/messaging/netty/StormServerHandler.java ---
    @@ -41,30 +45,22 @@ public void channelConnected(ChannelHandlerContext ctx, 
ChannelStateEvent e) {
         
         @Override
         public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) 
{
    -        Object msg = e.getMessage();  
    -        if (msg == null) return;
    -
    -        //end of batch?
    -        if (msg==ControlMessage.EOB_MESSAGE) {
    -            Channel channel = ctx.getChannel();
    -            LOG.debug("Send back response ...");
    -            if (failure_count.get()==0)
    -                channel.write(ControlMessage.OK_RESPONSE);
    -            else channel.write(ControlMessage.FAILURE_RESPONSE);
    -            return;
    -        }
    -        
    -        //enqueue the received message for processing
    -        try {
    -            server.enqueue((TaskMessage)msg);
    -        } catch (InterruptedException e1) {
    -            LOG.info("failed to enqueue a request message", e);
    -            failure_count.incrementAndGet();
    -        }
    +      List<TaskMessage> msgs = (List<TaskMessage>) e.getMessage();
    +      if (msgs == null) {
    +        return;
    +      }
    +      
    +      try {
    +        server.enqueue(msgs);
    +      } catch (InterruptedException e1) {
    +        LOG.info("failed to enqueue a request message", e);
    +        failure_count.incrementAndGet();
    +      }
         }
     
         @Override
         public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent 
e) {
    +        e.getCause().printStackTrace();
    --- End diff --
    
    Can we log this properly instead of just printing the stack trace to stderr?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to