阅读更多
一句话介绍Zeppelin
以笔记(Note)的形式展示的数据可视化工具。
一.下载安装启动
http://zeppelin.apache.org/download.html
wget http://mirrors.tuna.tsinghua.edu.cn/apache/zeppelin/zeppelin-0.7.3/zeppelin-0.7.3-bin-all.tgz
tar -zvxf zeppelin-0.7.3-bin-all.tgz -C /opt
bin/zeppelin-daemon.sh start
二.配置Interpreters
连接 hive
default.driver org.apache.hive.jdbc.HiveDriver
default.url jdbc:hive2://172.18.203.131:10000/default
default.user root(注意,这个配置会导致没有权限,连接失败)
具体可以参考hive的日志,http://master1:10002/logs/
上传hive相关包,注意版本驱动版本和装的hive版本一致,到/opt/zeppelin-0.7.3-bin-all/lib
hive-common-1.1.0.jar
hive-jdbc-1.1.0.jar
hive-metastore-1.1.0.jar
hive-serde-1.1.0.jar
hive-service-1.1.0.jar
连接kylin
kylin.api.user ADMIN
kylin.api.password KYLIN
kylin.api.url http://master1:7070/kylin/api/query
kylin.query.project HiveProject
三.创建note
%jdbc
select fact.time_key, sum(fact.quantity_ordered), sum(fact.order_dollars), sum(fact.cost_dollars) from fact_order as fact
where fact.time_key >= "2016-05-01" and fact.time_key <= "2016-05-15"
group by fact.time_key order by fact.time_key;
%kylin
select fact.time_key, sum(fact.quantity_ordered), sum(fact.order_dollars), sum(fact.cost_dollars) from fact_order as fact
where fact.time_key between '2016-05-01' and '2016-05-15'
group by fact.time_key order by fact.time_key