前言
本文总结如何利用Submarin集成Spark-Ranger,通过ranger控制Spark SQL的权限
前提
已经安装了Spark、Hive、kerberos、Ranger,并且Hive已经集成了Ranger,本文环境基于Ambari
submarine-spark-security 插件打包
官网文档https://submarine.apache.org/docs/userDocs/submarine-security/spark-security/README (0.6.0版本)
1 | git clone https://github.com/apache/submarine |
当前master分支(0.7.0)已经没有submarine-spark-security模块了,需要切换到tag:release-0.6.0-RC0
然后利用mvn命令打包
1 | mvn clean package -Dmaven.javadoc.skip=true -DskipTests -pl :submarine-spark-security -Pspark-2.4 -Pranger-1.2 |
打的submarine-spark-security-0.6.0.jar在目录submarine\submarine-security\spark-security\target
然后将submarine-spark-security-0.6.0.jar上传到$SPARK_HOME/jars
more >>