You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Mariusz Wojakowski <ma...@gmail.com> on 2017/08/11 11:20:03 UTC

Overwrite environment variables in single-job deployment on YARN

Hi,

I want to run Flink job on YARN and I need to overwrite JAVA_HOME on Task Managers. In multi-job mode I can do it by passing parameter when starting cluster: 

./yarn-session.sh -D yarn.taskamanager.env.JAVA_HOME=“/opt/jre1.8.0”

I want to overwrite this variable in single-job deployment, but it doesn’t work - TM’s JAVA_HOME is unchanged.
Maybe I’m missing something - could you give me some advice how to do that?


Thanks!
Mariusz

Re: Overwrite environment variables in single-job deployment on YARN

Posted by Mariusz Wojakowski <ma...@gmail.com>.
Thanks! It works :)

I’ve tried that but I’ve also misspelled ’taskmanager’… 

Sorry & thanks one more time!
Mariusz
> On 11 Aug 2017, at 14:28, Aljoscha Krettek <al...@apache.org> wrote:
> 
> Hi,
> 
> Have you tried 
> 
> ./bin/flink run -m yarn-cluster -yD yarn.taskmanager.env.JAVA_HOME=“/opt/jre1.8.0”
> 
> -yD can be used to dynamically specify settings.
> 
> Best,
> Aljoscha
>> On 11. Aug 2017, at 13:20, Mariusz Wojakowski <mariusz89016@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> I want to run Flink job on YARN and I need to overwrite JAVA_HOME on Task Managers. In multi-job mode I can do it by passing parameter when starting cluster: 
>> 
>> ./yarn-session.sh -D yarn.taskamanager.env.JAVA_HOME=“/opt/jre1.8.0”
>> 
>> I want to overwrite this variable in single-job deployment, but it doesn’t work - TM’s JAVA_HOME is unchanged.
>> Maybe I’m missing something - could you give me some advice how to do that?
>> 
>> 
>> Thanks!
>> Mariusz
> 


Re: Overwrite environment variables in single-job deployment on YARN

Posted by Aljoscha Krettek <al...@apache.org>.
Hi,

Have you tried 

./bin/flink run -m yarn-cluster -yD yarn.taskmanager.env.JAVA_HOME=“/opt/jre1.8.0”

-yD can be used to dynamically specify settings.

Best,
Aljoscha
> On 11. Aug 2017, at 13:20, Mariusz Wojakowski <ma...@gmail.com> wrote:
> 
> Hi,
> 
> I want to run Flink job on YARN and I need to overwrite JAVA_HOME on Task Managers. In multi-job mode I can do it by passing parameter when starting cluster: 
> 
> ./yarn-session.sh -D yarn.taskamanager.env.JAVA_HOME=“/opt/jre1.8.0”
> 
> I want to overwrite this variable in single-job deployment, but it doesn’t work - TM’s JAVA_HOME is unchanged.
> Maybe I’m missing something - could you give me some advice how to do that?
> 
> 
> Thanks!
> Mariusz