需要准备
安装包
livy-0.5.0-incubating-bin.tar.gz
hue.ini配置
[desktop]
app_blacklist=
[spark]
livy_server_host=master.dffl.com
livy_server_port=8998
livy_server_session_kind=yarn
[notebook]
show_notebooks=true
enable_external_statements=true
enable_batch_execute=true
注意
目前livy只有单机选择安装于master主机
解压配置更名
[root@centos ~]# tar -zxf livy-0.5.0-incubating-bin.tar.gz -C /opt/modules/
[root@centos ~]# mv /opt/modules/livy-0.5.0-incubating-bin /opt/modules/livy-0.5.0
配置环境变量
[root@centos ~]# vim /etc/profile
export LIVY_HOME=/opt/modules/livy-0.5.0
export PATH=$LIVY_HOME/bin:$PATH
立即生效
[root@centos ~]# source /etc/profile
配置启动livy
livy-env.sh
export JAVA_HOME=/usr/local/java/latest/jdk1.8.0_191
export SPARK_HOME=/opt/cloudera/parcels/SPARK2/lib/spark2
export SPARK_CONF_DIR=/etc/spark2/conf
export HADOOP_CONF_DIR=/etc/hadoop/conf
livy.conf
livy.spark.master = yarn
切换hdfs用户
[root@centos ~]# su - hdfs
后台运行
[hdfs@centos ~]$ nohup ./livy-server > livy.out 2>&1 &
查看运行日志
[hdfs@centos ~]$ cat livy.out
最后重启hue安装完成出现spark交互式界面snippet