Introduction
This is a program to run the other programs in Kerberos context. Note that KUtil honors the conf properties loaded into it and will not run the Child utility/program in Kerberos context if the property hadoop.security.authentication != kerberos
Usage
- Compile the program if not done.
$ unzip jdbcc.zip
$
cd
jdbcc
$
export
INFA_HOME=
/path/to/infa/home
$ .
/compile
.sh
- Know the main class name of the program you want to run. In this example, we have assumed it as "JDBCClient". We are using this JDBCClient to connect to a secure Hive DB.
- Let the KUtil run your program in Hadoop Kerberos context.
$ java -
cp
. KUtil \
-u <kerberos-principal-name> \
-k <
/path/to/keytab/file
> \
JDBCClient \
<args needed
for
JDBCClient>
Other options available
-cf <
/path/to/conf/file
> : Load hadoop configuration files
-cv <key=value> : Load config from key value pair
-i <impersonationUser> : Do the operations as impersonationUser
Examples
- Load the config file present in /tmp/abc.xml. (Absolute path)
$ java -
cp
. KUtil -cf
/tmp/abc
.xml ...
- Use the config "foo.bar.baz=tmp".
$ java -
cp
. KUtil -cv foo.bar.baz=tmp ...
Comments