<iframe src="//www.googletagmanager.com/ns.html?id=GTM-TT4L49" height="0" width="0" style="display:none;visibility:hidden">
Jethro - We Make Real-Time Business Intelligence Work on Hadoop

Blog

How to Install Jethro with a Different Hadoop User

By Arthur Adams on March 21, 2016

Share

The regular Jethro setup requires that an OS user named “jethro” will be defined on the Hadoop cluster namenode.

However, in some cases it may be not possible to define new users in Hadoop and instead, a user would want to install Jethro using an existing user.

The following document describes the steps required to install jethro with a different Hadoop user.

Let’s say that the Hadoop username to use is <user>

Install

Non Kerberos enabled Hadoop

  1. Follow the steps of creating directories on hdfs as described in the Jethro installation guide , but replace jethro with your user name. Also, change the permissions of the directories to 777 instead of 740.
    This means that you should run these commands as Hadoop hdfs user:
           hadoop fs -mkdir /user/<user>
    hadoop fs –mkdir /user/<user>/instances
    hadoop fs -chmod –R 777 /user/<user>
    hadoop fs -chown -R <user> /user/<user>
  2. Continue with the normal install and creation of an instance.
  3. After creating the instance and before starting the server,  run the following commands as Hadoop hdfs user:
           hadoop fs -chown -R <user> /user/<user>
    hadoop fs –chmod 740 /user/<user>
    hadoop fs –chmod 740 /user/<user>/instances
  4. Edit the file /opt/jethro/instances/<instance-name>/local-conf.ini, replacing <instance-name> with the name of the instance you created.  Uncomment the setting hdfs.username and set it like this:
           hdfs.username=&lt;user&gt;

Kerberos enabled hadoop

  1. Follow the steps of creating directories on hdfs, but replace jethro with your user name:
           hadoop fs -mkdir /user/<user>
           hadoop fs –mkdir /user/<user>/instances
          hadoop fs -chmod –R 740 /user/<user>
          hadoop fs -chown -R <user> /user/<user>
  2. Continue with the normal install.
  3. Generate a keytab file for <user> (named <user>.hadoop.keytab) and copy it to the Jethro server machine.  Place the file in /home/jethro.
  4. Change the ownership and permissions of the keytab file to user Jethro:
           chown jethro:jethro <user>.hadoop.keytab
    chmod 600 <user>.hadoop.keytab
  5. Run kinit to enable HDFS access for your terminal session:
           kinit -k -t ~/&lt;user&gt;.hadoop.keytab &lt;user&gt;
  6. Continue with normal instance creation.
  7. Create the keytab cache files for the Jethro services:
           kinit -k -t <user>.hadoop.keytab -c <user>.server.cache <user>       kinit -k -t <user>.hadoop.keytab -c <user>.maint.cache <user>
    kinit -k -t <user>.hadoop.keytab -c <user>.loader.cache <user>
  8. Edit the file /opt/jethro/instances/<instance-name>/local-conf, replacing <instance-name> with the name of the instance you created.Uncomment the following setting and set the following values:
    hdfs.username=<user>
    hdfs.kerberos.server.ticket.cache.path=/home/jethro/<user>.server.cache
    hdfs.kerberos.loader.ticket.cache.path=/home/jethro/<user>.loader.cache
    hdfs.kerberos.maint.ticket.cache.path=/home/jethro/<user>.maint.cache
  9. You can run kdestroy in order to remove the ticket created for the terminal session in step 5

Now you can start the server and continue with loading data.

 

Uninstall

When uninstalling Jehtro, you need to either detach or delete the Jethro instances first.

Deleting an instance involves in deleting the data stored on Hadoop.

If you choose to delete the instance, follow these steps before running the JethroAdmin delete-instance <instance-name> command:

Non Kerberos enabled Hadoop

Run this command as Hadoop hdfs or <user> user:

        hadoop fs -chmod 777 /user/&lt;user&gt;

Kerberos enabled hadoop

Run kinit to enable HDFS access for your terminal session:

       kinit -k -t ~/<user>.hadoop.keytab <user>

Now you can run the command JethroAdmin delete-instance <instance name> to delete the instance.