How to know deploy mode of PySpark application?
<p>I am trying to fix an issue with running out of memory, and I want to know whether I need to change these settings in the default configurations file (<code>spark-defaults.conf</code>) in the spark home folder.  Or, if I can set them in the code.</p>

<p>I saw this question <a href="https://stackoverflow.com/questions/32336915/pyspark-java-lang-outofmemoryerror-java-heap-space">PySpark: java.lang.OutofMemoryError: Java heap space</a> and it says that it depends on if I'm running in <code>client</code> mode.  I'm running spark on a cluster and monitoring it using standalone.</p>

<p>But, how do I figure out if I'm running spark in <code>client</code> mode?  </p>