Skip to content

Commit

Permalink
Fix the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
artemkorsakov committed Jan 15, 2024
1 parent 4da7178 commit 7d2c67d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,17 +342,17 @@ object Configs {
}

def readConfig(config: Config, name: String): Map[String, String] = {
val map = mutable.Map[String, String]()
val map = mutable.Map[String, String]()
val configObject = config.getObject(name)
for (key <- configObject.unwrapped().keySet().asScala) {
val refinedKey = s"$name.$key"
config.getAnyRef(refinedKey) match {
case stringValue: String => map += refinedKey -> stringValue
case _ =>
for (subKey <- config.getObject(refinedKey).unwrapped().keySet().asScala) {
val refinedSubKey = s"$refinedKey.$subKey"
val sparkValue = config.getString(refinedSubKey)
map += refinedSubKey -> sparkValue
val refinedSubKey = s"$refinedKey.$subKey"
val refinedSubValue = config.getString(refinedSubKey)
map += refinedSubKey -> refinedSubValue
}
}
}
Expand Down

0 comments on commit 7d2c67d

Please sign in to comment.