Github user dongjoon-hyun commented on a diff in the pull request: https://github.com/apache/spark/pull/11994#discussion_r126277653 --- Diff: core/src/main/scala/org/apache/spark/metrics/sink/GraphiteSink.scala --- @@ -50,30 +52,30 @@ private[spark] class GraphiteSink(val property: Properties, val registry: Metric throw new Exception("Graphite sink requires 'port' property.") } - val host = propertyToOption(GRAPHITE_KEY_HOST).get - val port = propertyToOption(GRAPHITE_KEY_PORT).get.toInt + private val host = propertyToOption(GRAPHITE_KEY_HOST).get + private val port = propertyToOption(GRAPHITE_KEY_PORT).get.toInt - val pollPeriod = propertyToOption(GRAPHITE_KEY_PERIOD) match { + private val pollPeriod = propertyToOption(GRAPHITE_KEY_PERIOD) match { case Some(s) => s.toInt case None => GRAPHITE_DEFAULT_PERIOD } - val pollUnit: TimeUnit = propertyToOption(GRAPHITE_KEY_UNIT) match { - case Some(s) => TimeUnit.valueOf(s.toUpperCase(Locale.ROOT)) + private val pollUnit: TimeUnit = propertyToOption(GRAPHITE_KEY_UNIT) match { + case Some(s) => TimeUnit.valueOf(s.toUpperCase()) case None => TimeUnit.valueOf(GRAPHITE_DEFAULT_UNIT) } - val prefix = propertyToOption(GRAPHITE_KEY_PREFIX).getOrElse(GRAPHITE_DEFAULT_PREFIX) + private val prefix = propertyToOption(GRAPHITE_KEY_PREFIX).getOrElse(GRAPHITE_DEFAULT_PREFIX) MetricsSystem.checkMinimalPollingPeriod(pollUnit, pollPeriod) - val graphite = propertyToOption(GRAPHITE_KEY_PROTOCOL).map(_.toLowerCase(Locale.ROOT)) match { + private val graphite = propertyToOption(GRAPHITE_KEY_PROTOCOL).map(_.toLowerCase) match { --- End diff -- Here, too.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org