storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Weathers <eweath...@groupon.com>
Subject Re: Storm dependency on JVM version
Date Thu, 01 Oct 2015 05:14:02 GMT
*Quick answer: *Storm works fine on JRE 6, 7, 8 from my experience.

Following are different ways we can derive the answer to your question
rather than just hoping someone tells us, but first we must satisfy a
prerequisite bit of knowledge:

*Prerequisite knowledge:*

Newer Java JREs *will* successfully run binaries built with older Java JDKs
(mostly, there are exceptions):

   -
   https://www.google.com/search?q=will+java+code+built+with+older+JDK+work+on+newer+JRE
   -
   http://stackoverflow.com/questions/10895969/can-newer-jre-versions-run-java-programs-compiled-with-older-jdk-versions
   -
   http://stackoverflow.com/questions/19911267/java-code-compiled-using-an-older-jdk-will-not-work-properly-with-a-newer-jre-jv

Ok, so here's 2 ways we can figure out what Java version the Storm binaries
are built for:

*(1) Use the source, Luke:*

The target version of Java is 6 (or 1.6) in storm-0.9.5:

   - https://github.com/apache/storm/blob/v0.9.5/pom.xml#L618

Next we note that the version of Clojure is 1.5.1 in storm-0.9.5:

   - https://github.com/apache/storm/blob/v0.9.5/pom.xml#L184

So, what Java version does Clojure 1.5.1 compile code to?  It's Java 5 (or
1.5):

   - https://github.com/clojure/clojure/blob/clojure-1.5.1/pom.xml#L80

Notably, in Clojure 1.6 they have changed the target to Java 6:

   - http://dev.clojure.org/jira/browse/CLJ-1268

*(2) Examine the built binary files:*

Now, let's say you didn't know about github and cannot read code, but you
have unix shell knowledge.  In this case you can just take storm's binary
files and figure this out.  We extract the storm-core class files from the
downloadable storm-0.9.5 build, and then we can see that they were built
for Java 1.5 and Java 1.6:

% mkdir tmp
% cd tmp
% wget
http://apache.mirrors.pair.com/storm/apache-storm-0.9.5/apache-storm-0.9.5.tar.gz
% tar -xf apache-storm-0.9.5.tar.gz
apache-storm-0.9.5/lib/storm-core-0.9.5.jar
% jar -xf apache-storm-0.9.5/lib/storm-core-0.9.5.jar
% find . -name '*.class' | xargs -I{} sh -c 'file {} >>
storm-classes-file-info'
% cat storm-classes-file-info | cut -d\( -f2 | sort | uniq -c
2399 Java 1.5)
2818 Java 1.6)
1711 No such file or directory)

- Erik

On Wed, Sep 30, 2015 at 3:11 PM, Kashyap Mhaisekar <kashyap.m@gmail.com>
wrote:

> Hi,
> Does storm 0.9.5 work well with Open JDK version - 7
> java version "1.7.0_79"
> OpenJDK Runtime Environment (rhel-2.5.5.3.el6_6-x86_64 u79-b14)
> OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
>
> Is there a hard dependency on java 6?
>
> Thanks
> Kashyap
>

Mime
View raw message