When I was configuring Hive 3.0.0 in Hadoop 3.2.1 environment, I encountered the following error:

Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V

Root cause

This issue happened because guava lib version is different in Hive lib folder and Hadoop shared folder.  

To fix this, we need to ensure the versions are consistent.

Fix the issue

Follow these steps to fix it:

  • Go to $HIVE_HOME (%HIVE_HOME%)/lib folder and find out the version of guava. For Hive 3.0.0, it is guava-19.0.jar.
  • Go to $HADOOP_HOME (%HADOOP_HOME%)/share/hadoop/common/lib folder and out the version of guava.  For Hadoop 3.2.1, the version is guava-27.0-jre.jar.
  • If they are not same (which is true for this case), delete the older version and copy the newer version in both. In this case, delete guava-19.0.jar in Hive lib folder, and then copy guava-27.0-jre.jar from Hadoop folder to Hive.

Issue resolved!

If your Hive and Hadoop versions are not consistent, you may encounter other similar strange errors like this. The common approach to fix them is to make sure JAR file versions are the same. Typically if you align Hadoop and Hive versions, these issues wouldn't happen. 

info Last modified by Raymond at 4 months ago copyright This page is subject to Site terms.

More from Kontext

local_offer linux local_offer hadoop local_offer hdfs local_offer yarn

visibility 21
thumb_up 0
access_time 2 days ago

This article provides step-by-step guidance to install Hadoop 3.3.0 on Linux such as Debian, Ubuntu, Red Hat, openSUSE, etc.  Hadoop 3.3.0 was released on July 14 2020. It is the first release of Apache Hadoop 3.3...

open_in_new Hadoop

Install Hadoop 3.3.0 on Windows 10 Step by Step Guide

local_offer windows10 local_offer hadoop local_offer yarn local_offer hdfs

visibility 90
thumb_up 0
access_time 4 days ago

This detailed step-by-step guide shows you how to install the latest Hadoop v3.3.0 on Windows 10. It leverages Hadoop 3.3.0 winutils tool and WSL is not required. This version was released on July 14 2020. It is the first release of Apache Hadoop 3.3 line. There are significant changes compared with Hadoop 3.2.0, such as Java 11 runtime support, protobuf upgrade to 3.7.1, scheduling of opportunistic containers, non-volatile SCM support in HDFS cache directives, etc.

open_in_new Hadoop

local_offer hadoop local_offer windows10

visibility 27
thumb_up 0
access_time 4 days ago

Winutils is required when installing Hadoop on Windows environment. Hadoop 3.3.0 winutils I've compiled Hadoop 3.3.0 on Windows 10 using CMake and Visual Studio (MSVC x64). Follow these two steps to download it: ...

open_in_new Hadoop

Install Hadoop 3.3.0 on Windows 10 using WSL

local_offer linux local_offer hadoop local_offer WSL

visibility 41
thumb_up 0
access_time 5 days ago

Hadoop 3.3.0 was released on July 14 2020. It is the first release of Apache Hadoop 3.3 line. There are significant changes compared with Hadoop 3.2.0, such as Java 11 runtime support, protobuf upgrade to 3.7.1, scheduling of opportunistic containers, non-volatile SCM support in HDFS ca...

open_in_new Hadoop

comment Comments (0)

comment Add comment

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

No comments yet.

Kontext Column

Created for everyone to publish data, programming and cloud related articles. Follow three steps to create your columns.


Learn more arrow_forward