streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfranklin <...@git.apache.org>
Subject [GitHub] incubator-streams pull request: Streams 191
Date Tue, 14 Oct 2014 15:47:55 GMT
Github user mfranklin commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/100#discussion_r18837582
  
    --- Diff: streams-runtimes/streams-runtime-local/src/main/java/org/apache/streams/local/tasks/BaseStreamsTask.java
---
    @@ -91,24 +94,54 @@ protected StreamsDatum getNextDatum() {
          * clones of the datum and adds a new clone to each queue.
          * @param datum
          */
    -    protected void addToOutgoingQueue(StreamsDatum datum) {
    +    protected void addToOutgoingQueue(StreamsDatum datum) throws InterruptedException{
             if(this.outQueues.size() == 1) {
    -            ComponentUtils.offerUntilSuccess(datum, outQueues.get(0));
    +            outQueues.get(0).put(datum);
             }
             else {
                 StreamsDatum newDatum = null;
    -            for(Queue<StreamsDatum> queue : this.outQueues) {
    +            List<BlockingQueue<StreamsDatum>> failedQueues = Lists.newLinkedList();
    +            // TODO
    +            // Needs to be optimized better but workable now
    +            // Adds datums to queues that aren't full, then adds to full queues with
blocking
    +            for(BlockingQueue<StreamsDatum> queue : this.outQueues) {
    --- End diff --
    
    So this logic tries and retries one time.  It seems like this could be better organized
for readability and reduced code.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message