You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Michael Dev <mi...@outlook.com> on 2014/06/26 00:31:16 UTC

STORM_JAR_JVM_OPTS Not Operating As Expected

I set this environment variable prior to invoking storm jar:

export STORM_JAR_JVM_OPTS=-Dmy.jvm.opt=/srv/myapp/config/config.txt

I then invoke storm jar in a standard way:

/srv/storm/bin/storm jar /srv/myapp/lib/myapp-jar-with-dependencies.jar myapp.MyMain;

Yet when I access System.getProperty(my.jvm.opt) within my application during the topology building phase I recieve unexpected value of "/srv/myapp/config/config.txt -Dstorm.jar=/srv/myapp/lib/myapp-jar-with-dependencies.jar" as if the jvm thinks the value for my.jvm.opt is the entire JVM options string.

Am I setting STORM_JAR_JVM_OPTS incorrectly? Note that without this JAR_JVM_OPT my application executes without any issues ignoring the code that needs this jvm option set.

Thank you,
Michael
 		 	   		  

Re: STORM_JAR_JVM_OPTS Not Operating As Expected

Posted by Derek Dagit <de...@yahoo-inc.com>.
This is likely fixed in 0.9.2-incubating with STORM-173.

The issue is that Utils#readCommandLineOpts silently failed when there was an '=' in the value of the config.  It uses '=' as the delimiter to separate keys and values.

-- 
Derek

On 6/25/14, 17:34, Michael Dev wrote:
> Sorry I forgot to mention that this is with storm 0.9.0.1. I see 0.9.2 has different code in the storm python script in regard to these jvm opts. I'm guessing this was an issue that was addressed in the upgrade?
>
> From: michael_dev@outlook.com
> To: user@storm.incubator.apache.org
> Subject: STORM_JAR_JVM_OPTS Not Operating As Expected
> Date: Wed, 25 Jun 2014 18:31:16 -0400
>
>
>
>
> I set this environment variable prior to invoking storm jar:
>
> export STORM_JAR_JVM_OPTS=-Dmy.jvm.opt=/srv/myapp/config/config.txt
>
> I then invoke storm jar in a standard way:
>
> /srv/storm/bin/storm jar /srv/myapp/lib/myapp-jar-with-dependencies.jar myapp.MyMain;
>
> Yet when I access System.getProperty(my.jvm.opt) within my application during the topology building phase I recieve unexpected value of "/srv/myapp/config/config.txt -Dstorm.jar=/srv/myapp/lib/myapp-jar-with-dependencies.jar" as if the jvm thinks the value for my.jvm.opt is the entire JVM options string.
>
> Am I setting STORM_JAR_JVM_OPTS incorrectly? Note that without this JAR_JVM_OPT my application executes without any issues ignoring the code that needs this jvm option set.
>
> Thank you,
> Michael
>   		 	   		   		 	   		
>

RE: STORM_JAR_JVM_OPTS Not Operating As Expected

Posted by Michael Dev <mi...@outlook.com>.
Sorry I forgot to mention that this is with storm 0.9.0.1. I see 0.9.2 has different code in the storm python script in regard to these jvm opts. I'm guessing this was an issue that was addressed in the upgrade?

From: michael_dev@outlook.com
To: user@storm.incubator.apache.org
Subject: STORM_JAR_JVM_OPTS Not Operating As Expected
Date: Wed, 25 Jun 2014 18:31:16 -0400




I set this environment variable prior to invoking storm jar:

export STORM_JAR_JVM_OPTS=-Dmy.jvm.opt=/srv/myapp/config/config.txt

I then invoke storm jar in a standard way:

/srv/storm/bin/storm jar /srv/myapp/lib/myapp-jar-with-dependencies.jar myapp.MyMain;

Yet when I access System.getProperty(my.jvm.opt) within my application during the topology building phase I recieve unexpected value of "/srv/myapp/config/config.txt -Dstorm.jar=/srv/myapp/lib/myapp-jar-with-dependencies.jar" as if the jvm thinks the value for my.jvm.opt is the entire JVM options string.

Am I setting STORM_JAR_JVM_OPTS incorrectly? Note that without this JAR_JVM_OPT my application executes without any issues ignoring the code that needs this jvm option set.

Thank you,
Michael