标签:sources cut word mil amp run option examples tin
Use the following steps to run a Spark Streaming job on a Kerberos-enabled cluster.
This should not be the kafka
or spark
service account.
key.conf
.The keytab and configuration files are distributed using YARN local resources. Because they reside in the current directory of the Spark YARN container, you should specify the location as ./v.keytab
.
The following example specifies keytab location ./v.keytab
for principal vagrant@example.com
:
KafkaClient { com.sun.security.auth.module.Krb5LoginModule required useKeyTab=true keyTab="./v.keytab" storeKey=true useTicketCache=false serviceName="kafka" principal="vagrant@EXAMPLE.COM"; };
spark-submit
command, pass the JAAS configuration file and keytab as local resource files, using the --files
option, and specify the JAAS configuration file options to the JVM options specified for the driver and executor:
spark-submit --files key.conf#key.conf,v.keytab#v.keytab --driver-java-options "-Djava.security.auth.login.config=./key.conf" --conf "spark.executor.extraJavaOptions=-Djava.security.auth.login.config=./key.conf" ...
For example, the KafkaWordCount example accepts PLAINTEXTSASL as the last option in the command line:
KafkaWordCount /vagrant/spark-examples.jar c6402:2181 abc ts 1 PLAINTEXTSASL
Running Spark Streaming Jobs on a Kerberos-Enabled Cluster
标签:sources cut word mil amp run option examples tin
原文地址:https://www.cnblogs.com/felixzh/p/10558559.html