title: identify live spark master at the time of spark-submit
body: <p>I have 5 node spark cluster where 2 node are running master. in HA(by Zookeeper) scenario any one will be elected as master.</p>
  
  <pre><code>at the time of submitting application using command
  
  /bin/spark-submit  --class SparkAggregator.java --deploy-mode cluster --supervise --master spark://host1:7077
  
  getting error 
  Can only accept driver submissions in ALIVE state. Current state: STANDBY.
  
  spark-submit doe not allow multiple master name in --master.
  
  Question:
  How to identify the elected master at the time of spark-submit.
  
  Thanks
  Pankaj
  </code></pre>