中文字幕日韩精品一区二区免费_精品一区二区三区国产精品无卡在_国精品无码专区一区二区三区_国产αv三级中文在线

hbase+hadoop完全分布式環(huán)境搭建

1、環(huán)境準(zhǔn)備

linux系統(tǒng):Centos6.4 release (Final) 下載地址:http://www.centos.org/

成都創(chuàng)新互聯(lián)公司長(zhǎng)期為近千家客戶提供的網(wǎng)站建設(shè)服務(wù),團(tuán)隊(duì)從業(yè)經(jīng)驗(yàn)10年,關(guān)注不同地域、不同群體,并針對(duì)不同對(duì)象提供差異化的產(chǎn)品和服務(wù);打造開(kāi)放共贏平臺(tái),與合作伙伴共同營(yíng)造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為金東企業(yè)提供專業(yè)的網(wǎng)站設(shè)計(jì)、成都網(wǎng)站設(shè)計(jì),金東網(wǎng)站改版等技術(shù)服務(wù)。擁有10多年豐富建站經(jīng)驗(yàn)和眾多成功案例,為您定制開(kāi)發(fā)。

jdk:1.7.0_45 下載地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html

hadoop:hadoop-2.6.0下載地址:http://apache.claz.org/hadoop/common/stable2/
hbase:hbase-0.98.8-hadoop2 下載地址:http://mirrors.gigenet.com/apache/hbase/stable/

2、配置步驟:2.1 安裝jdk,別忘了修改 vim /etc/profile。2.2 ssh免密碼登陸

說(shuō)明:由于jdk的環(huán)境配置以及ssh面密碼登陸一般不出什么問(wèn)題,網(wǎng)上資料較多,故在此不做贅述

2.3 hadoop環(huán)境配置

本機(jī)分布式服務(wù)器

ip30:lingcloud30 (由于本臺(tái)服務(wù)器配置相對(duì)較低,故用其作為NameNode,也是SecondaryNameNode。也是下面Hbase配置的HMaster)

ip29:lingcloud29(本臺(tái)以及下面的兩臺(tái)作為DateNode。以及下面Hbase配置的HRegionServer)

ip31:lingcloud31
ip32:lingcloud32

2.3.1{hadoop}/etc/hadoop/core-site.xml配置

下面是我的lingcloud30的配置,有的有注釋,方便理解

<code=xml>

<prename="code" class="html"><configuration> <!-- this file must be the same with the $hbase$/conf/ "hbase.rootdir"property --> <property> <name>fs.defaultFS</name> <value>hdfs://lingcloud30:9000</value> </property> <!-- if the HMaster start servel seconds andthen HMaster server abort ,you should remove the file hadooptmp and restart thehbase --> <property> <name>hadoop.tmp.dir</name> <value>/usr/qhl/hadoopWorkspace/hadooptmp</value> </property> <property> <name>io.file.buffer.size</name> <value>131072</value> </property> <!--添加 httpfs 的 選項(xiàng)--> <property> <name>hadoop.proxyuser.root.hosts</name> <value>lingcloud30</value> </property> <property> <name>hadoop.proxyuser.root.groups</name> <value>*</value> </property> </configuration>

</code>

2.3.2{hadoop}/etc/hadoop/hdfs-site.xml配置

<code=xml>

<prename="code" class="html"><configuration> <property> <name>dfs.datanode.handler.count</name> <value>5</value> <description>The number ofserver threads for the datanode.</description> </property> <property> <name>dfs.namenode.handler.count</name> <value>5</value> <description>The number ofserver threads for the namenode.</description> </property> <property> <name>dfs.replication</name> <value>3</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>file:/usr/qhl/hadoopWorkspace/hdfs/name</value> <final>true</final> </property> <property> <name>dfs.permissions</name> <value>false</value> </property> <property> <name>dfs.federation.nameservice.id</name> <value>ns1</value> </property> <property> <name>dfs.namenode.backup.address.ns1</name> <value>lingcloud30:50100</value> </property> <property> <name>dfs.namenode.backup.http-address.ns1</name> <value>lingcloud30:50105</value> </property> <property> <name>dfs.federation.nameservices</name> <value>ns1</value> </property> <property> <name>dfs.namenode.rpc-address.ns1</name> <value>lingcloud30:9000</value> </property> <property> <name>dfs.namenode.rpc-address.ns2</name> <value>lingcloud30:9000</value> </property> <property> <name>dfs.namenode.http-address.ns1</name> <value>lingcloud30:23001</value> <!-- this is the web browsre port if you browsre http://lingcloud30:23001. you\'ll see some information --> </property> <property> <name>dfs.namenode.http-address.ns2</name> <value>lingcloud30:13001</value> </property> <property> <name>dfs.dataname.data.dir</name> <value>file:/usr/qhl/hadoopWorkspace/hdfs/data</value> <final>true</final> </property> <property> <name>dfs.namenode.secondary.http-address.ns1</name> <value>lingcloud30:23002</value> </property> <property> <name>dfs.namenode.secondary.http-address.ns2</name> <value>lingcloud30:23002</value> </property> <property> <name>dfs.namenode.secondary.http-address.ns1</name> <value>lingcloud30:23003</value> </property> <property> <name>dfs.namenode.secondary.http-address.ns2</name> <value>lingcloud30:23003</value> </property> <property> <name>dfs.datanode.max.xcievers</name> <value>8192</value> </property> </configuration>

