0

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.

tk421
  • 5,775
  • 6
  • 23
  • 34
Firouziam
  • 777
  • 1
  • 9
  • 31

2 Answers2

1

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>
Majid Hajibaba
  • 3,105
  • 6
  • 23
  • 55
1

There is a heron project running in IntellJ, here.
The pom.xml content is:

<groupId>io.streaml.heron.streamlet</groupId>
    <artifactId>heron-java-streamlet-api-example</artifactId>
    <version>latest</version>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <heron.version>0.17.2</heron.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.twitter.heron</groupId>
            <artifactId>heron-api</artifactId>
            <version>${heron.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass></mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
       </plugins>
    </build>
Yitian Zhang
  • 314
  • 1
  • 3
  • 18