Skip to content

Commit

Permalink
rename METRICS_CONF: DEFAULT_METRICS_CONF_FILENAME
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Feb 13, 2015
1 parent f4d7fab commit 08ff998
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private[spark] class MetricsConfig(val configFile: Option[String]) extends Loggi

val DEFAULT_PREFIX = "*"
val INSTANCE_REGEX = "^(\\*|[a-zA-Z]+)\\.(.+)".r
val METRICS_CONF = "metrics.properties"
val DEFAULT_METRICS_CONF_FILENAME = "metrics.properties"

val properties = new Properties()
var propertyCategories: mutable.HashMap[String, Properties] = null
Expand All @@ -49,7 +49,7 @@ private[spark] class MetricsConfig(val configFile: Option[String]) extends Loggi
// If spark.metrics.conf is not set, try to get file in class path
val isOpt: Option[InputStream] = configFile.map(new FileInputStream(_)).orElse {
try {
Option(Utils.getSparkClassLoader.getResourceAsStream(METRICS_CONF))
Option(Utils.getSparkClassLoader.getResourceAsStream(DEFAULT_METRICS_CONF_FILENAME))
} catch {
case e: Exception =>
logError("Error loading default configuration file", e)
Expand Down

0 comments on commit 08ff998

Please sign in to comment.