Alluxio is a memory speed virtual distributed storage system.Alluxio是一個(gè)開源的基于內(nèi)存的分布式存儲(chǔ)系統(tǒng),現(xiàn)在成為開源社區(qū)中成長(zhǎng)最快的大數(shù)據(jù)開源項(xiàng)目之一。
創(chuàng)新互聯(lián)建站服務(wù)項(xiàng)目包括綏化網(wǎng)站建設(shè)、綏化網(wǎng)站制作、綏化網(wǎng)頁(yè)制作以及綏化網(wǎng)絡(luò)營(yíng)銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,綏化網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到綏化省份的部分城市,未來相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!
alluxio下載地址https://www.alluxio.org/download
考慮系統(tǒng)的可用性,對(duì)Alluxio Master做HA,具體步驟如下:
-1. 在alluxio-env.sh 中添加zookeeper的信息,并附上hdfs的路徑。如果是單機(jī)的alluxio master,就不需要hdfs作為alluxio的存儲(chǔ)。但是對(duì)于Master HA的模式,就需要共享文件路徑來存放文件,就選擇hdfs作為master的信息存儲(chǔ)
cat alluxio-env.sh
JAVA_HOME=/usr/local/jvm/jdk1.7.0_75
ALLUXIO_HOME=/data1/alluxio-1.4.0
ALLUXIO_RAM_FOLDER=/data1/alluxio-1.4.0/ramdisk
ALLUXIO_UNDERFS_ADDRESS=/data1/alluxio-data
ALLUXIO_WORKER_MEMORY_SIZE=1000MB
ALLUXIO_JAVA_OPTS="-Dalluxio.zookeeper.enabled=true -Dalluxio.zookeeper.address=192.168.101.72:2181,192.168.101.73:2181,192.168.101.74:2181 -Dalluxio.master.journal.folder=hdfs://liangbeta/user/hadoop/alluxio/journal"
-2. 在alluxio-site.properties 中也添加zookeeper的信息,并附上hdfs的路徑
# cat alluxio-site.properties
alluxio.worker.tieredstore.levels=2
alluxio.worker.tieredstore.level0.alias=MEM
alluxio.worker.tieredstore.level0.dirs.path=/mnt/ramdisk
alluxio.worker.tieredstore.level0.dirs.quota=1GB
alluxio.worker.tieredstore.level0.watermark.high.ratio=0.9
alluxio.worker.tieredstore.level0.watermark.low.ratio=0.7
alluxio.worker.tieredstore.level1.alias=HDD
alluxio.worker.tieredstore.level1.dirs.path=/data1/alluxio-data
alluxio.worker.tieredstore.level1.dirs.quota=500GB
alluxio.worker.tieredstore.level1.watermark.high.ratio=0.9
alluxio.worker.tieredstore.level1.watermark.low.ratio=0.7
~HA相關(guān)設(shè)置~
alluxio.zookeeper.enabled=true
alluxio.zookeeper.address=192.168.101.72:2181,192.168.101.73:2181,192.168.101.74:2181
alluxio.master.journal.folder=hdfs://liangbeta/user/hadoop/alluxio/journal
alluxio.worker.block.heartbeat.timeout.ms=300000
~~~
-3. 配置文件中,涉及到hdfs的目錄,需要?jiǎng)?chuàng)建一下
su - hdfs
hdfs dfs -mkdir -p /user/hadoop/alluxio/journal
hdfs dfs -chown alluxio:hadoop /user/hadoop/alluxio
hdfs://liangbeta/user/hadoop/alluxio/journal
-4. 設(shè)置一下/etc/profile
export JAVA_HOME=/usr/local/jvm/jdk1.7.0_75
export HADOOP_HOME=/usr/local/hadoop/hadoop-release
export HADOOP_CONF_DIR=/usr/local/hadoop/hadoop-release/etc/hadoop
export ALLUXIO_HOME=/data1/alluxio-1.4.0
export PATH=$HADOOP_HOME/sbin:$HADOOP_HOME/bin:$JAVA_HOME/bin:$ALLUXIO_HOME/bin:$PATH
-5. 需要把hadoop的 core-site.xml和hdfs-site.xml需要拷貝到alluxio conf下
-# ls /data1/alluxio-1.4.0/conf
alluxio-env.sh alluxio-site.properties core-site.xml hdfs-site.xml log4j.properties workers
-6. 對(duì)于新搭建的集群,需要對(duì)master和worker進(jìn)行format才能啟動(dòng)服務(wù)。
格式化master
Format Master
alluxio format
格式化worker
Format Worker
alluxio formatWorker
-7. 給Worker機(jī)器加上起Worker服務(wù)的用戶的免密sudo權(quán)限, 不然在啟動(dòng)worker的時(shí)候需要輸入alluxio的密碼
在/etc/sudoers中添加如下內(nèi)容
<user_name> ALL=(ALL) NOPASSWD: ALL
實(shí)際設(shè)置如下:
alluxio ALL=(ALL) NOPASSWD: ALL
-8. 這里要特別強(qiáng)調(diào),由于安全需求,大數(shù)據(jù)環(huán)境,都是通過kerberos進(jìn)行認(rèn)證的,需要在KDC上創(chuàng)建alluxio用戶,并生成keytab,拷貝到alluxio服務(wù)器上,創(chuàng)建定時(shí)任務(wù),進(jìn)行kinit
$ id
uid=1100(alluxio) gid=1091(hadoop) groups=1091(hadoop)
$ crontab -l
0 * * * * kinit -kt /etc/security/keytab/alluxio.keytab alluxio
$ klist
Ticket cache: FILE:/tmp/krb5cc_1100
Default principal: alluxio@LIANG.COM
Valid starting Expires Service principal
12/26/17 18:00:01 12/27/17 18:00:01 krbtgt/LIANG.COM@LIANG.COM
renew until 12/26/17 18:00:01
-9. 啟動(dòng)Mastersh alluxio-start.sh master
-10. 啟動(dòng)Workersh alluxio-start.sh worker
-11. 啟動(dòng)關(guān)閉Proxy
Alluxio proxy進(jìn)程可以向外提供REST接口,可以在master節(jié)點(diǎn)和worker節(jié)點(diǎn)上啟動(dòng)。
目前我們?cè)趍aster節(jié)點(diǎn)和worker節(jié)點(diǎn)上都啟動(dòng)了proxy進(jìn)程。sh alluxio-start.sh proxy
-12. 啟動(dòng)之后,可以通過網(wǎng)頁(yè)查詢
-13. worker信息頁(yè)面
-14. 創(chuàng)建的目錄,在Browse頁(yè),可以看到
-15. 創(chuàng)建一個(gè)/user/test目錄
$ alluxio fs mkdir /user/test
Successfully created directory /user/test
-16. Alluxio命令匯總
啟動(dòng)關(guān)閉Master
sh alluxio-start.sh master
sh alluxio-stop.sh master
啟動(dòng)關(guān)閉Worker
sh alluxio-start.sh worker
sh alluxio-stop.sh worker
啟動(dòng)關(guān)閉Proxy
sh alluxio-start.sh proxy
sh alluxio-stop.sh proxy
-17. 新建目錄及授權(quán)方法
檢查啟動(dòng)alluxio的用戶
ps -ef|grep alluxio
切換到用戶su - alluxio
創(chuàng)建用戶alluxio fs mkdir <path>
為用戶賦權(quán)alluxio fs chown <user> <path>
Updated on 2018-4-3
需要注意的是,在worker的配置上,需要配置alluxio-site.properties文件,設(shè)置alluxio的訪問層級(jí),不然,默認(rèn)只是使用memory,不會(huì)使用SSD或者磁盤
cat alluxio-site.properties
alluxio.worker.tieredstore.levels=2
alluxio.worker.tieredstore.level0.alias=MEM
alluxio.worker.tieredstore.level0.dirs.path=/data1/alluxio-ramdisk
alluxio.worker.tieredstore.level0.dirs.quota=20GB
alluxio.worker.tieredstore.level0.watermark.high.ratio=0.9
alluxio.worker.tieredstore.level0.watermark.low.ratio=0.7
alluxio.worker.tieredstore.level1.alias=SSD
alluxio.worker.tieredstore.level1.dirs.path=/data1/alluxio-data
alluxio.worker.tieredstore.level1.dirs.quota=450GB
alluxio.worker.tieredstore.level1.watermark.high.ratio=0.9
alluxio.worker.tieredstore.level1.watermark.low.ratio=0.7
-# User properties
-# alluxio.user.file.readtype.default=CACHE_PROMOTE
-# alluxio.user.file.writetype.default=MUST_CACHE
-# HA
alluxio.zookeeper.enabled=true
alluxio.zookeeper.address=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
alluxio.master.journal.folder=hdfs://lialng/user/alluxio/journal
alluxio.worker.block.heartbeat.timeout.ms=300000
存儲(chǔ)層級(jí)問題,參考鏈接:
https://blog.csdn.net/lipeng_bigdata/article/details/50948184
網(wǎng)站標(biāo)題:AlluxioHA安裝
地址分享:http://chinadenli.net/article18/gidsgp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信小程序、小程序開發(fā)、、定制網(wǎng)站、微信公眾號(hào)、App設(shè)計(jì)
聲明:本網(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í)需注明來源: 創(chuàng)新互聯(lián)