</code>

2.3.3{hadoop}/etc/hadoop/yarn-site.xml配置

<code=xml>

<configuration> <property> <name>yarn.resourcemanager.address</name> <value>lingcloud30:18040</value> </property> <property> <name>yarn.resourcemanager.scheduler.address</name> <value>lingcloud30:18030</value> </property> <property> <name>yarn.resourcemanager.webapp.address</name> <value>lingcloud30:18088</value> <!-- this is the web browsre port, ifyou browsre http://lingcloud30:18088, you\'ll see some information --> </property> <property> <name>yarn.resourcemanager.resource-tracker.address</name> <value>lingcloud30:18025</value> </property> <property> <name>yarn.resourcemanager.admin.address</name> <value>lingcloud30:18141</value> </property> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce.shuffle</value> </property> </configuration>

</code>

2.3.4{hadoop}/etc/hadoop/mapred-env.sh配置

添加

<code=xml>

exportHADOOP_MAPRED_PID_DIR=/usr/qhl/hadoopWorkspace/haddopMapredPidDir # The pidfiles are stored. /tmp by default.

</code>

2.3.5{hadoop}/etc/hadoop/slaves配置

<code=xml>

lingcloud32 lingcloud31 lingcloud29

</code>

2.3.6 小結(jié)

以上配置復(fù)制到其他node節(jié)點(diǎn),按照相同配置即可。

3.hbase配置3.1habs-env.sh環(huán)境配置

<code=xml>

exportJAVA_HOME=/usr/lib/jdk/jdk1.7.0_45/ #你的jdk安裝目錄 exportHBASE_PID_DIR=/usr/qhl/hbaseWorkspace/pids # The directory where pid files arestored. /tmp by default. exportHBASE_MANAGES_ZK=true #使用hhase自帶的zookeeper

</code>

3.2hbase-site.xml配置

<code=xml>

<configuration> <property> <name>hbase.rootdir</name> <value>hdfs://lingcloud30:9000/hbase</value> <!-- this must be ths same with the{hadoop}/etc/hadoop:core-site.xml <property> <name>fs.defaultFS</name> <value>hdfs://lingcloud30:9000</value> </property> --> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/usr/qhl/zookeeper</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> <description>which directsHBase to run in distributed mode, with one JVM instance perdaemon.</description> </property> <property> <name>hbase.tmp.dir</name> <value>/usr/qhl/hbaseWorkspace/hbasetmp</value> <!-- if the HMaster start servel seconds andthen HMaster server abort ,you should remove the file hadooptmp and restart thehbase --> </property> <property> <name>hbase.zookeeper.quorum</name> <value>lingcloud29,lingcloud31,lingcloud32</value> </property> <property> <name>hbase.master</name> <value>lingcloud30:60000</value> </property> <property> <name>hbase.master.port</name> <value>60000</value> <description>The portmaster should bind to.</description> </property> <property> <name>hbase.master.maxclockskew</name> <value>200000</value> <description>Time difference ofregionserver from master</description> </property> </configuration>

</code>

3.3 regionserver 配置

<code=xml>

lingcloud29 lingcloud31 lingcloud32

</code>

4.配置成功后瀏覽器截圖

我在{hadoop}etc/hadoop下的hdfs-site.xml中配置了端口為23001. 配置項(xiàng)是dfs.namenode.http-address.ns1

訪問(wèn)18088端口會(huì)出現(xiàn)如下界面:

hbase默認(rèn)端口為60010

5.總結(jié)和參考文獻(xiàn)

本人必須承認(rèn),很多東西都是從網(wǎng)上學(xué)到的,參考了很多的博文,也遇到了很多的錯(cuò)誤,但是由于日志中間沒(méi)有保存,錯(cuò)誤就不貼了。同時(shí)由于參考了很多的博文,在此也不能一一列舉了,本篇博文是我的第一篇,有什么不對(duì)之處,還請(qǐng)批評(píng)指正,共同學(xué)習(xí)。

網(wǎng)站標(biāo)題:hbase+hadoop完全分布式環(huán)境搭建
文章鏈接:http://www.rwnh.cn/article30/cjooso.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App設(shè)計(jì)電子商務(wù)、關(guān)鍵詞優(yōu)化、ChatGPT靜態(tài)網(wǎng)站、動(dòng)態(tài)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

柳江县| 田东县| 开平市| 苗栗市| 乐清市| 察雅县| 太康县| 胶州市| 龙川县| 铜陵市| 沙洋县| 天津市| 忻城县| 麟游县| 米易县| 喀喇沁旗| 长乐市| 赣榆县| 宁武县| 拜城县| 怀化市| 普兰店市| 泊头市| 故城县| 余姚市| 鲁山县| 花莲县| 饶阳县| 额济纳旗| 杭州市| 台南市| 荥阳市| 滁州市| 拉萨市| 逊克县| 常德市| 荃湾区| 个旧市| 湘西| 前郭尔| 渝北区|