title: Flink: How to pass extra JVM options to TaskManager and JobManager
body: <p>I am trying to submit flink job on yarn using below command:</p>
  
  <pre><code>/usr/flink-1.3.2/bin/flink run -yd -yn 1 -ynm MyApp -ys 1 -yqu default -m yarn-cluster -c com.mycompany.Driver -j /usr/myapp.jar -Denv.java.opts="-Dzkconfig.parent /app-config_127.0.0.1 -Dzk.hosts localhost:2181 -Dsax.zookeeper.root /app"
  </code></pre>
  
  <p>I got the <strong>env.java.opts</strong> on flink client log but when the application gets submitted to Yarn, these Java options wont be available. Due to unavailability of extra JVM options, application throws exception while connecting with zookeeper.</p>
  
  <p>Please suggest, how to pass dynamic properties to JM &amp; TM running on yarn.</p>
  
  <p>Note: I tried to set <strong>env.java.opts</strong> options into <strong>conf/flink-conf.yaml</strong> and its working fine. I need a way to set this option through flink run command.</p>