cloud-fan commented on a change in pull request #35643:
URL: https://github.com/apache/spark/pull/35643#discussion_r813674701



##########
File path: core/src/main/scala/org/apache/spark/metrics/sink/GraphiteSink.scala
##########
@@ -42,11 +43,13 @@ private[spark] class GraphiteSink(
   def propertyToOption(prop: String): Option[String] = 
Option(property.getProperty(prop))
 
   if (!propertyToOption(GRAPHITE_KEY_HOST).isDefined) {
-    throw new Exception("Graphite sink requires 'host' property.")
+    throw new SparkException(errorClass = "GRAPHITE_SINK_PROPERTY_MISSING",

Review comment:
       let's put the error in `SparkCoreErrors.scala`

##########
File path: core/src/main/scala/org/apache/spark/metrics/sink/GraphiteSink.scala
##########
@@ -42,11 +43,13 @@ private[spark] class GraphiteSink(
   def propertyToOption(prop: String): Option[String] = 
Option(property.getProperty(prop))
 
   if (!propertyToOption(GRAPHITE_KEY_HOST).isDefined) {
-    throw new Exception("Graphite sink requires 'host' property.")
+    throw new SparkException(errorClass = "GRAPHITE_SINK_PROPERTY_MISSING",

Review comment:
       let's put the error in `SparkCoreErrors.scala`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to