[ 
https://issues.apache.org/jira/browse/STORM-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14115400#comment-14115400
 ] 

ASF GitHub Bot commented on STORM-386:
--------------------------------------

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

    https://github.com/apache/incubator-storm/pull/177#discussion_r16906745
  
    --- Diff: 
examples/storm-starter/src/jvm/storm/starter/WordCountTopologyNode.java ---
    @@ -0,0 +1,121 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package storm.starter;
    +
    +import backtype.storm.Config;
    +import backtype.storm.LocalCluster;
    +import backtype.storm.StormSubmitter;
    +import backtype.storm.spout.ShellSpout;
    +import backtype.storm.task.ShellBolt;
    +import backtype.storm.topology.*;
    +import backtype.storm.topology.base.BaseBasicBolt;
    +import backtype.storm.tuple.Fields;
    +import backtype.storm.tuple.Tuple;
    +import backtype.storm.tuple.Values;
    +
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +/**
    + * This topology demonstrates Storm's stream groupings and multilang 
capabilities.
    + */
    +public class WordCountTopologyNode {
    +  public static class SplitSentence extends ShellBolt implements IRichBolt 
{
    +
    +    public SplitSentence() {
    +      super("node", "splitsentence.js");
    +    }
    +
    +    @Override
    +    public void declareOutputFields(OutputFieldsDeclarer declarer) {
    +      declarer.declare(new Fields("word"));
    +    }
    +
    +    @Override
    +    public Map<String, Object> getComponentConfiguration() {
    +      return null;
    +    }
    +  }
    +
    +    public static class RandomSentence extends ShellSpout implements 
IRichSpout {
    --- End diff --
    
    Indentation seems off here.


> Development of multilang protocol in nodejs
> -------------------------------------------
>
>                 Key: STORM-386
>                 URL: https://issues.apache.org/jira/browse/STORM-386
>             Project: Apache Storm (Incubating)
>          Issue Type: New Feature
>         Environment: nodejs
>            Reporter: Anya Tchernishov
>
> Support nodejs multilang protocol.
> Design considerations:
> - Emit will receive an object (like args and kwargs in python) and a callback 
> that is called when task ids list is received.
>             self.emit({tuple: [word]}, function(taskIds) {
>                 self.log(word + ' sent to task ids - ' + taskIds);
>             });
> - The following methods will received done method that must be invoked on 
> completion (same pattern used by the mocha test framework for async unit 
> tests). 
> - Internal implementation of emit uses Process.stdout.write without a 
> callback since nodejs streams maintain FIFO order (so far, we have not found 
> a need for providing a callback).
>   



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to