Storm official Help manual translation (next)

Source: Internet
Author: User

Writing bolts in other languages

Bolts can be written in any language. Write a bolt in another language to run as a child process. Storm uses JSON to communicate with child processes based on standard input and output. The communication protocol requires a 100-line adapter library, and Storm comes with Ruby,python, and Fancy's adapter library.

The following is the definition of splitsentence in wordcounttopology:

?
123456789 publicstaticclassSplitSentence extendsShellBolt implementsIRichBolt {    publicSplitSentence() {        super("python""splitsentence.py");    }    publicvoid declareOutputFields(OutputFieldsDeclarer declarer) {        declarer.declare(newFields("word"));    }}

Splitsentence integrates the Shellbolt and specifies that Python is used to run with the "splitsentence.py" parameter. Here are the specific implementations of splitsentence.py:

?
123456789 importstorm classSplitSentenceBolt(storm.BasicBolt):    defprocess(self, tup):        words =tup.values[0].split(" ")        forword inwords:          storm.emit([word])SplitSentenceBolt().run()

More information about writing spout and bolts in other languages, and how to create topology with other languages (avoid using the JVM entirely), and see Using NON-JVM languages with Storm.

Guaranteed Message Handling

In the previous article we have tuned some concepts about how tuples are emitted. These concepts are part of storm reliability: How storm ensures that every message is completely difficult to handle. Read guaranteeing message processing to learn how it works, and how to use storm reliability as a user.

Things topology

Storm guarantees that each message will be processed at least once by topology processing. A common question is "How to use Storm to count?" Will the count be repeated? "Storm has a feature called thing topology that allows you to handle messages precisely in most calculations. Click here for more information about the topology of things.

Distributed RPC

This document describes how to skillfully use storm to do basic stream processing. You can also use storm to do more things. A more interesting program in Storm is distributed RPC, which you can use to perform parallel computations. Click here for more information on distributed RPC.

Summarize

This manual provides an overview of development, testing, and not storm topology, and other documents will give you a deeper understanding of all aspects of storm usage

Translator language

After more than half a day of efforts, finally completed the translation of documents, follow-up will continue to bring more technical translation, such as Zookeeper,spark,kafa. If there is an inappropriate translation in the text, I hope that we will make progress together.

Storm official Help manual translation (next)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.