How to successfully make a hive jdbc call inside a mapper in MR job where the cluster is secured by Kerberos

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 04:08:59

问题


I am writing a utility that is a map reduce job where the reducer makes calls to various databases and Hive is one of them.

Our cluster is kerberized. I am doing kinit before kicking off the MR job, but when the reducer runs, it fails with an error "No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)"

This indicates that it doesnt have a valid ticket. I tried to get a delegation token for Hive service in the MR driver, but it failed because the Hive service account is not allowed to impersonate my user.

I don't want to copy the keytab file onto all worker nodes, I want to somehow make either delegation token work or pass the credentials from MR driver to the mappers & reducers.

Can anyone suggest another method to get a valid ticket in the mappers & reducers to make Hive JDBC calls.

Thanks, Arun.

来源:https://stackoverflow.com/questions/35563927/how-to-successfully-make-a-hive-jdbc-call-inside-a-mapper-in-mr-job-where-the-cl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!