Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Heron-updates the original storm to heron

Shulou Source: shulou.com Published: 2022-06-03 02:40:46 10月02日 Update

When Twitter designed its heron architecture, it was designed to be completely storm-compatible. So the previous storm project can be easily translated into heron, all you need to do is adjust the Maven configuration file pom.xml of tolopogy.

Step by step:

1. Download the installation script for Heron API

If you downloaded those sh or tar.gz in the previous step, you can download them here (https://github.com/twitter/heron/releases). Ignore this.

heron-api-install-0.14.2-PLATFORM.sh

Note: sh files with darwin characters under Mac

After successful download, you can use--user and--maven to install

$ ./ heron-api-install-0.14.3-ubuntu.sh --user --maven--warning=no-timestampHeron API installer---------------------Installing jars to local maven repo.tar xfz /tmp/heron.P7Ui/heron-api.tar.gz -C /tmp/heron.P7Ui --warning=no-timestampHeron API is now installed! See http://heronstreaming.io/docs/getting-started for how to use Heron.heron.build.version : '0.14.3'heron.build.time : Sat Sep 10 01:04:00 PDT 2016heron.build.timestamp : 1473494660000heron.build.host : tw-mbp-kramasamyheron.build.user : kramasamyheron.build.git.revision : 71d5b256d779be73b37c50d2a58af8f00d618276heron.build.git.status : Clean

Note: If there is no maven, use the apt-get command to install a maven.

sudo apt-get install maven

After installation, you can see the heron api content in the local maven repository.

$ ls ~/.m2/repository/com/twitter/heronheron-apiheron-spiheron-storm

2. Add heron dependency to pom.xml

Add the following statement to the pom.xml file of the original storm project

com.twitter.heron heron-api SNAPSHOT compilecom.twitter.heron heron-storm SNAPSHOT compile

3. Remove previous storm dependencies

Remove the storm dependency of the original project pom.xml, for example:

org.apache.storm storm-core storm-VERSION provided

4. Remove Clojure plugin (optional)

If there is a dependency clojure plugin in the original storm project, delete it. For example:

com.theoryinpractise clojure-maven-plugin 1.3.12 true src/clj

5. Run maven command

$ mvn clean$ mvn compile$ mvn package

Note: Storm's distribute RPC feature is no longer used in heron

6. Deploy updated tolopogy (optional)

The heron submit command can be used to deploy the compiled maven project to the local heron environment. See the heron example.

$ heron submit local \ # local represents the jar file path of the local run <$/. heron/examples/heron-examples. jar\ # topology com.twitter.heron.examples.ExclamationTopology \ # topology Java class ExclamationTopology # topology name

Tags: Project file command that is design run update success under no warehouse example content available in name character file download time architecture features Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Tech Info Linux Microsoft Shulou Information