Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50182827
  
    --- Diff: 
external/akka/src/main/scala/org/apache/spark/streaming/akka/ActorReceiver.scala
 ---
    @@ -26,23 +26,34 @@ import scala.reflect.ClassTag
     
     import akka.actor._
     import akka.actor.SupervisorStrategy.{Escalate, Restart}
    +import com.typesafe.config.ConfigFactory
     
    -import org.apache.spark.{Logging, SparkEnv}
    +import org.apache.spark.{Logging, TaskContext}
     import org.apache.spark.annotation.DeveloperApi
     import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.receiver.Receiver
     
     /**
      * :: DeveloperApi ::
      * A helper with set of defaults for supervisor strategy
      */
     @DeveloperApi
    -object ActorSupervisorStrategy {
    +object ActorReceiver {
     
       val defaultStrategy = OneForOneStrategy(maxNrOfRetries = 10, 
withinTimeRange =
         15 millis) {
         case _: RuntimeException => Restart
         case _: Exception => Escalate
       }
    +
    +  def defaultActorSystemCreator(): ActorSystem = {
    --- End diff --
    
    Add scala docs. This is public.
    And make this a val that return () => ActorSystem, so that people can write 
directly use this as createStream(...., 
ActorReceiver.defaultActorSystemCreator).



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to