Created 10-13-2017 11:23 AM
I am tring to schedule a script in which a folder will be uploaded to hdfs and then it will be downloaded to machine on which oozie schedules the job.
From there that script will run eg: sh thatdownloadedscript.sh
in that script i have connected to hbase shell and just listed tables
but it gives me following error:
HBase Shell; enter 'help<RETURN>' for list of supported commands. Type "exit<RETURN>" to leave the HBase Shell Version 1.1.2.2.5.0.0-1245, r53538b8ab6749cbb6fdc0fe448b89aa82495fb3f, Fri Aug 26 01:32:27 UTC 2016 count 'DRM_Email1' ERROR: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) Here is some help for this command: Count the number of rows in a table. Return value is the number of rows. This operation may take a LONG time (Run '$HADOOP_HOME/bin/hadoop jar hbase.jar rowcount' to run a counting mapreduce job). Current count is shown every 1000 rows by default. Count interval may be optionally specified. Scan caching is enabled on count scans by default. Default cache size is 10 rows. If your rows are small in size, you may want to increase this parameter. Examples:
Created 10-13-2017 11:28 AM
Looks like your cluster is kerberized. You have to run kinit before running hbase shell.
kinit -kt /etc/security/keytabs/hbase.headless.keytab <princ>
Also, run your hbase shell in non interactive mode.
echo "list" | hbase shell -n
Thanks,
Aditya
Created 10-13-2017 11:36 AM
what is this file and what is that tag <princ>
Created 10-13-2017 11:42 AM
<princ> is the user principal. Here is the example if you don't know what is the value of princ.
[root@xxx ~]# klist -kte /etc/security/keytabs/hbase.headless.keytab Keytab name: FILE:/etc/security/keytabs/hbase.headless.keytab KVNO Timestamp Principal ---- ----------------- -------------------------------------------------------- 1 09/10/17 14:06:14 hbase@EXAMPLE.COM (aes128-cts-hmac-sha1-96) 1 09/10/17 14:06:14 hbase@EXAMPLE.COM (arcfour-hmac) 1 09/10/17 14:06:14 hbase@EXAMPLE.COM (des-cbc-md5) 1 09/10/17 14:06:14 hbase@EXAMPLE.COM (des3-cbc-sha1) 1 09/10/17 14:06:14 hbase@EXAMPLE.COM (aes256-cts-hmac-sha1-96)
Run klist and observer the output, here hbase@EXAMPLE.COM is the principal. Now you can run kinit as below
kinit -kt /etc/security/keytabs/hbase.headless.keytab hbase@EXAMPLE.COM
Created 10-13-2017 11:36 AM
What is that
<princ> sorry i am new to this
Created 10-13-2017 11:48 AM
it is saying permission denied
klist -kte /etc/security/keytabs/hbase.headless.keytab Keytab name: FILE:/etc/security/keytabs/hbase.headless.keytab klist: Permission denied while starting keytab scan
Created 10-13-2017 11:53 AM
Does the user have permissions to read the file. Check the permissions on the file or run it using sudo.
ls -l /etc/security/keytabs/hbase.headless.keytab
Created 10-13-2017 12:03 PM
ok so, suppose if i put a spark submit command in jar and that jar contains code to connect to hbase then how to pass this
Created 10-13-2017 12:25 PM
You have many ways to achieve this. Check this HCC link