版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
0 .-1Hadoop集群節(jié)點規(guī)劃與配置-2-創(chuàng)建Hadoop3-ssh免登錄配置-3JDK安裝配置4-Hadoop集群安裝配置4-配置etc/hadoop/hadoop-env.sh5-配置etc/hadoop/core-site.xml6-配置etc/hadoop/hdfs-site.xml8-配置etc/hadoop/yarn-env.sh9-配置etc/hadoop/yarn-site.xml11-配置etc/hadoop/mapred-env.sh13-配置etc/hadoop/mapred-site.xml13-配置etc/hadoop/slaves15-同步分發(fā)安裝文件15-Hadoop集群啟動驗證15-檢查狀態(tài)-15格式化HDFS15-啟動HDFS16-啟動YARN集群16-16-Hadoop集群節(jié)點規(guī)劃與配Hadoop集群點的配置信息以及各個節(jié)點的角色整理如下表所(主機名命名規(guī)則:KaolaStatistics的前兩個字母縮寫:IP節(jié)點角色(進程 、上表點角色(進程)縮寫說明,如下表所示HDFSHDFSSecondaryHDFSCheckpointHBaseHBaseetc/hosts文件,增加如下主機映射需要以超級用戶權限,修改所有節(jié)點對應的主機名稱。以主節(jié)點ks01創(chuàng)建Hadoop用useraddpasswd在Linux系統(tǒng)上,為Hadoop集群創(chuàng)建一useraddpasswdssh免登錄配ssh-keygen-tssh-keygen-t 下面生成了公鑰文件id_rsa.pub和密鑰文件id_rsa。catcat~/.ssh/id_rsa.pub>> sshsshodod644scp~/.ssh/id_rsa.pubks02scp~/.ssh/id_rsa.pub這時,需要輸入從節(jié)點ks02的才能執(zhí)行拷貝。拷貝成功以后,登錄到從節(jié)點catcat~/.ssh/id_rsa.pub.master>>/ssh 就能登錄到ks02上,說明配置成功。sshodg-w如果是第一次生成RSA文件一般來說都是~/.ssh/authorized_keys的權限都是有問題的,wodg-wg-w644JDK安裝配ln-s/usr/local/jdk1.7.0_45/假設安 ln-s/usr/local/jdk1.7.0_45/exportJAVA_HOME=/usr/local/javaexportJAVA_HOME=/usr/local/javaexport..sourcesourceHadoop集群安裝配2.2.0.ta.gz lnln-s/usr/local/hadoop-2.2.0進入 劃一下Hadoop相關 ,包括name export設置Hadoop環(huán)境變量,修改~/.bashrc文件,增加HADOOP_HOME配置(假設Hadoop安裝 2export..sourcesource##SetHadoop-specificenvironmentvariables#Theonlyrequiredenvironmentvariableis Allothers#optional. Whenrunningadistributedconfigurationitisbestto#setJAVA_HOMEinthisfile,sothatitiscorrectlydefinedon#remote#Thejavaimplementationtoexport#Thejsvcimplementationtouse.Jsvcisrequiredtorunsecure#export #forfin$HADOOP_HOME/contrib/capacity-scheduler/*.jar;do if["$HADOOP_CLASSPATH"];then export #umamountofheaptouse,inMB.Defaultisexportexport#ExtraJavaruntime Emptyby#CommandspecificoptionsappendedtoHADOOP_OPTSwhen 幾個配置行即可, #Thefollowingappliestomultiplecommands(fs,dfs,fsck,distcpetc)exportHADOOP_ _OPTS="-Xmx512m$HADOOP_ #Onsecuredatanodes,usertorunthedatanodeasafterdrop exportHADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER}#Wherelogfilesarestored. $HADOOP_HOME/logsbydefault.exportHADOOP_LOG_DIR=/home/hadoop/storage/logs#Wherelogfilesarestoredinthesecuredataexport#Thedirectorywherepidfilesarestored./tmpby#NOTE:thisshouldbesettoadirectorythatcanonlybewrittento theuserthatwillrunthehadoopdaemons. Otherwisethereisthe potentialforasymlinkattack.exportexport#Astringrepresentingthisinstanceofhadoop.$USERbydefault.exportHADOOP_IDENT_STRING=$USER exportHADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"<description>Default'file:///'.Thenameofthedefaultfilesystem.AURIandauthoritydeterminetheFileSystemimplementation.Theuri'sschemedeterminestheconfigproperty(fs.SCHEME.impl)namingtheFileSystemimplementationclass.Theuri'sauthorityisusedtodeterminethehost,port,etc.fora<description>Default4096.Thesizeofbufferforuseinsequencefiles.Thesizeofthisbuffershouldprobablybeamultipleofhardwarepagesize(4096onInx86),anditdetermineshowmuchdataisbufferedduringreadandwriteoperations.<description>Thenumberofsecondsbetweentwoperiodic <description>Thesizeofthecurrenteditlog(inbytes)thattriggersaperiodiccheckpointevenifthefs.checkpoint.periodhasn't .Thedefaultblocksizefornewfiles,inbytes.Youcanusethefollowingsuffix(caseinsensitive):k(kilo),m(mega),g(giga),t(),p(peta),e(exa)tospecifythesize(suchas128k,512m,1g,etc.),Orprovidecompletesizeinbytes(suchas for128MB).<description>NameNodegetthenewestfsimagevia#Userfor#UserforYARN#resolvelinks-$0maybea#someJavaif["$JAVA_HOME"!=""];then#echo"runjavainif["$JAVA_HOME"=""];echo"Error:JAVA_HOMEisnotset."exit1#ForsettingYARNspecificHEAPsizespleaseusethis#Parameterandsetappropriay##checkenvvarswhichmightoverridedefaultargsif["$YARN_HEAPSIZE"!=""];then#ResourceManagerspecific#SpecifythemaxHeapsizefortheResourceManagerusinganumericalvalue#inthescaleofMB.Forexample,tospecifyanjvmoptionof-Xmx1000m,set#thevalueto1000.#ThisvaluewillbeoverriddenbyanXmxsettingspecifiedineither#and/or#Ifnotspecified,thedefaultvaluewillbepickedfromeitherYARN_HEAPMAX#orJAVA_HEAP_MAXwithYARN_HEAPMAXasthepreferredoptionofthetwo.#exportYARN_RESOURCEMANAGER_HEAPSIZE=1000#SpecifytheJVMoptionstobeusedwhenstartingtheResourceManager.#TheseoptionswillbeappendedtotheoptionsspecifiedasYARN_OPTS#andthereforemayoverrideanysimilarflagssetinYARN_OPTS#export#NodeManagerspecific#SpecifythemaxHeapsizefortheNodeManagerusinganumerical#inthescaleofMB.Forexample,tospecifyanjvmoptionof-Xmx1000m,set#thevalueto1000.#ThisvaluewillbeoverriddenbyanXmxsettingspecifiedineitherYARN_OPTS#and/orYARN_NODEMANAGER_OPTS.#Ifnotspecified,thedefaultvaluewillbepickedfromeitherYARN_HEAPMAX#orJAVA_HEAP_MAXwithYARN_HEAPMAXasthepreferredoptionofthetwo.#exportYARN_NODEMANAGER_HEAPSIZE=1000#SpecifytheJVMoptionstobeusedwhenstartingthe#TheseoptionswillbeappendedtotheoptionsspecifiedasYARN_OPTS#andthereforemayoverrideanysimilarflagssetinYARN_OPTS#export#sothatfilenamesw/spacesarehandledcorrectlyinloopsbelow#defaultlogdirectory&fileif["$YARN_LOG_DIR"=""];if["$YARN_LOGFILE"=""];#default fileforservice-levelauthorizationif["$YARN_ FILE"=""];then #restoreordinarybehaviourunsetIFSYARN_OPTS="$YARN_OPTS-Dyarn.log.dir=$YARN_LOG_DIR"YARN_OPTS="$YARN_OPTS-Dyarn.log.file=$YARN_LOGFILE"YARN_OPTS="$YARN_OPTS-Dyarn.home.dir=$ YARN_OPTS="$YARN_OPTS-Dyarn.id.str=$YARN_IDENT_STRING"YARN_OPTS="$YARN_OPTS-Dyarn.root.logger=${YARN_ROOT_LOGGER:-INFO,console}" <?xml<?xml<description>Default'0.0.0.0'.Thehostnameofthe<description>Default8192.Amountofphysicalmemory,inMB,thatcanbeallocatedfor<description>Default8.NumberofCPUcoresthatcanbeallocatedfor<description>Default1024.TheminimumallocationforeveryrequestattheRM,inMBs.Memoryrequestslowerthanthiswon'ttakeeffect,andthespecifiedvaluewillgetallocatedatminimum. <description>Default8192.The umallocationforeverycontainerrequestattheRM,inMBs.Memoryrequestshigherthanthiswon'ttakeeffect,andwillgetcappedtothisvalue.<description>Listofdirectoriestostorelocalizedfilesin.Anapplication'slocalizedfiledirectorywillbefoundin:Individualcontainers'workdirectories,calledcontainer_${contid},willbesubdirectoriesofthis.<description>Wheretostorecontainerlogs.Anapplication'slocalizedlogdirectorywillbefoundin${yarn.nodemanager.log-dirs}/application_${appid}.Individualcontainers'logdirectorieswillbebelowthis,indirectoriesnamedcontainer_{$contid}.Eachcontainerdirectorywillcontainthefilesstderr,stdin,andsysloggeneratedbythatcontainer.<description>Wheretoaggregatelogs<description>Thevalidservicenameshouldonlycontaina-zA-Z0-9_andcannotstartwithnumbers.</description>exportexportHADOOP_MAPRED_ROOT_LOGGER=INFO,RFA#exportHADOOP_JOB_HISTORYSERVER_OPTS=exportexportHADOOP_MAPRED_ROOT_LOGGER=INFO,RFA#exportHADOOP_JOB_HISTORYSERVER_OPTS=#Wherelogfilesarestored. $HADOOP_MAPRED_HOME/logsbydefault.exportHADOOP_MAPRED_LOG_DIR=/home/hadoop/storage/logs#exportHADOOP_JHS_LOGGER=INFO,RFA#HadoopJobSummarylogger.#exportHADOOP_MAPRED_PID_DIR=#Thepidfilesarestored./tmpbydefault.#exportHADOOP_MAPRED_IDENT_STRING=#Astringrepresentingthisinstanceof$USERby#exportHADOOP_MAPRED_NICENESS=#Theschedulingpriorityfordaemons.Defaultsto<?xml<?xml<description>Default'local'.TheruntimeframeworkforexecutingMapRedu
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 中外合資生產制造合同(三)
- 2025年茶葉采購及服務框架協(xié)議
- 二手房屋交易合同模板
- 中小企業(yè)貸款合同樣本
- 個人存單抵押借款合同樣式
- 2025年電子產品采購合同簽署完畢
- 中醫(yī)特色醫(yī)院戰(zhàn)略合作合同
- 交通運輸工具抵押借款合同
- 臨時倉儲合同樣本
- 交通監(jiān)控系統(tǒng)升級改造合同
- 2024-2030年中國智慧水務行業(yè)應用需求分析發(fā)展規(guī)劃研究報告
- 山體排險合同模板
- 特殊感染手術的配合與術后處理課件
- 檢驗科生物安全工作總結
- 《金屬與石材幕墻工程技術規(guī)范》jgj1332001-2021112401384
- 即時通訊系統(tǒng)建設方案
- 2024年中國南水北調集團新能源投資限公司抽水蓄能項目崗位公開招聘高頻考題難、易錯點模擬試題(共500題)附帶答案詳解
- 部編版五年級下冊語文1-8單元習作課件
- 中國2型糖尿病運動治療指南 (2024版)
- 基礎構成設計全套教學課件
- 初中地理實驗設計
評論
0/150
提交評論