Hadoop云計算實驗報告_第1頁
Hadoop云計算實驗報告_第2頁
Hadoop云計算實驗報告_第3頁
Hadoop云計算實驗報告_第4頁
Hadoop云計算實驗報告_第5頁
已閱讀5頁,還剩10頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

Hadoop云計算實驗報告Hadoop云計算實驗報告實驗目的在虛擬機Ubuntu上安裝Hadoop單機模式和集群;編寫一個用Hadoop處理數(shù)據(jù)的程序,在單機和集群上運行程序。實驗環(huán)境虛擬機:VMware9操作系統(tǒng):ubuntu-12.04-server-x64(服務器版),ubuntu-14.10-desktop-amd64(桌面版)Hadoop版本:hadoop1.2.1Jdk版本:jdk-7u80-linux-x64Eclipse版本:eclipse-jee-luna-SR2-linux-gtk-x86_64Hadoop集群:一臺namenode主機master,—臺datanode主機salve,master主機IP為23,slave主機IP為07。實驗設計說明主要設計思路在ubuntu操作系統(tǒng)下,安裝必要軟件和環(huán)境搭建,使用eclipse編寫程序代碼。實現(xiàn)大數(shù)據(jù)的統(tǒng)計。本次實驗是統(tǒng)計軟件代理系統(tǒng)操作人員處理的信息量,即每個操作人員出現(xiàn)的次數(shù)。程序設計完成后,在集成環(huán)境下運行該程序并查看結(jié)果。算法設計該算法首先將輸入文件都包含進來,然后交由map程序處理,map程序?qū)⑤斎胱x入后切出其中的用戶名,并標記它的數(shù)目為1,形成〈word,l〉的形式,然后交由reduce處理,reduce將相同key值(也就是word)的value值收集起來,形成〈word,listof1〉的形式,之后再將這些1值加起來,即為用戶名出現(xiàn)的個數(shù),最后將這個〈key,value〉對以TextOutputFormat的形式輸出到HDFS中。3.3程序說明UserNameCountMap類繼承了org.apache.hadoop.mapreduce.Mapper,4個泛型類型分別是map函數(shù)輸入key的類型,輸入value的類型,輸出key的類型,輸出value的類型。UserNameCountReduce類繼承了org.apache.hadoop.mapreduce.Reducer,4個泛型類型含義與map類相同。main函數(shù)通過addlnputPath將數(shù)據(jù)文件引入該類,在通過setOutputPath將生成結(jié)果轉(zhuǎn)為一個文件,實現(xiàn)生成結(jié)果,即統(tǒng)計結(jié)果的查看。FileInputFormat.addInputPath(job,newPath(args[0]));FileOutputFormat.setOutputPath(job,newPath(args[1]));程序具體代碼如附件中源程序。實驗過程4.1安裝實驗環(huán)境4.1.1安裝ubuntu操作系統(tǒng)打開VMware,在Hometab中單擊“CreateaNewVirtualMachine",選擇custom,選擇虛擬硬件版本W(wǎng)orkstation9.0,選擇ios文件,next,錄入目標操作系統(tǒng)信息,包括Fullname、Uername和Password,next,選擇默認的選項,一般不做更改,最后確認信息,Finish,安裝成功后,會看到如下畫面,口LiJ■Lfarary1-kirHdr:rp””安裝成功后,會看到如下畫面,口LiJ■Lfarary1-kirHdr:rp””r-h.'FJ.ci-■.1-:.r:.e:r-OUbuntui連?閃LTSubuntuTTylubuntulogin:_|j.mbuHkuIM-bikiBruar日?曬Compiiie*曰QdODud&shjaJ$shjaiL^i-Ubu-riuZ~bit■■rv?rSJnurrdVMn4.1.2安裝配置Samba安裝samba主要為了實現(xiàn)與windows操作系統(tǒng)的通訊,由于server版本的ubuntu沒有自帶圖形操作界面,所以下載資料等操作不太方便,這也是安裝samba的目的之一。1)安裝samba,輸入如下命令:zhaaOubuntu: sudoapt-getirista11samba_安裝vimzhaoOubuntu:sudoapt-getinsta11vim_創(chuàng)建共享目錄,并修改權限zhao^ubuntu:^$sudochmod777share配置samba。修改samba的配置文件/etc/samba/smb.conf,將security=share,并在文件的末尾追加如下內(nèi)容,zhao^ubuntu:sudovi/et匚/'safnti日/'Efnh.匚onf[share]path二/home/zhao/sharepublic二yeswritable=yes5) 測試。在windows實機中,通過ip訪問ubuntu虛擬機,可以見到share文件夾F23k文件〔門卿舊1M工具E顯▼ 網(wǎng)罰共享甲心 亙看遠程印機-■;卑>云dpp名share4.1.3安裝配置JDK首先,下載java開發(fā)工具包JDK。在本次試驗中,我們下載的版本是jdk-7u80-linux-x64.gz。解壓安裝至"usr/lib/jvm/目錄下,更名為java-7-sun。配置環(huán)境變量/etc/environment.LAIH-'_3Cai/Etin:/_Dcal.-oin:/uerliin:.?■u二rf::g=neE:zugr1it/j'cmz.i丁■.o-r-wbin:/oot/haJc03/bin'rIA3SPATH=.:/usr/Lib/JvmZjava-7-5un/libusr/■丄:l[.F、i?ni/ja?c-/-sin使配置生效zh3oOubuntu:/u£r/lib/jvni$source/etc/environment測試安裝配置結(jié)果zhao@ubuntu:Java—v已rsionjavaversior"1.7.0_80"Java(TH)SERuntimeEnvirunmenl:(build1.7.0_SQ-bl5)Jai^aHotspotCTM)64-BitSeryerVM(build24.80-bll,mixedmode)4.1.4在單節(jié)點(偽分布式)環(huán)境下運行HADOOP1) 添加Hadoop用戶并賦予sudo權限2) 安裝配置SSHzhao^ubuntu:/home$sudo日卩t-getinstallopenssh-server切換至hadoop用戶,zhao^ubuntu:/homessu-hadoopP□scuuord:hadoop^ubuntu: _配置密鑰,使得hadoop用戶能夠無須輸入密碼,通過SSH訪問localhost,測試結(jié)果:

