You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Suresh Subbiah (JIRA)" <ji...@apache.org> on 2015/11/12 20:35:11 UTC

[jira] [Commented] (TRAFODION-1621) Improve sqenvcom.sh to pick up Hive jars and hive-site.xml from wherever Hive expects them to be

    [ https://issues.apache.org/jira/browse/TRAFODION-1621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15002732#comment-15002732 ] 

Suresh Subbiah commented on TRAFODION-1621:
-------------------------------------------

Symptom of the problem 

>>select * from hive.hive."test";
 
*** ERROR[1190] Failed to initialize Hive metadata. Call to HiveClient_JNI::init() returned error (5). Cause:
java.lang.NoClassDefFoundError: org/apache/hadoop/hive/conf/HiveConf

Workaround : Find the location of hive-common*.jar. It should typically be under /usr directory
find location of hive-site.xml. This should be under /etc typically.
create a string of form CLASSPATH=<current-classpath>:<all-jars-in-hive-jar-directory>:<directory-containing-hive-site.xml>
edit $MY_SQROOT/etc/ms.env and replace current CLASSPATH definition with the new one
copy ms.env to all nodes in cluster with pdcp $MY_NODES ms.env $MY_SQROOT/etc/ms.env
sqstop and sqstart

All jars in hive jar directory must be specified with fullpath name, including filename. No wildcard is allowed.
If hive-site.xml is present in 2 places, find out the more recent one. In this problem report /etc/hive/conf was overridden by /etc/hive/conf.server



> Improve sqenvcom.sh to pick up Hive jars and hive-site.xml from wherever Hive expects them to be
> ------------------------------------------------------------------------------------------------
>
>                 Key: TRAFODION-1621
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1621
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: installer
>    Affects Versions: 1.3-incubating
>            Reporter: Suresh Subbiah
>
> When Hive jars or hive-site.xml is in a location other than what sqenvcom.sh is expecting, then these jars are not added to the classpath. This causes Hive to be not accessible from Trafodion.
> For example in HDP 2.2.8 Hive jar locations were moved to  /usr/hdp/2.2.8.0-3150/hive/lib. hive-site.xml is also at /etc/hive/conf.server instead of the typical /etc/hive/conf.
> A possible fix is to programmatically find the location of hive jars and hive-site.xml from sqenvcom.sh 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)