[SPARK-4832][Deploy]some other processes might take the daemon pid
[SPARK-4832][Deploy]some other processes might take the daemon pid

Some other processes might use the pid saved in pid file. In that case we should ignore it and launch daemons.

JIRA is down for maintenance. I will file one once it return.

Author: WangTaoTheTonic <barneystinson@aliyun.com>
Author: WangTaoTheTonic <wangtao111@huawei.com>

Closes #3683 from WangTaoTheTonic/otherproc and squashes the following commits:

daa86a1 [WangTaoTheTonic] some bash style fix
8befee7 [WangTaoTheTonic] handle the mistake scenario
cf4ecc6 [WangTaoTheTonic] remove redundant condition
f36cfb4 [WangTaoTheTonic] some other processes might take the pid

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