title: How to check that the SparkContext has been stopped?
body: <p>How do I detect whether the <a href="http://spark.apache.org/docs/latest/programming-guide.html" rel="noreferrer"><code>SparkContext</code></a> has been <a href="https://spark.apache.org/docs/latest/api/java/org/apache/spark/SparkContext.html#stop()" rel="noreferrer">stopped</a>?</p>