I am trying to load application.conf
in spark-shell using typesafe-config.
Following is the code and spark-shell command:
scala code:
import com.typesafe.config.{Config, ConfigFactory}
val config: Config = ConfigFactory.load("application.conf")
val env = config.getString("key.key1")
spark-shell commands:
spark-shell --jars confing-1.3.4.jar --files application.conf --driver-java-options -Dconfig.file=application.conf
(attempt 1)spark-shell --jars confing-1.3.4.jar (attempt 2)
application.conf:
key {
key1 = "value1"
}
error:
com.typesafe.config.ConfigException$Missing: system properties: No configuration setting found for key 'key'