[SPARK-1735] Add the missing special profiles to make-distribution.sh
[SPARK-1735] Add the missing special profiles to make-distribution.sh

73b0cbcc241cca3d318ff74340e80b02f884acbd introduced a few special profiles that are not covered in the `make-distribution.sh`. This affects hadoop versions 2.2.x, 2.3.x, and 2.4.x. Without these special profiles, a java version error for protobufs is thrown at run time.

I took the opportunity to rewrite the way we construct the maven command. Previously, the only hadoop version that triggered the `yarn-alpha` profile was 0.23.x, which was inconsistent with the [docs](https://github.com/apache/spark/blob/master/docs/building-with-maven.md). This is now generalized to hadoop versions from 0.23.x to 2.1.x.

Author: Andrew Or <andrewor14@gmail.com>

Closes #660 from andrewor14/hadoop-distribution and squashes the following commits:

6740126 [Andrew Or] Generalize the yarn profile to hadoop versions 2.2+
88f192d [Andrew Or] Add the required special profiles to make-distribution.sh

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