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}.
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:
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:
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}
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} |
Change the ownership and permissions of the keytab file to user Jethro:
chown jethro:jethro {user}.hadoop.keytab chmod 600 {user}.hadoop.keytab |
Run kinit to enable HDFS access for your terminal session:
kinit -k -t ~/{user}.hadoop.keytab {user} |
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} |
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:
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 |
Now you can start the server and continue with loading data.
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:
JethroAdmin delete-instance {instance-name} |
To uninstall Jethro from a non Kerberos-enabled Hadoop:
Run the following command:
hadoop fs -chmod 777 /user/{user} |
To uninstall Jethro from a non Kerberos-enabled Hadoop:
Run kinit to enable HDFS access for your terminal session:
kinit -k -t ~/{user}.hadoop.keytab {user} |
To delete the instance, run:
JethroAdmin delete-instance {instance name} |