Support Questions

Find answers, ask questions, and share your expertise

hive upgrade tool failed at hdp 3 upgrade

avatar
Explorer

I'm upgrading from hdp 2.6 to 3 The ambari upgrade from 2.6.2 to 2.7 went fine, I'm following the documentation, I'm at the step 4 on the page https://docs.hortonworks.com.s3.amazonaws.com/HDPDocuments/Ambari-2.7.0.0/bk_ambari-upgrade/content/... I'm getting:

$JAVA_HOME/bin/java -Djavax.security.auth.useSubjectCredsOnly=false -cp /usr/hdp/2.6.0.3-8/hive2/lib/derby-10.10.2.0.jar:/usr/hdp/2.6.0.3-8/hive2/lib/*:/usr/hdp/2.6.0.3-8/hadoop/*:/usr/hdp/2.6.0.3-8/hadoop/lib/*:/usr/hdp/2.6.0.3-8/hadoop-mapreduce/*:/usr/hdp/2.6.0.3-8/hadoop-mapreduce/lib/*:/usr/hdp/2.6.0.3-8/hadoop-hdfs/*:/usr/hdp/2.6.0.3-8/hadoop-hdfs/lib/*:/usr/hdp/2.6.0.3-8/hadoop/etc/hadoop/*:/tmp/hive-pre-upgrade-3.1.0.3.0.0.0-1634.jar: org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool -execute                 SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.6.0.3-8/hive2/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.6.0.3-8/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
2018-07-26T13:34:30,051 INFO [main] org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool - Starting with execute=true, location=.
2018-07-26T13:34:30,056 INFO [main] org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool - Using Hive Version: 2.1.0.2.6.0.3-8 build: 2.1.0.2.6.0.3-8 from 21903e6a60f3f4f3de63731c0c7cbec2cb2e265e by jenkins source checksum 7af682f1761a67fa9e6f01d987cd6003
2018-07-26T13:34:30,094 INFO [main] org.apache.hadoop.hive.conf.HiveConf - Found configuration file null
2018-07-26T13:34:31,415 WARN [main] org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2018-07-26T13:34:31,523 INFO [main] org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool - Creating metastore client for PreUpgradeTool
2018-07-26T13:34:31,567 ERROR [main] org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool - PreUpgradeTool failed
java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1654) ~[hive-exec-2.1.0.2.6.0.3-8.jar:2.1.0.2.6.0.3-8]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:83) ~[hive-exec-2.1.0.2.6.0.3-8.jar:2.1.0.2.6.0.3-8]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:133) ~[hive-exec-2.1.0.2.6.0.3-8.jar:2.1.0.2.6.0.3-8]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:89) ~[hive-exec-2.1.0.2.6.0.3-8.jar:2.1.0.2.6.0.3-8]
        at org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool.getHMS(PreUpgradeTool.java:190) ~[hive-pre-upgrade-3.1.0.3.0.0.0-1634.jar:3.1.0.3.0.0.0-1634]
        at org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool.prepareAcidUpgradeInternal(PreUpgradeTool.java:204) ~[hive-pre-upgrade-3.1.0.3.0.0.0-1634.jar:3.1.0.3.0.0.0-1634]
        at org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool.main(PreUpgradeTool.java:148) [hive-pre-upgrade-3.1.0.3.0.0.0-1634.jar:3.1.0.3.0.0.0-1634]
Caused by: java.lang.NoSuchMethodException: org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(org.apache.hadoop.hive.conf.HiveConf, java.lang.Boolean)
        at java.lang.Class.getConstructor0(Class.java:3082) ~[?:1.8.0_111]
        at java.lang.Class.getDeclaredConstructor(Class.java:2178) ~[?:1.8.0_111]
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1650) ~[hive-exec-2.1.0.2.6.0.3-8.jar:2.1.0.2.6.0.3-8]
        ... 6 more
Exception in thread "main" java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1654)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:83)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:133)


        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:89)
        at org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool.getHMS(PreUpgradeTool.java:190)
        at org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool.prepareAcidUpgradeInternal(PreUpgradeTool.java:204)
        at org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool.main(PreUpgradeTool.java:148)
Caused by: java.lang.NoSuchMethodException: org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(org.apache.hadoop.hive.conf.HiveConf, java.lang.Boolean)
        at java.lang.Class.getConstructor0(Class.java:3082)
        at java.lang.Class.getDeclaredConstructor(Class.java:2178)
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1650)
        ... 6 more

I kinited as hive, running this as root. After some googling I found that having more than 1 version of org.apache.hadoop.hive.metastore.HiveMetaStoreClient might be an issue, so I did this:

# grep -r 'org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>' /usr/hdp/2.6.0.3-8/hive2/lib/derby-10.10.2.0.jar  /usr/hdp/2.6.0.3-8/hive2/* /usr/hdp/2.6.0.3-8/hadoop/* /usr/hdp/2.6.0.3-8/hadoop-mapreduce/* /usr/hdp/2.6.0.3-8/hadoop-hdfs/* /usr/hdp/2.6.0.3-8/hadoop/etc/hadoop/* /tmp/hive-pre-upgrade-3.1.0.3.0.0.0-1634.jar /usr/hdp/2.6.0.3-8/hive/conf/*
[root@lsp7148c tmp]# grep -r 'org.apache.hadoop.hive.conf.HiveConf' /usr/hdp/2.6.0.3-8/hive2/lib/derby-10.10.2.0.jar  /usr/hdp/2.6.0.3-8/hive2/* /usr/hdp/2.6.0.3-8/hadoop/* /usr/hdp/2.6.0.3-8/hadoop-mapreduce/* /usr/hdp/2.6.0.3-8/hadoop-hdfs/* /usr/hdp/2.6.0.3-8/hadoop/etc/hadoop/* /tmp/hive-pre-upgrade-3.1.0.3.0.0.0-1634.jar /usr/hdp/2.6.0.3-8/hive/conf/*
Binary file /usr/hdp/2.6.0.3-8/hive2/jdbc/hive-jdbc-2.1.0.2.6.0.3-8-standalone.jar matches
Binary file /usr/hdp/2.6.0.3-8/hive2/lib/hive-exec-2.1.0.2.6.0.3-8.jar matches
Binary file /usr/hdp/2.6.0.3-8/hive2/lib/hive-common-2.1.0.2.6.0.3-8.jar matches

I tried remove 2 out of 3 of these files but that didn't change anything.

Any idea on how to continue would be appreciated.

thanks in advance!

1 ACCEPTED SOLUTION

avatar

I have the same issue. it seems to be ralated to HIVE-15081 (https://issues.apache.org/jira/browse/HIVE-15081) which was fixed in HDP 2.6.2. I am using HDP 2.6.1. Is there a way to apply this patch?

View solution in original post

12 REPLIES 12

avatar
New Contributor

Unfortunately, I cannot confirm it. I had the chance and deleted my HDP 2.6.x installation and reinstalled the 3.0.0. Sorry.

avatar
Explorer

Hi, yes, I upgraded from HDP 2.6.5

avatar

In the meantime Hortonworks has reflected this limitation in the upgrade documentation:

Important
Ambari 2.7 only supports fully managing a HDP 3.0 cluster. If you are running any other HDP version, you must first upgrade to HDP 2.6 using Ambari 2.6. You must first upgrade to HDP 2.6.5 if you use Hive. Then, upgrade to Ambari 2.7 and use it to upgrade your cluster to HDP 3.0."

https://docs.hortonworks.com/HDPDocuments/Ambari-2.7.0.0/bk_ambari-upgrade/content/ambari_upgrade_gu...