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

    https://github.com/apache/spark/pull/12341#discussion_r59785568
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -280,6 +280,8 @@ class SparkContext(config: SparkConf) extends Logging 
with ExecutorAllocationCli
     
       private[spark] def ui: Option[SparkUI] = _ui
     
    +  def uiWebUrl: Option[String] = _ui.map(_.webUrl)
    --- End diff --
    
    `def uiWebUrl: Option[String] ` method is called inside repl's 
`processLine` so having `private[spark]` won't be enough. It returns a "cannot 
be accessed" error.
    
    Alternatively, I can change the `def ui: Option[SparkUI]` method from 
`private[spark]` to `public` and then change the print statement to 
    `_sc.ui.foreach(ui => println(s"Spark context Web UI available at 
${ui.webUrl}"))`
    
    That would work as well but I preferred to have a new public method 
(`uiWebUrl `) rather than making the `ui` public. I would be happy to hear your 
suggestion.


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