大数据学习hadoop3.1.3——Presto-client安装

Presto命令行Client安装

1)下载Presto的客户端
https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.196/presto-cli-0.196-executable.jar

2)将presto-cli-0.196-executable.jar上传到hadoop101的/opt/module/presto文件夹下

3)修改文件名称

 mv presto-cli-0.196-executable.jar  prestocli

4)增加执行权限

 chmod +x prestocli

5)启动prestocli

./prestocli --server hadoop101:8881 --catalog hive --schema default

6)Presto命令行操作
Presto的命令行操作,相当于Hive命令行操作。每个表必须要加上schema。
例如:
select * from schema.table limit 100

Presto可视化Client安装

1)将yanagishima-18.0.zip上传到hadoop101的/opt/module目录

2)解压缩yanagishima到module

 unzip yanagishima-18.0.zip -d /opt/module/ 
 cd yanagishima-18.0

3)进入到/opt/module/yanagishima-18.0/conf文件夹,编写yanagishima.properties配置

 vim yanagishima.properties

添加如下内容

 jetty.port=7080
 presto.datasources=caron-presto
 presto.coordinator.server.caron-presto=http://hadoop101:8881
 catalog.caron-presto=hive
 schema.caron-presto=default
 sql.query.engines=presto

4)在/opt/module/yanagishima-18.0路径下启动yanagishima

 nohup bin/yanagishima-start.sh >y.log 2>&1 &

5)启动web页面

http://hadoop101:7080
看到界面,进行查询了。

6)查看表结构
在这里插入图片描述
这里有个Tree View,可以查看所有表的结构,包括Schema、表、字段等。
比如执行select * from hive.dw_weather.tmp_news_click limit 10,这个句子里Hive这个词可以删掉,是上面配置的Catalog
在这里插入图片描述
每个表后面都有个复制键,点一下会复制完整的表名,然后再上面框里面输入sql语句,ctrl+enter键执行显示结果
在这里插入图片描述

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值