1、Knime Analytics 安装
从官方网站下载合适的版本 https://www.knime.com/downloads
将下载的安装包在安装路径解压 https://www.knime.com/installation-0
下图是knime启动后的欢迎页面
要与spark集×××互,需要在Knime中安装KNIME® Extension for Apache Spark。并在Hadoop集群边界节点或能够执行spark-submit的节点安装Spark Job Server。架构图如下:
2、KNIME® Extension for Apache Spark 安装
在KNIME Analytics 中点击File->Install KNIME extensions选中KNIME Big Data Extensions,点击Next安装。
3、SPARK JOB SERVER安装
以下步骤以Centos 6.5 + CDH 5.7 为例
3.1 下载spark job server
$ wget http://download.knime.org/store/3.5/spark-job-server-0.6.2.3-KNIME_cdh-5.7.tar.gz
3.2 login as root or su root
3.3 安装
# LINKNAME=spark-job-server # useradd -d /opt/${LINKNAME}/ -M -r -s /bin/false spark-job-server # su -l -c "hdfs dfs -mkdir -p /user/spark-job-server ; hdfs dfs -chown -R spark-job-server /user/spark-job-server" hdfs # cp spark-job-server-0.6.2.3-KNIME_cdh-5.7.tar.gz /opt # cd /opt # tar -xvf spark-job-server-0.6.2.3-KNIME_cdh-5.7.tar.gz # ln -s spark-job-server-0.6.2.3-KNIME_cdh-5.7 ${LINKNAME} # chown -R spark-job-server:spark-job-server ${LINKNAME} spark-job-server-0.6.2.3-KNIME_cdh-5.7 |
3.4 开机启动
# ln -s /opt/${LINKNAME}/spark-job-server-init.d /etc/init.d/${LINKNAME} #chkconfig –levels 2345 ${LINKNAME} on |
3.5 编辑environment.conf
设置master,例如
master = "spark://ifrebdplatform1:7077"
设置Default settings for Spark contexts: context-settings
3.6 编辑设置settings.sh
设置SPARK_HOME,本例默认正确,不做改变
设置LOG_DIR,如果不用默认设置的目录的话
3.7 根据喜好编辑log4j-server.properties
3.8 启动spark job server
/etc/init.d/${LINKNAME} start
3.9 在knime 添加create spark context 节点测试链接
右击create spark context 节点,点击Execute执行
右击create spark context 节点,点击Spark Context,查看结果
未完待续……
原创文章,作者:3628473679,如若转载,请注明出处:https://blog.ytso.com/187235.html