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
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 language powershell linenumbers true 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}
Continue with the normal install and creation of an instance.
After creating the instance and before starting the server, run the following commands as Hadoop HDFS user:
Code Block language powershell linenumbers true hadoop fs -chown -R {user} /user/{user} hadoop fs –chmod 740 /user/{user} hadoop fs –chmod 740 /user/{user}/instances
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
Follow the steps of creating directories on HDFS, but replace 'jethro' with your user name:
Code Block language powershell linenumbers true 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}
- Continue with the normal install.
- Generate a keytab file for {user} (named {user}.hadoop.keytab) and copy it to the Jethro server machine. Place the file in /home/jethro.
Change the ownership and permissions of the keytab file to user Jethro:
Code Block language powershell linenumbers true chown jethro:jethro {user}.hadoop.keytab chmod 600 {user}.hadoop.keytab
Run kinit to enable HDFS access for your terminal session:
Code Block language powershell linenumbers true kinit -k -t ~/{user}.hadoop.keytab {user}
- Continue with normal instance creation.
Create the keytab cache files for the Jethro services:
Code Block language powershell linenumbers true 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}
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 language powershell linenumbers true 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
- 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 | ||||
---|---|---|---|---|
| ||||
JethroAdmin delete-instance {instance-name} |
Non Kerberos-Enabled Hadoop
To uninstall Jethro from a non Kerberos-enabled Hadoop:
- Log in as Hadoop HDFS or {user} user.
Run the following command:
Code Block language powershell linenumbers true hadoop fs -chmod 777 /user/{user}
Kerberos-Enabled Hadoop
To uninstall Jethro from a non Kerberos-enabled Hadoop:
Run kinit to enable HDFS access for your terminal session:
Code Block language powershell linenumbers true kinit -k -t ~/{user}.hadoop.keytab {user}
To delete the instance, run:
Code Block language powershell linenumbers true JethroAdmin delete-instance {instance name}
...