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

    https://github.com/apache/incubator-storm/pull/103#discussion_r12362656
  
    --- Diff: storm-core/src/jvm/backtype/storm/messaging/netty/Server.java ---
    @@ -31,35 +31,65 @@
     import org.slf4j.LoggerFactory;
     
     import java.net.InetSocketAddress;
    +import java.util.ArrayList;
    +import java.util.Arrays;
    +import java.util.HashMap;
    +import java.util.Iterator;
    +import java.util.List;
     import java.util.Map;
     import java.util.concurrent.Executors;
     import java.util.concurrent.LinkedBlockingQueue;
    +import java.util.concurrent.ThreadFactory;
     
     class Server implements IConnection {
         private static final Logger LOG = 
LoggerFactory.getLogger(Server.class);
         @SuppressWarnings("rawtypes")
         Map storm_conf;
         int port;
    -    private LinkedBlockingQueue<TaskMessage> message_queue;
    +    private LinkedBlockingQueue<ArrayList<TaskMessage>>[] message_queue;
         volatile ChannelGroup allChannels = new 
DefaultChannelGroup("storm-server");
         final ChannelFactory factory;
         final ServerBootstrap bootstrap;
    -
    +    
    +    private int queueCount;
    +    HashMap<Integer, Integer> taskToQueueId = null;
    +    int roundRobinQueueId;
    +   
    +    boolean closing = false;
    +    List<TaskMessage> closeMessage = Arrays.asList(new TaskMessage(-1, 
null));
    +    
    +    
         @SuppressWarnings("rawtypes")
         Server(Map storm_conf, int port) {
             this.storm_conf = storm_conf;
             this.port = port;
    -        message_queue = new LinkedBlockingQueue<TaskMessage>();
    -
    +        
    --- End diff --
    
    try to construct the map from taskId -> queueId in round robin manner.


---
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