Just small nit comment on style, I think continuation of code should be aligned with 4 spaces indent like:

```
// Yarn has to go through a proxy so the base uri is provided and has to be on all links
private[spark] val uiRoot : String = Option(System.getenv("APPLICATION_WEB_PROXY_BASE")).
    getOrElse("")
```