hadoop@ubuntusshlocalhostWelcometoUbuntu12.0-1LTS(GNU/Linu^3.2.0-23-generichB6_6d}*DuuUliie11LaIiuli: liILpi://lielp.ubuiilu.culn/Ncuurelease'1-1.Od.2LTS'available.Rim'rin-rplpa^p-upgrarip'tniipgrariptnit.LQ31 ].□官in:3unMay1000:2斗:GID2015frommasterhad□□pliblintli _3)安裝配置Hadoop首先下載Hadoop,解壓縮到/opt/hadoop目錄下,本次試驗中我們下載的版本是hadoop-1.2.1-bin.tar.gz,更改目錄名稱為hadoop。修改與hadoop相關的配置文件(在/opt/hadoop/conf目錄下),分別是core-site.xml,hadoop-env.sh,hdsf-site.xml,mapred-site.xm。在此不一一列舉。4)運行Hadoop首先格式化HDFS,had口口p^ubintu:/opt/hadoop/bin?-/hadoopnamencce--ormat15/05/170E:Q3:3EINFOnamenode.NameNodE:STfiRTUP_MSG:iJ?!/'A1山 ?jj,?je'lltit "Ji-it 山 山 "Jiit "Ji?比 "t"'i13TP'TJr_MG::上artiy恢irNzde:;lr:-lil'_H:G: hr-t=n|-i-1iz■:;■r.0.-..■:ETi'=TIPHF:; ;jij ='J■i;it]STr;TJP.MS5: Vflijli=l.Z.1STARTUP_MSG:r■訂r一“ ?.;」--STARTUPMSG:IniI7-|--t■://■;.-STARTUP_MSG:r■訂r一“ ?.;」--STARTUPMSG:-hu;-I-■!rrir:inriJm~~f'“l(fā)-r-Jul:---h: :tpui-,rh\gj--I.-?.:8u***** **+4cJt龍***+4c* *:4c**龍?fc*****龍?fc**+*龍北*:+<**水水**:+<4:4c****/Re-formatfiiesy-:temin/'口口l.-hado口口丿已已口口口/^卡兮,門;已7[Y口「N)yFuiHjLuIjl-Ij」_iJ.j'./IL.j.jy/'.H;luduiL■■」f「jjii_15.-:?-'L-7C2::'3:3E1\=QIciiziude.\,itNui-z:5HUTD>'i_MSG:jf出H.4**r*嚴.x";出ffi罷f嚴"代出來*-4.*r**f”託出竊-4. H.4. z--嚴竊宙;4.?■'. x":竊竊4.H.*f"L、.■It竊竊水4. SthhirinnP-::Hhi.rtingcrh-Nnirr\■Inrr.nin-i./I■'.u.I.Ih自已口口pidubLritu:』口|:t/hail匚|匸戸/匕」門孚-啟動單節(jié)點集群,p-tasktra匚匕已「一utiimtiKciutlocalhost::nfiv:cannotstat'■..opt/hadoop/1ibexec/../Iogs/hadoop-hadoop-tasktracksr-ubuntL.outu41:Nosl匚hflieDrdirectDryLocalhast:startingtasKtrackEr,LogginEto/opt/hadoap/libexec/??/logs/hadoop-hadii)p-tasKtracKer-ul:iuritij,outrraster:slartirgtasklracker)loggingto/opt/hadjop/libeKBC/.a/Logs/had口o[]-h:3cl口cp-tasktracker-ubuntu.nutmaster:uilmlt-aioruserhadoopmaster:corefile!sizeiblocks,-riimaster:dataseesize(khytes-d)unLimi-tedmaster:schedulingpriority〔-已)0master:f11已size(blocks,-i)unlimitedrraster:pendingsignals.-i)3739master:mawlackedmemory1kbytes,-1)64master:怕=memorysize(kbytes,-iri)unlimitedrraster:opeifLies:-i)tozqmaster:pipesize(512bytes,-P)i=通過jps查看master|i3cl[]ci[]HLjkiLintu:Fci|Dt/hadoop/bin$jpsE082TaskTracker1023secondaryMam已Nod已*2刊jpsiq&qNameNodeslavehadoopsubuntu:/opt/hadoop/binsJpsE353TasK'lracl:er24^2Jps2263DataNode停止單節(jié)點集群,ha:m:dutuntu:/opt-I:i\p/:n$,/stopill.siSt「Iiri:,iI:'I:!:k-■■:;I:wi::Iii|:i=t:;l;I?';. .1?4.1.5在多節(jié)點(分布式)環(huán)境下運行HADOOP1)設置/etc/hosts文件實驗中兩臺機器處于同一局域網(wǎng)中,其中一臺作為master,ip地址為23,臺作為slave,ip地址為07,修改兩臺機器的/etc/hosts文件,1Zlocalhostubuntu23master07slave2) 設置節(jié)點之間無密碼SSH登陸驗證配置SSH是否正確3) 修改集群配置文件修改master的masters、slaves,修改所有節(jié)點的core-site.xml,hdsf-site.xml,mapred-site.xml,在此不一一列出。4) 在master上格式化HDFShadoop^ubuntu:/opt/hadoo卩./hadoo卩namenode-for-mat_5) 啟動和停止集群啟動集群,在master上啟動HDFS后,jps結(jié)果如下mastericduQ」LII11LL:,'」k■■'IcilJ」lu.-'jin5j|jl.TH^;k_rdihH"m.屮:!:e:勺ccle百TONameNodeslave|hazLiOD@ul:iunlL:/□pt/hadodp/1bin?26^12jps£51?DataNude在master上啟動mapreduce后,jps結(jié)果如下:masterhadoop@uhu門ti■:/'cipt/'h日dmcip/'tii門*jpsPAR?Ta^kTrarkPr3457Job_racker3142SecondarqNameNode2770NameNode3806Jpsslave

