[SPARK-17437] Add uiWebUrl to JavaSparkContext and pyspark.SparkContext
[SPARK-17437] Add uiWebUrl to JavaSparkContext and pyspark.SparkContext

## What changes were proposed in this pull request?

The Scala version of `SparkContext` has a handy field called `uiWebUrl` that tells you which URL the SparkUI spawned by that instance lives at. This is often very useful because the value for `spark.ui.port` in the config is only a suggestion; if that port number is taken by another Spark instance on the same machine, Spark will just keep incrementing the port until it finds a free one. So, on a machine with a lot of running PySpark instances, you often have to start trying all of them one-by-one until you find your application name.

Scala users have a way around this with `uiWebUrl` but Java and Python users do not. This pull request fixes this in the most straightforward way possible, simply propagating this field through the `JavaSparkContext` and into pyspark through the Java gateway.

Please let me know if any additional documentation/testing is needed.

## How was this patch tested?

Existing tests were run to make sure there were no regressions, and a binary distribution was created and tested manually for the correct value of `sc.uiWebPort` in a variety of circumstances.

Author: Adrian Petrescu <apetresc@gmail.com>

Closes #15000 from apetresc/pyspark-uiweburl.

ptkool/spark,brad-kaiser/spark,bdrillard/spark,lxsmnv/spark,setjet/spark,ibm-research-ireland/sparkoscope,holdenk/spark,Panos-Bletsos/spark-cost-model-optimizer,kevinyu98/spark,jrshust/spark,bdrillard/spark,Panos-Bletsos/spark-cost-model-optimizer,adrian-ionescu/apache-spark,map222/spark,nilsgrabbert/spark,ConeyLiu/spark,guoxiaolongzte/spark,narahari92/spark,esi-mineset/spark,kevinyu98/spark,saltstar/spark,JerryLead/spark,darionyaphet/spark,vinodkc/spark,kissmetrics/spark,ioana-delaney/spark,ericvandenbergfb/spark,MLnick/spark,janewangfb/spark,rednaxelafx/apache-spark,andrewor14/spark,patrick-nicholson/spark,maropu/spark,rikima/spark,mdespriee/spark,byakuinss/spark,MLnick/spark,saturday-shi/spark,jianran/spark,akopich/spark,ajaysaini725/spark,kiszk/spark,setjet/spark,chuckchen/spark,shaneknapp/spark,zzcclp/spark,hhbyyh/spark,cin/spark,hvanhovell/spark,tengpeng/spark,goldmedal/spark,kimoonkim/spark,yanboliang/spark,kevinyu98/spark,someorz/spark,janewangfb/spark,sahilTakiar/spark,kevinyu98/spark,ddna1021/spark,shuangshuangwang/spark,ron8hu/spark,rekhajoshm/spark,zhouyejoe/spark,ueshin/apache-spark,kimoonkim/spark,HyukjinKwon/spark,ueshin/apache-spark,xflin/spark,jrshust/spark,mzl9039/spark,chuckchen/spark,icexelloss/spark,BryanCutler/spark,map222/spark,ron8hu/spark,ueshin/apache-spark,ddna1021/spark,brad-kaiser/spark,cin/spark,szhem/spark,jkbradley/spark,metamx/spark,WindCanDie/spark,Aegeaner/spark,minixalpha/spark,loneknightpy/spark,spark-test/spark,cin/spark,darionyaphet/spark,lvdongr/spark,eyalfa/spark,icexelloss/spark,akopich/spark,dhruve/spark,BryanCutler/spark,bOOm-X/spark,wangyum/spark,debugger87/spark,aray/spark,zzcclp/spark,goldmedal/spark,darionyaphet/spark,zuotingbing/spark,zero323/spark,dbtsai/spark,jlopezmalla/spark,nchammas/spark,SnappyDataInc/spark,mzl9039/spark,aokolnychyi/spark,SHASHANKB/spark,SHASHANKB/spark,kissmetrics/spark,apache-spark-on-k8s/spark,ioana-delaney/spark,wzhfy/spark,ioana-delaney/spark,tengpeng/spark,gengliangwang/spark,hhbyyh/spark,sahilTakiar/spark,markhamstra/spark,akopich/spark,ptkool/spark,sachintyagi22/spark,cin/spark,Aegeaner/spark,taroplus/spark,liutang123/spark,ahnqirage/spark,andrewor14/spark,nilsgrabbert/spark,maropu/spark,highfei2011/spark,kissmetrics/spark,Panos-Bletsos/spark-cost-model-optimizer,janewangfb/spark,jkbradley/spark,chuckchen/spark,ptkool/spark,jkbradley/spark,rikima/spark,adrian-ionescu/apache-spark,sureshthalamati/spark,ibm-research-ireland/sparkoscope,patrick-nicholson/spark,lvdongr/spark,jiangxb1987/spark,HyukjinKwon/spark,brad-kaiser/spark,gengliangwang/spark,kimoonkim/spark,rikima/spark,map222/spark,apache/spark,michalsenkyr/spark,nchammas/spark,shuangshuangwang/spark,narahari92/spark,goldmedal/spark,witgo/spark,mdespriee/spark,JoshRosen/spark,aray/spark,shuangshuangwang/spark,spark-test/spark,ConeyLiu/spark,dhruve/spark,akopich/spark,xuanyuanking/spark,bOOm-X/spark,shuangshuangwang/spark,xflin/spark,jrshust/spark,ueshin/apache-spark,joseph-torres/spark,adrian-ionescu/apache-spark,bOOm-X/spark,adrian-ionescu/apache-spark,joseph-torres/spark,goldmedal/spark,wzhfy/spark,darionyaphet/spark,tejasapatil/spark,lxsmnv/spark,akopich/spark,wzhfy/spark,guoxiaolongzte/spark,markhamstra/spark,yanboliang/spark,liyichao/spark,aosagie/spark,hhbyyh/spark,aosagie/spark,andrewor14/spark,panfengfeng/spark,saturday-shi/spark,szhem/spark,vinodkc/spark,map222/spark,apache-spark-on-k8s/spark,ibm-research-ireland/sparkoscope,srowen/spark,narahari92/spark,minixalpha/spark,kimoonkim/spark,debugger87/spark,minixalpha/spark,ajaysaini725/spark,yanboliang/spark,ioana-delaney/spark,WeichenXu123/spark,ahnqirage/spark,apache/spark,maropu/spark,apache-spark-on-k8s/spark,liyichao/spark,wangyum/spark,JerryLead/spark,shubhamchopra/spark,icexelloss/spark,highfei2011/spark,loneknightpy/spark,zuotingbing/spark,skonto/spark,icexelloss/spark,1haodian/spark,jrshust/spark,WeichenXu123/spark,mahak/spark,jkbradley/spark,HyukjinKwon/spark,LantaoJin/spark,HyukjinKwon/spark,markhamstra/spark,ajaysaini725/spark,Panos-Bletsos/spark-cost-model-optimizer,milliman/spark,holdenk/spark,caneGuy/spark,someorz/spark,rednaxelafx/apache-spark,rekhajoshm/spark,tejasapatil/spark,sachintyagi22/spark,techaddict/spark,ron8hu/spark,szhem/spark,mike0sv/spark,loneknightpy/spark,mike0sv/spark,sureshthalamati/spark,kevinyu98/spark,SHASHANKB/spark,ericvandenbergfb/spark,mzl9039/spark,spark-test/spark,WindCanDie/spark,tengpeng/spark,actuaryzhang/spark,taroplus/spark,zhouyejoe/spark,UndeadBaneGitHub/spark,pgandhi999/spark,eyalfa/spark,ahnqirage/spark,bOOm-X/spark,map222/spark,liutang123/spark,vinodkc/spark,xflin/spark,JerryLead/spark,nilsgrabbert/spark,apache-spark-on-k8s/spark,pgandhi999/spark,kissmetrics/spark,nlalevee/spark,janewangfb/spark,mahak/spark,ConeyLiu/spark,saturday-shi/spark,saltstar/spark,dongjoon-hyun/spark,WindCanDie/spark,ibm-research-ireland/sparkoscope,dhruve/spark,byakuinss/spark,map222/spark,markhamstra/spark,ahnqirage/spark,rezasafi/spark,pgandhi999/spark,techaddict/spark,kiszk/spark,bOOm-X/spark,SnappyDataInc/spark,liutang123/spark,shuangshuangwang/spark,janewangfb/spark,debugger87/spark,dongjoon-hyun/spark,szhem/spark,WindCanDie/spark,chuckchen/spark,mdespriee/spark,joseph-torres/spark,cin/spark,UndeadBaneGitHub/spark,1haodian/spark,eyalfa/spark,cloud-fan/spark,JerryLead/spark,kiszk/spark,xuanyuanking/spark,liutang123/spark,stanzhai/spark,brad-kaiser/spark,setjet/spark,facaiy/spark,esi-mineset/spark,mdespriee/spark,aokolnychyi/spark,rezasafi/spark,patrick-nicholson/spark,ron8hu/spark,joseph-torres/spark,jlopezmalla/spark,xflin/spark,setjet/spark,mike0sv/spark,jlopezmalla/spark,aokolnychyi/spark,vinodkc/spark,rekhajoshm/spark,actuaryzhang/spark,metamx/spark,witgo/spark,zuotingbing/spark,ajaysaini725/spark,wangmiao1981/spark,brad-kaiser/spark,bdrillard/spark,guoxiaolongzte/spark,facaiy/spark,rikima/spark,zuotingbing/spark,mahak/spark,poffuomo/spark,setjet/spark,dongjoon-hyun/spark,sureshthalamati/spark,someorz/spark,facaiy/spark,aray/spark,actuaryzhang/spark,bravo-zhang/spark,bdrillard/spark,Aegeaner/spark,UndeadBaneGitHub/spark,Panos-Bletsos/spark-cost-model-optimizer,aosagie/spark,JerryLead/spark,zzcclp/spark,michalsenkyr/spark,dongjoon-hyun/spark,zero323/spark,ibm-research-ireland/sparkoscope,hvanhovell/spark,apache/spark,chuckchen/spark,witgo/spark,byakuinss/spark,nilsgrabbert/spark,liyichao/spark,publicRoman/spark,1haodian/spark,markhamstra/spark,panfengfeng/spark,witgo/spark,shubhamchopra/spark,darionyaphet/spark,ddna1021/spark,ron8hu/spark,actuaryzhang/spark,saturday-shi/spark,alunarbeach/spark,tejasapatil/spark,dongjoon-hyun/spark,ahnqirage/spark,skonto/spark,1haodian/spark,SHASHANKB/spark,xuanyuanking/spark,SnappyDataInc/spark,zhouyejoe/spark,HyukjinKwon/spark,dbtsai/spark,rednaxelafx/apache-spark,jrshust/spark,JoshRosen/spark,hhbyyh/spark,actuaryzhang/spark,SnappyDataInc/spark,bravo-zhang/spark,ConeyLiu/spark,WindCanDie/spark,highfei2011/spark,minixalpha/spark,alunarbeach/spark,wangyum/spark,bravo-zhang/spark,eyalfa/spark,michalsenkyr/spark,ajaysaini725/spark,cloud-fan/spark,nilsgrabbert/spark,debugger87/spark,wangmiao1981/spark,akopich/spark,rikima/spark,jianran/spark,rikima/spark,adrian-ionescu/apache-spark,skonto/spark,minixalpha/spark,xflin/spark,yanboliang/spark,zhouyejoe/spark,xuanyuanking/spark,loneknightpy/spark,saltstar/spark,cloud-fan/spark,WeichenXu123/spark,pgandhi999/spark,aokolnychyi/spark,aosagie/spark,shaneknapp/spark,lvdongr/spark,matthewfranglen/spark,maropu/spark,mdespriee/spark,aokolnychyi/spark,ericvandenbergfb/spark,liutang123/spark,publicRoman/spark,kiszk/spark,LantaoJin/spark,zero323/spark,tejasapatil/spark,aray/spark,goldmedal/spark,gengliangwang/spark,bOOm-X/spark,sachintyagi22/spark,saltstar/spark,nchammas/spark,ron8hu/spark,minixalpha/spark,WeichenXu123/spark,publicRoman/spark,andrewor14/spark,vinodkc/spark,gengliangwang/spark,1haodian/spark,cloud-fan/spark,gengliangwang/spark,bravo-zhang/spark,bravo-zhang/spark,facaiy/spark,aosagie/spark,kissmetrics/spark,UndeadBaneGitHub/spark,aray/spark,LantaoJin/spark,sachintyagi22/spark,dbtsai/spark,spark-test/spark,panfengfeng/spark,alunarbeach/spark,apache/spark,jkbradley/spark,techaddict/spark,someorz/spark,jianran/spark,liutang123/spark,nchammas/spark,shuangshuangwang/spark,debugger87/spark,rezasafi/spark,ddna1021/spark,nlalevee/spark,techaddict/spark,apache/spark,ahnqirage/spark,LantaoJin/spark,esi-mineset/spark,rednaxelafx/apache-spark,hvanhovell/spark,shaneknapp/spark,byakuinss/spark,mike0sv/spark,saturday-shi/spark,SnappyDataInc/spark,stanzhai/spark,liyichao/spark,esi-mineset/spark,JoshRosen/spark,taroplus/spark,HyukjinKwon/spark,1haodian/spark,xuanyuanking/spark,zuotingbing/spark,zzcclp/spark,loneknightpy/spark,LantaoJin/spark,maropu/spark,byakuinss/spark,jlopezmalla/spark,stanzhai/spark,spark-test/spark,WeichenXu123/spark,big-pegasus/spark,apache-spark-on-k8s/spark,jlopezmalla/spark,wzhfy/spark,hvanhovell/spark,hhbyyh/spark,zzcclp/spark,UndeadBaneGitHub/spark,andrewor14/spark,SnappyDataInc/spark,sureshthalamati/spark,mzl9039/spark,yanboliang/spark,huang1900/spark,xflin/spark,rekhajoshm/spark,dhruve/spark,guoxiaolongzte/spark,hhbyyh/spark,alunarbeach/spark,aokolnychyi/spark,milliman/spark,lvdongr/spark,taroplus/spark,saltstar/spark,MLnick/spark,sahilTakiar/spark,kiszk/spark,lxsmnv/spark,jianran/spark,cin/spark,guoxiaolongzte/spark,sahilTakiar/spark,rezasafi/spark,1haodian/spark,wangmiao1981/spark,ConeyLiu/spark,poffuomo/spark,ioana-delaney/spark,LantaoJin/spark,andrewor14/spark,kevinyu98/spark,dongjoon-hyun/spark,saturday-shi/spark,bdrillard/spark,metamx/spark,aray/spark,Aegeaner/spark,taroplus/spark,skonto/spark,ericvandenbergfb/spark,loneknightpy/spark,wzhfy/spark,aray/spark,SHASHANKB/spark,dhruve/spark,icexelloss/spark,nchammas/spark,dbtsai/spark,yanboliang/spark,ueshin/apache-spark,huang1900/spark,byakuinss/spark,ibm-research-ireland/sparkoscope,metamx/spark,ibm-research-ireland/sparkoscope,skonto/spark,MLnick/spark,poffuomo/spark,ddna1021/spark,kimoonkim/spark,publicRoman/spark,patrick-nicholson/spark,lxsmnv/spark,patrick-nicholson/spark,zero323/spark,dbtsai/spark,bOOm-X/spark,taroplus/spark,mike0sv/spark,panfengfeng/spark,liyichao/spark,joseph-torres/spark,wangyum/spark,big-pegasus/spark,tengpeng/spark,shubhamchopra/spark,milliman/spark,nlalevee/spark,joseph-torres/spark,joseph-torres/spark,darionyaphet/spark,sahilTakiar/spark,srowen/spark,ddna1021/spark,milliman/spark,shuangshuangwang/spark,someorz/spark,patrick-nicholson/spark,ron8hu/spark,ioana-delaney/spark,milliman/spark,janewangfb/spark,rezasafi/spark,highfei2011/spark,jianran/spark,pgandhi999/spark,dbtsai/spark,michalsenkyr/spark,xflin/spark,facaiy/spark,janewangfb/spark,publicRoman/spark,debugger87/spark,xuanyuanking/spark,bravo-zhang/spark,shaneknapp/spark,saturday-shi/spark,shubhamchopra/spark,michalsenkyr/spark,lvdongr/spark,pgandhi999/spark,stanzhai/spark,nchammas/spark,jlopezmalla/spark,caneGuy/spark,skonto/spark,MLnick/spark,saltstar/spark,markhamstra/spark,highfei2011/spark,big-pegasus/spark,narahari92/spark,metamx/spark,JoshRosen/spark,wangmiao1981/spark,jiangxb1987/spark,ueshin/apache-spark,caneGuy/spark,poffuomo/spark,cin/spark,metamx/spark,zero323/spark,ptkool/spark,liyichao/spark,mahak/spark,mike0sv/spark,JoshRosen/spark,sachintyagi22/spark,hhbyyh/spark,jrshust/spark,nlalevee/spark,huang1900/spark,rekhajoshm/spark,lvdongr/spark,UndeadBaneGitHub/spark,goldmedal/spark,szhem/spark,tengpeng/spark,mahak/spark,JoshRosen/spark,big-pegasus/spark,icexelloss/spark,stanzhai/spark,shaneknapp/spark,WindCanDie/spark,wangmiao1981/spark,big-pegasus/spark,bdrillard/spark,JerryLead/spark,setjet/spark,tejasapatil/spark,gengliangwang/spark,esi-mineset/spark,cloud-fan/spark,ConeyLiu/spark,SnappyDataInc/spark,jkbradley/spark,wangyum/spark,apache-spark-on-k8s/spark,Aegeaner/spark,sachintyagi22/spark,bdrillard/spark,wangyum/spark,holdenk/spark,huang1900/spark,metamx/spark,rednaxelafx/apache-spark,sahilTakiar/spark,kissmetrics/spark,wzhfy/spark,huang1900/spark,aosagie/spark,milliman/spark,techaddict/spark,esi-mineset/spark,eyalfa/spark,Aegeaner/spark,highfei2011/spark,zzcclp/spark,nilsgrabbert/spark,nlalevee/spark,byakuinss/spark,WeichenXu123/spark,wangmiao1981/spark,patrick-nicholson/spark,cloud-fan/spark,tengpeng/spark,rezasafi/spark,BryanCutler/spark,ahnqirage/spark,maropu/spark,mahak/spark,actuaryzhang/spark,lxsmnv/spark,shubhamchopra/spark,esi-mineset/spark,alunarbeach/spark,zhouyejoe/spark,adrian-ionescu/apache-spark,jiangxb1987/spark,vinodkc/spark,shubhamchopra/spark,nlalevee/spark,xuanyuanking/spark,techaddict/spark,srowen/spark,LantaoJin/spark,bravo-zhang/spark,holdenk/spark,facaiy/spark,apache/spark,facaiy/spark,publicRoman/spark,aokolnychyi/spark,mahak/spark,someorz/spark,huang1900/spark,narahari92/spark,highfei2011/spark,taroplus/spark,mzl9039/spark,guoxiaolongzte/spark,cloud-fan/spark,brad-kaiser/spark,ddna1021/spark,zhouyejoe/spark,ericvandenbergfb/spark,spark-test/spark,tejasapatil/spark,yanboliang/spark,jiangxb1987/spark,eyalfa/spark,sureshthalamati/spark,pgandhi999/spark,nlalevee/spark,poffuomo/spark,jiangxb1987/spark,rednaxelafx/apache-spark,hvanhovell/spark,zuotingbing/spark,kimoonkim/spark,darionyaphet/spark,szhem/spark,HyukjinKwon/spark,zero323/spark,hvanhovell/spark,skonto/spark,BryanCutler/spark,caneGuy/spark,shaneknapp/spark,zuotingbing/spark,holdenk/spark,jkbradley/spark,maropu/spark,nilsgrabbert/spark,tejasapatil/spark,poffuomo/spark,caneGuy/spark,ConeyLiu/spark,jiangxb1987/spark,huang1900/spark,tengpeng/spark,jlopezmalla/spark,witgo/spark,ptkool/spark,panfengfeng/spark,andrewor14/spark,goldmedal/spark,ajaysaini725/spark,chuckchen/spark,ptkool/spark,kiszk/spark,apache/spark,zzcclp/spark,kiszk/spark,Aegeaner/spark,witgo/spark,holdenk/spark,narahari92/spark,caneGuy/spark,someorz/spark,setjet/spark,minixalpha/spark,srowen/spark,narahari92/spark,dbtsai/spark,shaneknapp/spark,actuaryzhang/spark,big-pegasus/spark,srowen/spark,caneGuy/spark,UndeadBaneGitHub/spark,rekhajoshm/spark,dongjoon-hyun/spark,spark-test/spark,rezasafi/spark,michalsenkyr/spark,hvanhovell/spark,lvdongr/spark,shubhamchopra/spark,adrian-ionescu/apache-spark,ericvandenbergfb/spark,debugger87/spark,lxsmnv/spark,dhruve/spark,mdespriee/spark,brad-kaiser/spark,loneknightpy/spark,wangmiao1981/spark,szhem/spark,SHASHANKB/spark,wangyum/spark,techaddict/spark,kissmetrics/spark,apache-spark-on-k8s/spark,sachintyagi22/spark,mzl9039/spark,ioana-delaney/spark,saltstar/spark,publicRoman/spark,witgo/spark,akopich/spark,alunarbeach/spark,BryanCutler/spark,map222/spark,zero323/spark,chuckchen/spark,big-pegasus/spark,vinodkc/spark,ajaysaini725/spark,Panos-Bletsos/spark-cost-model-optimizer,WeichenXu123/spark,kimoonkim/spark,jrshust/spark,BryanCutler/spark,aosagie/spark,zhouyejoe/spark,jianran/spark,gengliangwang/spark,panfengfeng/spark,milliman/spark,mzl9039/spark,holdenk/spark,jianran/spark,ueshin/apache-spark,jiangxb1987/spark,sahilTakiar/spark,Panos-Bletsos/spark-cost-model-optimizer,WindCanDie/spark,ptkool/spark,liutang123/spark,MLnick/spark,markhamstra/spark,nchammas/spark,rekhajoshm/spark,stanzhai/spark,sureshthalamati/spark,mdespriee/spark,kevinyu98/spark,eyalfa/spark,srowen/spark,liyichao/spark,mike0sv/spark,panfengfeng/spark,JoshRosen/spark,icexelloss/spark,guoxiaolongzte/spark,alunarbeach/spark,poffuomo/spark,michalsenkyr/spark,SHASHANKB/spark,sureshthalamati/spark,ericvandenbergfb/spark,MLnick/spark,BryanCutler/spark,dhruve/spark,rikima/spark,lxsmnv/spark,srowen/spark,rednaxelafx/apache-spark,stanzhai/spark,wzhfy/spark,JerryLead/spark