Subject: Reading configuration file in Spark Scala throws error


OK it turned up pretty simple once I established where to read the conf
file in yarn mode and get the values for different keys

  val dbHost = conf.getString("dbHost")
  val dbPort = conf.getString("dbPort")
  val dbConnection = conf.getString("dbConnection")
  val namespace = conf.getString("namespace")
  val dbSetRead = conf.getString("dbSetRead")
  val dbSetWrite = conf.getString("dbSetWrite")
  val dbPassword = conf.getString("dbPassword")
  val bootstrapServers = conf.getString("bootstrapServers")
  val schemaRegistryURL = conf.getString("schemaRegistryURL")
  val zookeeperConnect = conf.getString("zookeeperConnect")
  val zookeeperConnectionTimeoutMs =
conf.getString("zookeeperConnectionTimeoutMs")
  val rebalanceBackoffMS = conf.getString("zookeeperConnectionTimeoutMs")
  val zookeeperSessionTimeOutMs =
conf.getString("zookeeperSessionTimeOutMs")
  val autoCommitIntervalMS = conf.getString("autoCommitIntervalMS")
  val topicsValue =  conf.getString("topicsValue")
  val memorySet = conf.getString("memorySet")
  val enableHiveSupportValue = conf.getString("enableHiveSupportValue")
  val sparkStreamingReceiverMaxRateValue =
conf.getString("sparkStreamingReceiverMaxRateValue")
  val checkpointdir = conf.getString("checkpointdir")
  val hbaseHost = conf.getString("hbaseHost")
  val zookeeperHost = conf.getString("zookeeperHost")
  val zooKeeperClientPort = conf.getString("zooKeeperClientPort")
  val batchInterval = conf.getInt("batchInterval")
  val tickerWatch = conf.getString("tickerWatch")
  val priceWatch= conf.getDouble("priceWatch")
  val op_type = conf.getInt("op_type")
  val currency = conf.getString("currency")
  val tickerType = conf.getString("tickerType")
  val tickerClass = conf.getString("tickerClass")
  val tickerStatus = conf.getString("tickerStatus")
  val confidenceLevel = conf.getDouble("confidenceLevel")
  var hvTicker = conf.getInt("hvTicker")

Thanks again.
Dr Mich Talebzadeh

LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*

http://talebzadehmich.wordpress.com
*Disclaimer:* Use it at your own risk. Any and all responsibility for any
loss, damage or destruction of data or any other property which may arise
from relying on this email's technical content is explicitly disclaimed.
The author will in no case be liable for any monetary damages arising from
such loss, damage or destruction.
On Sun, 4 Aug 2019 at 22:32, Mich Talebzadeh <[EMAIL PROTECTED]>
wrote: