[SPARK-3710] Fix Yarn integration tests on Hadoop 2.2.
[SPARK-3710] Fix Yarn integration tests on Hadoop 2.2.

It seems some dependencies are not declared when pulling the 2.2
test dependencies, so we need to add them manually for the Yarn
cluster to come up.

These don't seem to be necessary for 2.3 and beyond, so restrict
them to the hadoop-2.2 profile.

Author: Marcelo Vanzin <vanzin@cloudera.com>

Closes #2682 from vanzin/SPARK-3710 and squashes the following commits:

701d4fb [Marcelo Vanzin] Add comment.
0540bdf [Marcelo Vanzin] [SPARK-3710] Fix Yarn integration tests on Hadoop 2.2.

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