Configure User Impersonation for Flume
Configure impersonation for Flume agents to allow one user (the mapr super user) to access data and submit jobs on behalf of another user.
IMPORTANT This component is deprecated. Hewlett Packard
Enterprise recommends using an alternate product. For more information, see Discontinued Ecosystem Components.
- Complete the steps to enable Impersonation for the mapr Superuser.
- Configure the
flume.conf
file with the following properties:Property Value Comment <agent>.sinks.<sink>.type
HDFS <agent>.sinks.<sink>.hdfs.proxyUser
user ID of target user Can be any valid MapR user identity. <agent>.sinks.<sink>.hdfs.kerberosPrincipal
mapr/FQDN@REALM.COM The user component of the principal must be the username of the user running flume-ng
. Flume agents that use impersonation must run as the user mapr on the cluster.<agent>.sinks.<sink>.hdfs.kerberosKeytab
path to file If you are not using Kerberos to authenticate, this can the path to any valid file. If you are using Kerberos to authenticate, provide the path to your flume.keytab
file. - In the
flume-ng
file (/opt/mapr/flume/flume-<version>/bin/flume-ng
), add exportMAPR_IMPERSONATION_ENABLED=1
after theHADOOP_HOME
setting:- Example for Flume 1.6 and Later
-
if [ $HADOOP_VERSION == 1.0.3 ]; then export HADOOP_HOME=${BASEMAPR}/hadoop/hadoop-<current_version>/ else export HADOOP_HOME=${BASEMAPR}/hadoop/${HADOOP_VERSION}/ fi export MAPR_IMPERSONATION_ENABLED=1
- Example for Flume 1.5 and Earlier
-
HADOOP_VERSION=`readlink \`which hadoop\` | awk -F "/" '{print$5}'` export HADOOP_HOME=${BASEMAPR}/hadoop/${HADOOP_VERSION}/ export MAPR_IMPERSONATION_ENABLED=1