Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Exception while creating HCatTable - Cause : org.apache.thrift.transport.TTransportException

Highlighted

Exception while creating HCatTable - Cause : org.apache.thrift.transport.TTransportException

New Contributor

This is my code.


String krb5ConfigFilePath = fileService.getAbsolutePath("config/" + env + "/" + HIVEConfig.getKrb5ConfigFile());


System.setProperty("sun.security.krb5.debug", "false");

System.setProperty("java.security.krb5.conf", krb5ConfigFilePath);

System.setProperty("java.security.krb5.realm", HIVEConfig.getProperty("krb5.realm"));

System.setProperty("java.security.krb5.kdc", HIVEConfig.getProperty("krb5.kdc"));



Configuration config = new Configuration();

config.addResource(new ReaderInputStream(fileService.loadAsReader("config/" + env + "/hive-site.xml")));

config.set("hadoop.security.authentication", "kerberos");


UserGroupInformation.setConfiguration(config);

UserGroupInformation.loginUserFromKeytab(HIVEConfig.getKeytabPrinciple(), fileService.getKeytabPath());


hcatClient = HCatClient.create(config);

HCatTable hcat = hcatClient.getTable("db_name","db_table");


I get the exception when the hCat gets created.

org.apache.hive.hcatalog.common.HCatException : 9001 : Exception occurred while processing HCat request : TException while fetching table.. Cause : org.apache.thrift.transport.TTransportException


Jar's that i use

commons-configuration-1.6.jar

hadoop-common.jar

hcatalog-core-0.12.0.jar

hive-common-2.1.1.jar

hive-hcatalog-core-2.1.1.jar

hive-hcatalog-core.jar

hive-hcatalog-server-extensions-1.2.1000.2.6.5.0-292.jar

hive-hcatalog-streaming-1.2.1000.2.6.5.0-292.jar

hive-hcatalog-streaming.jar

hive-metastore-2.1.1.jar

hive-webhcat-java-client-2.1.1.jar

libthrift-0.10.0.jar

libthrift-0.8.0-javadoc.jar

pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar