日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

apache phoenix 安装试用

發(fā)布時(shí)間:2025/3/8 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 apache phoenix 安装试用 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
備注: 本次安裝是在hbase docker 鏡像的基礎(chǔ)上配置的,主要是為了方便學(xué)習(xí),而hbase搭建有覺得 有點(diǎn)費(fèi)事,用鏡像簡單。 1. hbase 鏡像 docker pull harisekhon/hbase 2. 啟動hbase? docker run -d -p 2181:2181 -p 8080:8080 -p 8085:8085 -p 9090:9090 -p 9095:9095 -p 16000:16000 -p 16010:16010 -p 16201:16201 -p 16301:16301 harisekhon/hbase 3. 測試hbase docker exec -it {hbasedocker-id} sh hbase shell// 看到下面的就是啟動成功了2017-12-11 05:15:10,909 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable HBase Shell; enter 'help<RETURN>' for list of supported commands. Type "exit<RETURN>" to leave the HBase Shell Version 1.3.1, r930b9a55528fe45d8edce7af42fef2d35e77677a, Thu Apr 6 19:36:54 PDT 2017// 創(chuàng)建表 create 'users','user_id','user_name','user_age' 4. 集成apache phoenix 因?yàn)閔base 的鏡像是使用alpine linux 版本,默認(rèn)已經(jīng)安裝了wget 等一些工具,但是沒有python 安裝apache phoenix 需要準(zhǔn)備 phoenix 以及python 1. apache phoenixwget http://apache.osuosl.org/phoenix/apache-phoenix-4.13.1-HBase-1.3/bin/apache-phoenix-4.13.1-HBase-1.3-bin.tar.gz 2. python apk add --no-cache python 3. 按照官方介紹copy phoenix server 到hbase 的lib 目錄tar xvf apache-phoenix-4.13.1-HBase-1.3-bin.tar.gzcd cd apache-phoenix-4.13.1-HBase-1.3-bin/cp phoenix-4.13.1-HBase-1.3-server.jar /hbase/lib/ 4. 重啟hbase server cd hbase./stop-hbase.sh./start-hbase.sh 5. apache phoenix 試用 a. 連接 cd /apache-phoenix-4.13.1-HBase-1.3-bin/bin ./sqlline.pyb. crud// 創(chuàng)建表create table userinfo(name varchar,age integer not null primary key);// 添加數(shù)據(jù) upsert into 更新是一樣的upser into userinfo(name,age) values("dalong",1);// select select * from userinfo; --- where +---------+------+ | NAME | AGE | +---------+------+ | dalong | 1 | +---------+------+// delete delete from userinfo where age=1// 修改表結(jié)構(gòu)alter table userinfo add version varcharalter table userinfo drop COLUMN version +---------+------+----------+ | NAME | AGE | VERSION | +---------+------+----------+ | dalong | 1 | | +---------+------+----------+ 6. 客戶端工具 1. phoenix 自帶的 2. SQuirrel 參考文檔: http://phoenix.apache.org/installation.html#SQL_Client 7. 參考資料 http://phoenix.apache.org/Phoenix-in-15-minutes-or-less.html https://hub.docker.com/r/harisekhon/hbase/

總結(jié)

以上是生活随笔為你收集整理的apache phoenix 安装试用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。