Description
Scala:
scala> spark.conf.get("hey") java.util.NoSuchElementException: hey at org.apache.spark.sql.internal.SQLConf$$anonfun$getConfString$2.apply(SQLConf.scala:1600) at org.apache.spark.sql.internal.SQLConf$$anonfun$getConfString$2.apply(SQLConf.scala:1600) at scala.Option.getOrElse(Option.scala:121) at org.apache.spark.sql.internal.SQLConf.getConfString(SQLConf.scala:1600) at org.apache.spark.sql.RuntimeConfig.get(RuntimeConfig.scala:74) ... 49 elided scala> spark.conf.get("hey", null) res1: String = null scala> spark.conf.get("spark.sql.sources.partitionOverwriteMode", null) res2: String = null
Python:
>>> spark.conf.get("hey") ... py4j.protocol.Py4JJavaError: An error occurred while calling o30.get. : java.util.NoSuchElementException: hey ... >>> spark.conf.get("hey", None) ... py4j.protocol.Py4JJavaError: An error occurred while calling o30.get. : java.util.NoSuchElementException: hey ... >>> spark.conf.get("spark.sql.sources.partitionOverwriteMode", None) u'STATIC'