1、編譯Slider,
在金山等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場(chǎng)前瞻性、產(chǎn)品創(chuàng)新能力,以專(zhuān)注、極致的服務(wù)理念,為客戶(hù)提供成都網(wǎng)站制作、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè) 網(wǎng)站設(shè)計(jì)制作按需求定制網(wǎng)站,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),成都品牌網(wǎng)站建設(shè),營(yíng)銷(xiāo)型網(wǎng)站建設(shè),成都外貿(mào)網(wǎng)站建設(shè),金山網(wǎng)站建設(shè)費(fèi)用合理。[root@plat1 apache-slider-0.91.0-incubating]# pwd /usr/local/src/apache-slider-0.91.0-incubating
因采用CDH版本hadoop(2.6.0-cdh6.9.0),hbase(1.2.0-cdh6.9.0),修改該目錄下pom文件
2.6.0-cdh6.9.0 1.2.0-cdh6.9.0 1.7.0
注釋掉slider-core和slider-funtest中對(duì)hadoop-minicluster包依賴(lài)
跳過(guò)maven測(cè)試,執(zhí)行編譯命令
[root@plat1 apache-slider-0.91.0-incubating]# mvn clean package -Dmaven.test.skip=true -DskipTests
[INFO] Slider ............................................. SUCCESS [ 0.762 s]
[INFO] Command Logger Sample Application .................. SUCCESS [ 0.971 s]
[INFO] Slider Command Logger Slider App Package ........... SUCCESS [ 0.766 s]
[INFO] Slider Core ........................................ SUCCESS [ 10.766 s]
[INFO] Slider Agent ....................................... SUCCESS [ 1.245 s]
[INFO] Apache Slider Binary Distribution .................. SUCCESS [ 21.933 s]
[INFO] Slider Functional Tests ............................ SUCCESS [ 5.285 s]
[INFO] Slider App Packages ................................ SUCCESS [ 0.012 s]
[INFO] Slider Accumulo App Package ........................ SUCCESS [ 5.578 s]
[INFO] Slider HBase App Package ........................... SUCCESS [ 0.017 s]
[INFO] Slider Kafka App Package ........................... SUCCESS [ 1.046 s]
[INFO] Slider Storm App Package ........................... SUCCESS [ 0.011 s]
[INFO] Slider Tomcat App Package Testing WAR file ......... SUCCESS [ 0.886 s]
[INFO] Slider Tomcat App Package .......................... SUCCESS [ 1.666 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.578 s
[INFO] Finished at: 2016-12-01T12:00:14+08:00
[INFO] Final Memory: 89M/2916M
[INFO] ------------------------------------------------------------------------
2、下載hbase-1.2.0-cdh6.9.0.tar.gz,存放目錄/usr/local/src
wget http://archive.cloudera.com/cdh6/cdh/5/hbase-1.2.0-cdh6.9.0.tar.gz
3、生成slider-hbase-app-package-1.2.0-cdh6.9.0.zip
mvn clean package -P hbase-app-package -D pkg.version=1.2.0-cdh6.9.0 -Dpkg.name=hbase-1.2.0-cdh6.9.0.tar.gz -D pkg.src=/usr/local/src
-Dhbase.version=
-Dpkg.version=
-Dpkg.name=
-Dpkg.src=
4、將slider編譯成功的包部署,配置環(huán)境變量
成功編譯的包位于SLIDER_SRC_HOME/slider-assembly/target/slider-0.91.0-incubating-all.tar.gz
解壓至/usr/local/slider
并配置環(huán)境變量export SLIDER_HOME=/usr/local/slider
5、創(chuàng)建package
slider package --install --name HBASE --package slider-0.91.0-incubating/slider-hbase-app-package-1.2.0-cdh6.9.0.zip
驗(yàn)證:
[hadoop@nn1 slider]$ hadoop fs -ls /user/hadoop/.slider/package/HBASE/slider-hbase-app-package-1.2.0-cdh6.9.0.zip -rw-r--r-- 3 hadoop hadoop 241347310 2016-12-01 13:43 /user/hadoop/.slider/package/HBASE/slider-hbase-app-package-1.2.0-cdh6.9.0.zip
6、提取slider-hbase-app-package-1.2.0-cdh6.9.0.zip中appConfig-default.json和resource-default.json
unzip slider-hbase-app-package-1.2.0-cdh6.9.0.zip appConfig-default.json -d /usr/local/slieder/
unzip slider-hbase-app-package-1.2.0-cdh6.9.0.zip resource-default.json -d /usr/local/slider/
7、修改appConfig-default.json
{ "schema": "http://example.org/specification/v2.0.0", "metadata": { }, "global": { "application.def": ".slider/package/HBASE/slider-hbase-app-package-1.2.0-cdh6.9.0.zip", "create.default.zookeeper.node": "true", "java_home": "/usr/local/jdk", "system_configs": "core-site", "site.global.app_user": "hadoop", "site.global.app_version": "1.2.0-cdh6.9.0", "site.global.app_root": "${AGENT_WORK_ROOT}/app/install/hbase-1.2.0-cdh6.9.0", "site.global.metric_collector_host": "${NN_HOST}", "site.global.metric_collector_port": "6188", "site.global.metric_collector_lib": "", "site.global.hbase_instance_name": "instancename", "site.global.hbase_root_password": "secret", "site.global.user_group": "hadoop", "site.global.monitor_protocol": "http", "site.global.hbase_thrift_port": "${HBASE_THRIFT.ALLOCATED_PORT}", "site.global.hbase_thrift2_port": "${HBASE_THRIFT2.ALLOCATED_PORT}", "site.global.hbase_rest_port": "${HBASE_REST.ALLOCATED_PORT}", "site.hbase-env.hbase_master_heapsize": "1024m", "site.hbase-env.hbase_regionserver_heapsize": "1024m", "site.hbase-site.hbase.rootdir": "${DEFAULT_DATA_DIR}/data", "site.hbase-site.hbase.superuser": "${USER_NAME}", "site.hbase-site.hbase.tmp.dir": "${AGENT_WORK_ROOT}/work/app/tmp", "site.hbase-site.hbase.local.dir": "${hbase.tmp.dir}/local", "site.hbase-site.hbase.zookeeper.quorum": "${ZK_HOST}", "site.hbase-site.zookeeper.znode.parent": "${DEFAULT_ZK_PATH}", "site.hbase-site.hbase.regionserver.info.port": "0", "site.hbase-site.hbase.bulkload.staging.dir": "/user/${USER_NAME}/hbase-staging", "site.hbase-site.hbase.coprocessor.region.classes": "org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint", "site.hbase-site.hbase.master.info.port": "${HBASE_MASTER.ALLOCATED_PORT}", "site.hbase-site.hbase.regionserver.port": "0", "site.hbase-site.hbase.master.port": "0" }, "components": { "slider-appmaster": { "jvm.heapsize": "1024M" } } }
8、修改resource-default.json
{ "schema": "http://example.org/specification/v2.0.0", "metadata": { }, "global": { "yarn.log.include.patterns": "", "yarn.log.exclude.patterns": "", "yarn.component.instances": "1", "yarn.vcores": "1" }, "components": { "slider-appmaster": { "yarn.memory": "10240" }, "HBASE_MASTER": { "yarn.role.priority": "1", "yarn.component.instances": "1", "yarn.placement.escalate.seconds": "10", "yarn.memory": "15000" }, "HBASE_REGIONSERVER": { "yarn.role.priority": "2", "yarn.component.instances": "1", "yarn.memory": "15000", "yarn.container.failure.threshold": "15", "yarn.placement.escalate.seconds": "60" }, "HBASE_REST": { "yarn.role.priority": "3", "yarn.component.instances": "1", "yarn.component.placement.policy": "1", "yarn.memory": "5560" }, "HBASE_THRIFT": { "yarn.role.priority": "4", "yarn.component.instances": "1", "yarn.component.placement.policy": "1", "yarn.memory": "5560" }, "HBASE_THRIFT2": { "yarn.role.priority": "5", "yarn.component.instances": "1", "yarn.component.placement.policy": "1", "yarn.memory": "5560" } } }
9、啟動(dòng)hbase應(yīng)用on yarn
[hadoop@nn1 slider]$ slider create hbase1 --template ./appConfig-default.json --resources ./resources-default.json
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線(xiàn),公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性?xún)r(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿(mǎn)足用戶(hù)豐富、多元化的應(yīng)用場(chǎng)景需求。