I plan to install hive0.12
with hadoop-1.2.1
. After hadoop-1.2.1
installed,I also have configured hive0.12
. But when I use bin/hive
command I get:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.conf.Configuration.addDeprecation(Ljava/lang/String;Ljava/lang/String;)V
at org.apache.hadoop.hive.conf.HiveConf.<clinit>(HiveConf.java:77)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:639)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:623)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
how to solve the problem?
org.apache.hadoop.conf.Configuration.addDeprecation() method is added from hadoop 2.3.0. But as you wrote, your hadoop distribution is 1.2.1. In short, your hive installation and hadoop installation are not fit each other. Your hive installation must be rebuilded for hadoop 1.2.1.
This approach is the easist one. As hadoop 1.2.1 will not be updated anymore, upgrading your installation is feasible. Remove your current hadoop installation and install hadoop 2.5.1(the latest version, as of now.). For installing it, his tutorial is recommended.
You must builded your hive distribution with following command, when you installed it:
mvn clean install -Phadoop-2,dist
Try this command:
mvn clean install -Phadoop-1,dist
With this command, the output will be created in packaging/target/apache-hive-0.12-bin directory. Replace your current hive installtion with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With