Support Questions
Find answers, ask questions, and share your expertise

Why does Hbase backed Hive tables fail after upgrade to Ambari 2.2?

Contributor

Abstract

Sharing a common issue in Ambari upgrade and its solution for Hortonworks Stack.

Issue

Hive handles the hive.aux.jars.path differenlty after upgrading to Ambari 2.2 (May impact prior versions also)

Symptom

This causes the errors related to missing hive-hbase-handler.jar and hbase-common.jar as they cannot be found anymore by hiveserver2.

Resolution

Edit the hive-en.sh from Advanced hive-env / hive-env template section of Ambari configsto add the hbase jars to the HIVE_AUX_JARS_PATH.

The output of hbase mapredcp command can be added to the HIVE_AUX_JARS_PATH variable, or saved into a file and sourced within the hive-env.sh template.

The output of hbase mapredcp command is as follows. (On HDP 2.3.2 system)

/usr/hdp/2.3.2.0-2950/hbase/lib/hbase-common-1.1.2.2.3.2.0-2950.jar:/usr/hdp/2.3.2.0-2950/hbase/lib/htrace-core-3.1.0-incubating.jar:/usr/hdp/2.3.2.0-2950/hbase/lib/hbase-server-1.1.2.2.3.2.0-2950.jar:/usr/hdp/2.3.2.0-2950/hbase/lib/netty-all-4.0.23.Final.jar:/usr/hdp/2.3.2.0-2950/hbase/lib/metrics-core-2.2.0.jar:/usr/hdp/2.3.2.0-2950/hbase/lib/guava-12.0.1.jar:/usr/hdp/2.3.2.0-2950/hbase/lib/protobuf-java-2.5.0.jar:/usr/hdp/2.3.2.0-2950/hbase/lib/hbase-protocol-1.1.2.2.3.2.0-2950.jar:/usr/hdp/2.3.2.0-2950/hbase/lib/hbase-client-1.1.2.2.3.2.0-2950.jar:/usr/hdp/2.3.2.0-2950/zookeeper/zookeeper-3.4.6.2.3.2.0-2950.jar:/usr/hdp/2.3.2.0-2950/hbase/lib/hbase-hadoop-compat-1.1.2.2.3.2.0-2950.jar
2 REPLIES 2

Contributor

@Mark Herring should we convert this to an article instead of a question?

I will ask @pbalasundaram to do it so he can get the points.