AngersZhuuuu commented on a change in pull request #35799:
URL: https://github.com/apache/spark/pull/35799#discussion_r841178986



##########
File path: 
streaming/src/test/scala/org/apache/spark/streaming/StreamingListenerSuite.scala
##########
@@ -386,3 +400,14 @@ class StreamingContextStoppingCollector(val ssc: 
StreamingContext) extends Strea
     }
   }
 }
+
+class CustomizedStreamingListener extends StreamingListener {

Review comment:
       Done

##########
File path: 
streaming/src/test/scala/org/apache/spark/streaming/StreamingListenerSuite.scala
##########
@@ -235,6 +236,19 @@ class StreamingListenerSuite extends TestSuiteBase with 
LocalStreamingContext wi
     verifyNoMoreInteractions(streamingListener)
   }
 
+  test("SPARK-38498: Support customized streaming listener") {

Review comment:
       Done

##########
File path: 
streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala
##########
@@ -616,6 +616,27 @@ class StreamingContext private[streaming] (
     }
   }
 
+  /**
+   * Registers streaming listeners specified in spark.streaming.extraListeners.
+   */
+  private def setupExtraStreamingListener(): Unit = {

Review comment:
       Done

##########
File path: 
streaming/src/main/scala/org/apache/spark/streaming/StreamingConf.scala
##########
@@ -185,4 +185,10 @@ object StreamingConf {
       .longConf
       .createWithDefault(0)
 
+  private[streaming] val STREAMING_EXTRA_LISTENERS = 
ConfigBuilder("spark.streaming.extraListeners")
+    .doc("Class names of streaming listeners to add to StreamingContext during 
initialization.")
+    .version("3.3.0")

Review comment:
       Done

##########
File path: 
streaming/src/main/scala/org/apache/spark/streaming/StreamingConf.scala
##########
@@ -185,4 +185,10 @@ object StreamingConf {
       .longConf
       .createWithDefault(0)
 
+  private[streaming] val STREAMING_EXTRA_LISTENERS = 
ConfigBuilder("spark.streaming.extraListeners")

Review comment:
       Done




-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to