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

    https://github.com/apache/storm/pull/897#discussion_r45673649
  
    --- Diff: storm-core/src/jvm/backtype/storm/task/ShellBolt.java ---
    @@ -376,15 +373,18 @@ public void run() {
                             sendHeartbeatFlag.compareAndSet(true, false);
                         }
     
    -                    Object write = _pendingWrites.poll(1, SECONDS);
    -                    if (write instanceof BoltMsg) {
    -                        _process.writeBoltMsg((BoltMsg) write);
    -                    } else if (write instanceof List<?>) {
    -                        _process.writeTaskIds((List<Integer>)write);
    -                    } else if (write != null) {
    -                        throw new RuntimeException("Unknown class type to 
write: " + write.getClass().getName());
    +                    List<Integer> taskIds = _pendingTaskIds.peek();
    --- End diff --
    
    I'm actually finding suitable solution which exists, but nothing found.
    (Could you recommend me if you know anything suitable?)
    
    I'm trying to implement a new data structure, which includes 
    
    - Unlimited queue for taskids 
    - Limited queue for BoltMsg
    - poll() method which polls taskids or BoltMsg when available based on 
priority, with blocking + timeout manner
    - putTaskIds() method which put taskids to queue (never blocked)
    - putBoltMsg() method which put BoltMsg to queue (can be blocked)


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