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

    https://github.com/apache/spark/pull/5024#discussion_r26436080
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/Checkpoint.scala ---
    @@ -43,10 +43,15 @@ class Checkpoint(@transient ssc: StreamingContext, val 
checkpointTime: Time)
       val delaySeconds = MetadataCleaner.getDelaySeconds(ssc.conf)
       val sparkConfPairs = ssc.conf.getAll
     
    -  def sparkConf = {
    -    new SparkConf(false).setAll(sparkConfPairs)
    +  def createSparkConf(): SparkConf = {
    +    val newSparkConf = new SparkConf(loadDefaults = 
false).setAll(sparkConfPairs)
           .remove("spark.driver.host")
           .remove("spark.driver.port")
    +    new SparkConf(loadDefaults = true).getOption("spark.master") match {
    +      case Some(newMaster) => newSparkConf.setMaster(newMaster)
    +      case _ => None
    --- End diff --
    
    `case _ => ` should be enough, no? Is there a need to return `None`? (Since 
`None` is an object, I am not sure what the real cost is in this case for 
returning something - so this can be ignored if the cost here is ~zero)


---
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