Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add comment
  • Loading branch information
cloud-fan committed May 26, 2017
commit a637e95794c8d0db602c8b2d8c2a19250b058200
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ private[spark] class ConfigReader(conf: ConfigProvider) {
}
}

/**
* Gets the value of a config from the given `ConfigProvider`. If no value is found for this
* config, and the `ConfigEntry` defines this config has default value, return the default value.
*/
private def getOrDefault(conf: ConfigProvider, key: String): Option[String] = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add comment for this method.

conf.get(key).orElse {
ConfigEntry.findEntry(key) match {
Expand Down