MapR 5.0 Documentation : 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.  

  1. Complete the steps to enable Impersonation for the mapr Superuser.
  2. Configure the flume.conf file with the following properties:

    PropertyValueComment
    <agent>.sinks.<sink>.typeHDFS 
    <agent>.sinks.<sink>.hdfs.proxyUseruser ID of target userCan be any valid MapR user identity.
    <agent>.sinks.<sink>.hdfs.kerberosPrincipalmapr/FQDN@REALM.COMThe 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.kerberosKeytabpath to fileIf you are not using Kerberos to authenticate, this can be the path to any valid file. If you are using Kerberos to authenticate, provide the path to your flume.keytab file.
  3. In the the flume-ng file (/opt/mapr/flume/flume-<version>/bin/flume-ng), add export MAPR_IMPERSONATION_ENABLED=1 after the HADOOP_HOME setting: 

    • Flume 1.6 Example:

      if [ $HADOOP_VERSION == 1.0.3 ]; then
       export HADOOP_HOME=${BASEMAPR}/hadoop/hadoop-0.20.2/
      else
       export HADOOP_HOME=${BASEMAPR}/hadoop/${HADOOP_VERSION}/
      fi
      export MAPR_IMPERSONATION_ENABLED=1 
    • Flume 1.5 Example: 

      HADOOP_VERSION=`readlink \`which hadoop\` | awk -F "/" '{print$5}'`
      export HADOOP_HOME=${BASEMAPR}/hadoop/${HADOOP_VERSION}/
      export MAPR_IMPERSONATION_ENABLED=1