Connect to Kerborised Hbase tables from Java

可紊 提交于 2020-01-06 05:02:58

问题


I am using below configuration to connect from java code to kerborised hbase tables.

config.set("hbase.zookeeper.quorum", zookeeperHosts);
config.set("hbase.zookeeper.property.clientPort", zookeeperPort);
config.set("hadoop.security.authentication", "kerberos");
config.set("hbase.security.authentication", "kerberos");
UserGroupInformation.setConfiguration(config);
UserGroupInformation.loginUserFromKeytab(ZOOKEEPER_PRINCIPAL,ZOOKEEPER_KEYTAB)

I am trying to Get data from Hbase . On running java code ,after creating Connection and Table , the code get paused with out showing any errors . If I remove the kerberose part and run it in a non kerborised env , I am able to connect to Hbase and Get tables . I have gone through this link , but didn't work.

来源:https://stackoverflow.com/questions/53791999/connect-to-kerborised-hbase-tables-from-java

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