Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Jethro setup requires that an OS user named 'jethro' will be defined on the Hadoop cluster name node.
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 and uninstall Jethro with a different Hadoop user, assuming that the Hadoop username to use is {user}.

Installing on a Non Kerberos-enabled Hadoop

  1. Follow the steps of creating directories on HDFS as described in the installation guide > Installing Jethro on Hadoop > Creating Directories on HDFS, but replace 'jethro' with your user name.
    Also, you'll need to change the permissions of the directories to 777 instead of 740. 
    This means that you should run these commands as Hadoop HDFS user:

    Code Block
    languagepowershell
    linenumberstrue
    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:

    Code Block
    languagepowershell
    linenumberstrue
    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. Un-comment the setting hdfs.username and set it like this:
    hdfs.username= {user}

Installing on a Kerberos-enabled Hadoop

  1. Follow the steps of creating directories on HDFS, but replace 'jethro' with your user name: 

    Code Block
    languagepowershell
    linenumberstrue
    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:

    Code Block
    languagepowershell
    linenumberstrue
    chown jethro:jethro {user}.hadoop.keytab
    chmod 600 {user}.hadoop.keytab
  5. Run kinit to enable HDFS access for your terminal session:

    Code Block
    languagepowershell
    linenumberstrue
    kinit -k -t ~/{user}.hadoop.keytab {user}
  6. Continue with normal instance creation.
  7. Create the keytab cache files for the Jethro services:

    Code Block
    languagepowershell
    linenumberstrue
    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. Un-comment the following setting and set the following values:

    Code Block
    languagepowershell
    linenumberstrue
    hdfs.username={user}
    hdfs.kerberos.server.ticket.cache.path=/home/jethro/{user}
    server.cachehdfs.kerberos.loader.ticket.cache.path=/home/jethro/{user}
    loader.cachehdfs.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 7.

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

Uninstalling

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 decided to delete an instance, follow the steps below before running the command:

Code Block
languagepowershell
linenumberstrue
JethroAdmin delete-instance {instance-name}


Non Kerberos-Enabled Hadoop

To uninstall Jethro from a non Kerberos-enabled Hadoop:

  1. Log in as Hadoop HDFS or {user} user.
  2. Run the following command:

    Code Block
    languagepowershell
    linenumberstrue
    hadoop fs -chmod 777 /user/{user}

Kerberos-Enabled Hadoop

To uninstall Jethro from a non Kerberos-enabled Hadoop:

  1. Run kinit to enable HDFS access for your terminal session:

    Code Block
    languagepowershell
    linenumberstrue
    kinit -k -t ~/{user}.hadoop.keytab {user}
  2. To delete the instance, run:

    Code Block
    languagepowershell
    linenumberstrue
    JethroAdmin delete-instance {instance name}

...