No, but otherwise the user can't relaunch a UI on a different port from 14040. An alternative is to have SparkUI take in a SparkConf, which is not tied to a SparkContext (though I prefer to keep the arguments to SparkUI to a minimum).