You can configure Spark Thrift server to use Kerberos for its communications with various components on a secure MapR cluster if necessary.
To enable Kerberos authentication:
hive.keytab file must be owned and readable only by the
mapr user.FQDN@REALM is case-sensitive. # kadmin
: addprinc -randkey mapr/<FQDN@REALM>
: ktadd -k /opt/mapr/conf/hive.keytab mapr/<FQDN@REALM>
hive-site.xml on each node where
HiveServer2 is installed:
| Property | Value |
|---|---|
| hive.server2.authentication | KERBEROS |
| hive.server2.authentication.kerberos.principal | mapr/FQDN@REALM
(where |
| hive.server2.authentication.kerberos.keytab | /opt/mapr/conf/mapr.keytab
(where |
<property>
<name>hive.server2.authentication</name>
<value>KERBEROS</value>
<description>authenticationtype</description>
</property>
<property>
<name>hive.server2.authentication.kerberos.principal</name>
<value>mapr/FQDN@REALM</value>
<description>Spark Thrift server principal. If _HOST is used as the FQDN portion,
it will be replaced with the actual hostname of the running instance.
</description>
</property>
<property>
<name>hive.server2.authentication.kerberos.keytab</name>
<value>/opt/mapr/conf/mapr.keytab</value>
<description>Keytab file for Spark Thrift server principal</description>
</property>env.sh
(/opt/mapr/conf/env.sh) on each node where HiveServer2 is installed:
if [ "$MAPR_SECURITY_STATUS" = "true" ];. However, you should make
the changes in the /opt/mapr/conf/env_override.sh file. For more
information, see About env_override.sh. | Existing Configuration | Required Configuration |
|---|---|
MAPR_HIVE_SERVER_LOGIN_OPTS="-Dhadoop.login=maprsasl_keytab"
|
|
sbin is in your Spark
directory at /opt/mapr/spark/spark-<spark_version>/. mapr) should start Spark Thrift server. Then, process identifier
(PID) files will be owned by this user, and impersonation support (where applicable)
will function correctly../sbin/stop-thriftserver.sh
./sbin/start-thriftserver.sh