hadoop@ubuntu:/opt/hado匚□/■:!].□$jps2579DaldNuLG2S96Jps2736TaskTrcCksr停止集群kadooo^ulnintl:/opt^nado口匚.■■tirrT:.s:op-mEpred.snstoppingJot1racke■-hadoop@ubuntu:/opt/hadoop/bin$./stop-dfs.shstoppingnamenode4.2運行程序4.2.1在單機上運行程序1)在Eclipse下,新建map/reduce工程(2) 新建一個java類UserNameCount,編寫代碼ThMlIncur11:MH亡Mt-TtKt=4MTewt11J附1制s-twtR<1ms-LSM^j^rfGUfiifiediXS訴ten臨ftMLCt^revt-lntWrlt-Bbi.e.T??t.]n^rrltrtle>f^^ctii.iifii?:ik^PqEhnraubL^i管*BhnraT-abLel11;l£> 0: ■11pfirfc^?bn^HP!用"part L9,ICC叭:中tiE龍)s;丹喂我Wfcnw務 口口啦顯 *U彎CogH,事**F{b?pyf"沖<<>:■]上LiCuAlBHU:MAMr-4Un-ird\fi4tkHP|Dj&K4|口■Qt?trSikMwp?JRESyHbimLibr^rii[iiw-7-MirfSilasp(f-<urt3mp-5SniZJwCi 尢d自徑>/Ap^ilMdo^i^9|?Hpvr-Dmpilir-5E5.12.|arN話g豈肖—內(nèi)pi/haQAkfb-Q£.Zjta-■弓loqfit佔iar?內(nèi)pt/hadDD珅lit*百凹刪iJiimjijtj.”陽訊Ca辰0/h35*^rti^1+3JS?JOPTi,hK>?ft,l*■甘tbwnou^odec-1.4Jw-Fa/hxfc>]QfflkE'Y-A.I.Z&.pr■/■opt.i^iiidDap.^ibfl?AlawnahibRruJIfi叫』grfwf*?Spckivon-aii^pw-iiiill-l.n.0jm-tiiipyMcoraniorB.-diiH4e*-1$|im■?相賈廬$A jQ-.ijAr.i'c^ijTi血3ro,onion|rcorti^h|r4lvan-l4j|^r-/of:B§co**nnr&-cF1.i}ai--/flptlitH[fc>:f>in§|?LkK-n.iLIL|iMJupQluikpp/hB*呂1沖祜伽』旳何■!??£^WnAFH-bWijl1l5Wd"1.&0ifa4,/孫0AH1?人對41*?/optj?itdc<ipjijh*■邑iPwnons^M.QJ*mferse^tareijs^r.rcf:[l4ud£ioMi-3nHckfe口*1卜1*.£護「?”10:1/1*1?1111口|1.「MhKfo^rj|isdi?i^Jler-i2.*腳-/dpNtbcA-n.1.42^ryi:^[A^ddu^1fc£hB^C^^WW^rhe^qi^r-l-aj.Jir』TdTFpvblijccIki3Liw-rflaMCujnl{34:L- 包blJr?E*Ek: 虹Finih£ l^ai,T-kt,IriCMriTaAla■-gprlvAU

|rL¥4C?IVtlLCmaflK9DILQH由tltatzr日F1^1^5l.W.CoM:?WtCMtWt)[OEiccptinr-?jHtcrf^ptKlFKfriitLw[■StringUnpriAl.u?.tQStFLnq(k5^r]Hj|T9kflnLerrl:^fcfn-i/!1?審"*?皿列1~|1.1_普);wtaiLa|tE^m.tuaHcMTelHnaif|>gr?:~d.■rt“ak?n.wwi*ITEitit|\;UULL-xl: .M£s|;■**1“naiurp(Tflrt問.[tinA!<<[nrlWitable*valve?r^ntcurrnatfrt)ttirom.?旄珂口啊4%[ntrrnjilfriEw^ptjqn百Larf轉(zhuǎn)?■*;FetlinniratMiLv沐-vbLimi|{dMi—m,'I.4*C|);童LmsaI*-S哇燈mnitHA砧eKoeRm辰^ppIiU110n]j*U9r/fbET-3-5JVM1他$%EQI5.+Z1;&5AA<Ii幻帕」L?*a:T3:bftIkFA JoKllerit:3WMJL&>M:?:5E:lhF6 JoKlient:1幻初jL%■打StINF* JoKlicnt!】幻轉(zhuǎn)“%?打瑋1于中"SdrijQKUcntiIWWi.'Ll淞打3!EIKfDi¥K-t?1JoWlltrtl】1/科」“■HIMP laWlifni::<HJE^H-5p*MMirruMsevirvIbyttiJsr^pslwc^SKIT伽酌TES=i材HspOlWJtrK-S**=WSM3CWfrLN:InpjrrMDrtf5=SH?lKfinpvttnKK?M5>M『3) 運行程序,結(jié)果如下:円謝HXEJlp宙肝5;3 ■I'cctjliiidnn檔li^duafhCtkjA^i.z円謝HXEJlp宙肝5;3 ■I'cctjliiidnn檔li^duafhCtkjA^i.zipf-/ap^ltJifkfc-自Nd心峠a*&i±T」mm聞帕d?舛£kidoocrdft-i.LliiaiMpUludoeo*ghad&DifHnl?^5ter-i.2.1^ar/apUlu^red.J£>■:<.Uent.JOBCLltB[:昭聘(蠻SosrliflPt?KK<ed.JiicCUewt.iu^r-?d.JosLLi?nT:存Ed啟IiiPt:W&UaEJj2H&lvaEBlI'W■:J:rv:l 2wz右理■IWfc4.>s+主 i憚闌E勢■號1揺訊phiits、Riyv詩UGH113 34£J.L4H.- 1UWJilIUR4遐馬B13gS53^414 1閔旳je?H■妊211*対匕:fl-XK 1出制。.■評 yLIE?1U5^M4AH!! 1崗站注旳 1MV/TWuMUtutiimEBPraUtmEF【鈿祜SCMCdtSa;K■ ■£1 Eis,aai^4:ajs&am^CflJttKMKfll<!isl-6Uhn-[|^'IiHHfii'y/葉TH.|idldpih6E-a冏_rrmsytes-lwipvtre(anls=U5?2聽rluELW|npcnrdJi'L+^'ff?"XM'irH'^iE?d>W^ridr丸pphUli血町/u曾外IhFO1VH3,ILJ?:I9-^1CHre]WK,'Ll53IHFD巧rftsmea:n58emfdL&?kf加鑼EitfDn^m.rLi■:沖%bmfqFconinam--tHMnutll5-c?E-iM^ar■/Sasr^-SZjv? 卄bSownra^ns-el-injar.'opyhadw^^Sirr,ry^Qrel?Bja!■胡呻卜祠的卩^止@tn(>^lL0-JiU-l.K.l.pi'■^E^CjtbAdL^pj*@tudoop-fyap>目jsch-ilL-4±.j4r苗供m,1cap.AibEtMd&GfxajMcfcjrtcbedJe'-l.ti.JifFojmnons-mnth-21JarJnpc/hKJw向pt/h|SUMlMUMb4Q!^i£|-4ri-1.ll4|W■Ju"包u^niw^-cDlhtu^r-jj.i.^r?『郵i,@ium』理r也p"h4doDjvl.左hs4Mb-1.B.C.14jaryapUhadaaMIS|e*-5eyj5iifr1.fcjir苣|d?dEJw?関典|*兇阿代bSOJmfKm-HttpClEBtJO-(|B?-,'PPuAhgrinnp-th'tftH^IZH|4r-,i'npl.>FMH-:自 嶼iWKJiJMC-a.£JLjar?b叢泊蟲邙冷b胃am愀ms*l砂上叫》*問1(恤凸畔gCWfr41.1.J*i

Inf.aMEdj-^94TOC\o"1-5"\h\zL4EU?啊?工丘林 4aME肚1|刖h理<;itnj =B口u耳口rrit曲舊乳葡麗若口 LL464|3LI9ti>ll515/05/1623:27:3^INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/^5/16Z3;27;3^INFO15/05/1623;Z7;39INFO15/05/16Z3;Z7;39INFO15/95/16Z3;27;39INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/03/1623:2715/05/1623:27:3^INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/^5/16Z3;27;3^INFO15/05/1623;Z7;39INFO15/05/16Z3;Z7;39INFO15/95/16Z3;27;39INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/03/1623:27:39INFO15/05/1023:27:39INFO15/05/1623:27:29INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/05/1623:27:39INFO15/05/1623:27:39INFOnapredaOalbCLlent:napreduJobClient:flapred.J&bclient:sapred.,Jabclient;inapred.Jobclient:naprecJ,JcibCllent;napred,JabClient;papred,Jobelient;napred,Jobelient;napred.JobUlieat:napred-JobUlient:napred.Job匸IiEmt:naprEd.lQbl:l :napred.JabClient:naprEd.JobCliEnt:naprEd.JgbCliBnt:napredaJobClient:napreduJobClient:napredlaJabCllent:4.2.2Countersz29FileOutputFormatCountersBytesWritten=765533FileInputFornatCounters.Byte&Read-464.56>14FileSystenCountersFILE_BirTE5_READ=14&61417FILE^BVTE5_WRITTEN=lL55e&07Map-ReduceFratneworkReduceinputgroups=LBa62Mapoutputmaterializedbyte5-53710D5[:□mbineDutput「已匚Drd5=@Mapinputrecord5=1134^0ReduceshuffLebytE5=&PhysicalnEmory(bytes)snapshot=0Reduceoutput廠已匚ards=188fi2SpilledRecords=2^1164Hapoutputbytes^S&75835TaialcomniTtedlheapu&agelbyies]=39ie979272(4)在eclipse中編譯好源代碼后,導出程序的jar包,供在集群上使用。在集群上運行程序(1) 啟動集群,通過jps命令查看master,slave上啟動的服務列表,結(jié)果如下:|hadoop@ubuTitu:/opt/hadoop/bin$jps2049JobTz?ackei?(235€Jp31561NameNode2221lasklracker1929Seccmdar^NaiBLeNodeihadaop@ULbunt-ll:/apt/hadaap/bin$sshslaveW皂丄uaine:toUbuntu12?0姓LTSIGNU/Liniix3?2?D-23-genericx86_64}*DocumentaLion:https://help.ubuntu.con/Newrelease11-1?0哎?2JlTS1available?Run1dQ-xel皂日査皂-iipgHd□亡】loupgradeto工匚?lastlogin:SatMay1623:36:352015frommasterhadoopGizbuntu:~$jps1526Jasklracker1444DataNode|1卿1Ja

(2) 在集群環(huán)境下運行該程序jar包(UserNameCount.jar),結(jié)果如下:haLdaopg-ubunLu:/opL/hadocp/biii??/radocipjar/opL/n且clcicipfu^EHNainieCciun匸hadoop?U^exNaraeCDUzit outputlS/OS/lfi23:42:W1R.Nmapred.JobCliant:UseSenericOptionsParsarfcrparsingthearauments?AprilcationsshauldjunplementToolfcrthesane?15/05/1615/05/1^15/05/1615/'05/1615/05/1615/05/l€15/05/1615/'05/161&/0S/16lS/OS/lfi15/05/1615/05/1615/05/1615/05/16INFOinpu匕.FileInputFonnat:INFOutil?JTaitiPEUcid^Lcimciei?:Totalinput£?^七1115/05/1615/05/1^15/05/1615/'05/1615/05/1615/05/l€15/05/1615/'05/161&/0S/16lS/OS/lfi15/05/1615/05/1615/05/1615/05/16INFOinpu匕.FileInputFonnat:INFOutil?JTaitiPEUcid^Lcimciei?:Totalinput£?^七11二to口工口ccss: 1Loadedthenative-hadeoplibrary42:19WARNsrapp^,LoadSnappy:Snappynativelibrarynotloaded23^2:20INFO23:12:21INFO23342:80INFO23:42:38INFO23:42:^0INFO23=12:^1INFO23:42:41rUFO23:42:-31INFO23:^2;^1INFO23s42INFO23:42:^1INFOmaprsl?Jot-匚丄丄己n匸mapred?JabClientitaprad-JahClientiDHpred?JabClientnsapx^i?JobClienLiuiapred?JabClientrnapred.JobClientmaprei?JobClientiuapxcd?JahClx^ntiraapred.?JobClientmarred,JobClientDbap0%teduce0$map100^reducegmap100^工皂duce33%map100^reduceRormingjoti:Jai>_2015D51fi2336_DD02Jobcoii^lete:jQb_2015051^233€_D002Counters:29JobCountersLa.ujQQt.Edeeducetasks-^lSLOTS_MILLIS_HAPS=0€SSTotaltimespentt>#allreduceswaitingart皂工?tingart皂工?reservingslatst^is)=a15/05/1623:425-91INFOmapred.JabClisnt:Totaltiras3pentbya.11mapswait-in1□□:07:4SIWFO1□□:07:4SIWFOmapred-JobClient:15/J5/J'?oa:07:^sINFOmaLpred?JcitCli亡nt;:15/05/1^OD:07MSIKFOmapred?JobClient:00:07:4SrUFOmapred-JobClient:15/J5/1100:07:^SINFOrnaprea?jdidcizl亡口匕:15/05/1^00:07:48IKFOnuipEed?JobClient:□□:07:4STUFOmapred.JobClient:Oi沁三OD:07M8INFOnuipred?JobClient:00:07:48INFOmapred.JobClient:&bJ112UlE/05/1^OD:07M8INFOnutpred?JobClient:gafterreservingslats(ibls)=□CPUtimeepant\Tt\s)=4950CoiutuneirpucrecQZils=0SPLIT_RAW_BYTES-110P.&duceinputreeords=l47171R皂duseinputgraups=1^55O€iCombineoutputzecords■-'0PTiysiealrnemary(bytes)2nap2hot=2£Reduceautpucrecard5*l^S506Virt口mlinemor7|bytes|snapshot=194Hap口口tputrccoids—117171(3) 查看集群環(huán)境下啟動程序生成的結(jié)果,即output文件,結(jié)果如下:/user/hadaapZoutputhadQQphadoophadoop/user/hadaapZoutputhadQQphadoophadoop(4) 數(shù)據(jù)統(tǒng)計結(jié)果在part-r-00000中,具體內(nèi)容如下,992113lz122131213142411221戈鵬印灘暉陽賢天華揮華海文嫌異昭隘朝就捷桂楚橈欣騁永)1沐潔沸濟浩漓痛坷琛陳陳陳礫陳陪陳陳陳陳陳陳陳麻陳陳陳陳陳陳降陳除陳5附件源代碼如下:packagehadoop;importjava.io.IOException;importjava.util.StringTokenizer;importorg.apache.hadoop.conf.Configuration;importorg.apache.hadoop.fs.Path;importorg.apache.hadoop.io.IntWritable;importorg.apache.hadoop.io.LongWritable;importorg.apache.hadoop.io.Text;importorg.apache.hadoop.mapreduce.Job;importorg.apache.hadoop.mapred

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論