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

Hive 2.1 in hdp 2.5

Highlighted

Hive 2.1 in hdp 2.5

Explorer

Hi,

I am in the process of upgrading hdp from 2.6 to 3.0.1, but got stuck with hive version 1.2. Getting following error from PreUpgradetool

18/10/23 17:55:19 ERROR acid.PreUpgradeTool: PreUpgradeTool failed java.lang.IllegalStateException: preUpgrade requires Hive 2.x. Actual: 1.2.1000

In ambari both YARN pre-emption and Hive Interactive are greyed so unable to change them.

My beeline command is as follows and it works fine and loads hive 1.2.1000

beeline -u "jdbc:hive2://data1.dev.local:10000/default;"

How can I upgrade to hive 2.0+?

At the moment I don't have ACID tables so do I still need to go through preUpgrade tool?

will version upgrade not automatically upgrade from 1.2 to 3.0?

Regards

MB

1 REPLY 1

Re: Hive 2.1 in hdp 2.5

Explorer

I have the same issue

[root@sandbox-hdp /]# su - hive
Last login: Tue Jan 22 20:22:46 UTC 2019 on pts/0

[hive@sandbox-hdp ~]$ export STACK_VERSION=`hdp-select status hive-server2 | awk '{ print $3; }'`
[hive@sandbox-hdp ~]$ echo $STACK_VERSION
2.6.5.0-292

[hive@sandbox-hdp ~]$ export JAVA_HOME=$(java -XshowSettings:properties -version &> /tmp/java_out; cat /tmp/java_out | awk '/java.home/ {print $3}')
[hive@sandbox-hdp ~]$ echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre

hive@sandbox-hdp ~]$ $JAVA_HOME/bin/java -cp /usr/hdp/$STACK_VERSION/hive2/lib/derby-10.10.2.0.jar:/usr/hdp/$STACK_VERSION/hive2/lib/*:/usr/hdp/$STACK_VERSION/hadoop/*:/usr/hdp/$STACK_VERSION/hadoop/lib/*:/usr/hdp/$STACK_VERSION/hadoop-mapreduce/*:/usr/hdp/$STACK_VERSION/hadoop-mapreduce/lib/*:/usr/hdp/$STACK_VERSION/hadoop-hdfs/*:/usr/hdp/$STACK_VERSION/hadoop-hdfs/lib/*:/usr/hdp/$STACK_VERSION/hadoop/etc/hadoop/*:/tmp/hive-pre-upgrade-3.1.0.3.1.0.0-78.jar:/usr/hdp/$STACK_VERSION/hive/conf/conf.server org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool > /var/log/hive/pre_upgrade_hdp31.log
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.6.5.0-292/hive2/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.6.5.0-292/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]
Exception in thread "main" java.lang.IllegalStateException: preUpgrade requires Hive 1.x.  Actual: 2.1.2000
	at org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool.main(PreUpgradeTool.java:147)