Cannot call methods on a stopped SparkContext.&#010;This stopped SparkContext was created at:&#010;&#010;org.apache.spark.sql.hive.StatisticsSuite.<init>(StatisticsSuite.scala:28)&#010;sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)&#010;sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)&#010;sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)&#010;java.lang.reflect.Constructor.newInstance(Constructor.java:526)&#010;java.lang.Class.newInstance(Class.java:374)&#010;org.scalatest.tools.DiscoverySuite$.getSuiteInstance(DiscoverySuite.scala:69)&#010;org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:38)&#010;org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:37)&#010;scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)&#010;scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)&#010;scala.collection.Iterator$class.foreach(Iterator.scala:727)&#010;scala.collection.AbstractIterator.foreach(Iterator.scala:1157)&#010;scala.collection.IterableLike$class.foreach(IterableLike.scala:72)&#010;scala.collection.AbstractIterable.foreach(Iterable.scala:54)&#010;scala.collection.TraversableLike$class.map(TraversableLike.scala:244)&#010;scala.collection.AbstractTraversable.map(Traversable.scala:105)&#010;org.scalatest.tools.DiscoverySuite.<init>(DiscoverySuite.scala:37)&#010;org.scalatest.tools.Runner$.genDiscoSuites$1(Runner.scala:2390)&#010;org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:2475)&#010;&#010;The currently active SparkContext was created at:&#010;&#010;(No active SparkContext.)&#010;


      java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext.
This stopped SparkContext was created at:

org.apache.spark.sql.hive.StatisticsSuite.<init>(StatisticsSuite.scala:28)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
java.lang.Class.newInstance(Class.java:374)
org.scalatest.tools.DiscoverySuite$.getSuiteInstance(DiscoverySuite.scala:69)
org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:38)
org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:37)
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
scala.collection.Iterator$class.foreach(Iterator.scala:727)
scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
scala.collection.AbstractIterable.foreach(Iterable.scala:54)
scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
scala.collection.AbstractTraversable.map(Traversable.scala:105)
org.scalatest.tools.DiscoverySuite.<init>(DiscoverySuite.scala:37)
org.scalatest.tools.Runner$.genDiscoSuites$1(Runner.scala:2390)
org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:2475)

The currently active SparkContext was created at:

(No active SparkContext.)
         
      at org.apache.spark.SparkContext.org$apache$spark$SparkContext$$assertNotStopped(SparkContext.scala:106)
      at org.apache.spark.SparkContext$$anonfun$parallelize$1.apply(SparkContext.scala:729)
      at org.apache.spark.SparkContext$$anonfun$parallelize$1.apply(SparkContext.scala:728)
      at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150)
      at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:111)
      at org.apache.spark.SparkContext.withScope(SparkContext.scala:714)
      at org.apache.spark.SparkContext.parallelize(SparkContext.scala:728)
      at org.apache.spark.sql.execution.ExecutedCommand.doExecute(commands.scala:70)
      at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$5.apply(SparkPlan.scala:132)
      at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$5.apply(SparkPlan.scala:130)
      at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150)
      at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:130)
      at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:55)
      at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:55)
      at org.apache.spark.sql.DataFrame.<init>(DataFrame.scala:145)
      at org.apache.spark.sql.DataFrame.<init>(DataFrame.scala:130)
      at org.apache.spark.sql.DataFrame$.apply(DataFrame.scala:52)
      at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:817)
      at org.apache.spark.sql.test.SQLTestUtils$$anonfun$withTable$1.apply(SQLTestUtils.scala:152)
      at org.apache.spark.sql.test.SQLTestUtils$$anonfun$withTable$1.apply(SQLTestUtils.scala:151)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
      at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
      at org.apache.spark.sql.test.SQLTestUtils$class.withTable(SQLTestUtils.scala:151)
      at org.apache.spark.sql.hive.MetastoreDataSourcesSuite.withTable(MetastoreDataSourcesSuite.scala:39)
      at org.apache.spark.sql.hive.MetastoreDataSourcesSuite$$anonfun$17.apply$mcV$sp(MetastoreDataSourcesSuite.scala:584)
      at org.apache.spark.sql.hive.MetastoreDataSourcesSuite$$anonfun$17.apply(MetastoreDataSourcesSuite.scala:584)
      at org.apache.spark.sql.hive.MetastoreDataSourcesSuite$$anonfun$17.apply(MetastoreDataSourcesSuite.scala:584)
      at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
      at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
      at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
      at org.scalatest.Transformer.apply(Transformer.scala:22)
      at org.scalatest.Transformer.apply(Transformer.scala:20)
      at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166)
      at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:42)
      at org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163)
      at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
      at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
      at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
      at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175)
      at org.scalatest.FunSuite.runTest(FunSuite.scala:1555)
      at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208)
      at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208)
      at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413)
      at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401)
      at scala.collection.immutable.List.foreach(List.scala:318)
      at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
      at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396)
      at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483)
      at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208)
      at org.scalatest.FunSuite.runTests(FunSuite.scala:1555)
      at org.scalatest.Suite$class.run(Suite.scala:1424)
      at org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555)
      at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212)
      at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212)
      at org.scalatest.SuperEngine.runImpl(Engine.scala:545)
      at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212)
      at org.apache.spark.sql.hive.MetastoreDataSourcesSuite.org$scalatest$BeforeAndAfterAll$$super$run(MetastoreDataSourcesSuite.scala:39)
      at org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257)
      at org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256)
      at org.apache.spark.sql.hive.MetastoreDataSourcesSuite.run(MetastoreDataSourcesSuite.scala:39)
      at org.scalatest.Suite$class.callExecuteOnSuite$1(Suite.scala:1492)
      at org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1528)
      at org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1526)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
      at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108)
      at org.scalatest.Suite$class.runNestedSuites(Suite.scala:1526)
      at org.scalatest.tools.DiscoverySuite.runNestedSuites(DiscoverySuite.scala:29)
      at org.scalatest.Suite$class.run(Suite.scala:1421)
      at org.scalatest.tools.DiscoverySuite.run(DiscoverySuite.scala:29)
      at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:55)
      at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:2563)
      at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:2557)
      at scala.collection.immutable.List.foreach(List.scala:318)
      at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:2557)
      at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1044)
      at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1043)
      at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:2722)
      at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1043)
      at org.scalatest.tools.Runner$.main(Runner.scala:860)
      at org.scalatest.tools.Runner.main(Runner.scala)