javamavenintellij-ideaapache-stormheron

correct way to create twitter heron project using intellij


I'm trying to start a heron project (or port existing storm project) using IntelliJ IDEA but unfortunately I can't make it work.

I have tested all the suggested instructions in Heron Docs to upgrade from storm but after changing POM.xml file based on documentation, i get bunch of cannot find symbol from basic heron classes and methods while compiling with maven and adding library Jars doesn't help (like it used to with storm).

I Also tried to use setup-intellij.sh script to make an intellij project but unfortunately it stops with errors:

null failed: _pex failed: error executing command
bazel-out/local_linux-fastbuild/bin/3rdparty/pex/_pex --entry-point heron.shell.src.python.main bazel-out/local_linux-fastbuild/bin/heron/shell/src/python/heron-shell.pex ...
(remaining 1 argument(s) skipped)

I'm wondering what is the easiest way to create a working project using intelliJ IDEA.

Do I have to add storm libraries as well as heron libraries to intelliJ? how can I attach required libraries so it can compile correctly?

Any suggestion would be appreciated.


Solution

  • Use backtype.storm.* instead of com.twitter.heron.api.* to import classes. These packages all exist in heron library. Just need to add the following dependency:

        <dependency>
            <groupId>com.twitter.heron</groupId>
            <artifactId>heron-storm</artifactId>
            <version>0.14.0</version>
        </dependency>