[SPARK-16312][FOLLOW-UP][STREAMING][KAFKA][DOC] Add java code snippet for Kafka 0.10 integration doc
[SPARK-16312][FOLLOW-UP][STREAMING][KAFKA][DOC] Add java code snippet for Kafka 0.10 integration doc

## What changes were proposed in this pull request?

added java code snippet for Kafka 0.10 integration doc

## How was this patch tested?

SKIP_API=1 jekyll build

## Screenshot

![kafka-doc](https://cloud.githubusercontent.com/assets/15843379/19826272/bf0d8a4c-9db8-11e6-9e40-1396723df4bc.png)

Author: Liwei Lin <lwlin7@gmail.com>

Closes #15679 from lw-lin/kafka-010-examples.

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