Hadoop was built using Java, so Java is required before installing Hadoop.
Under Linux, OpenJDK provides an open source Java implementation. But if we use OpenJDK for Hadoop, it will cause low level and hard to tackle problems. So, OpenJDK is not recommended for the Hadoop installation. Instead, Java from Oracle is recommended.
Check if OpenJDK has been installed in the system with the command:
rpm –qa | grep openjdk
If Java has been installed in the system, we can check its version with:
java -version
If OpenJDK is used, we should be able to get output similar to the following:
java version "1.7.0_09-icedtea" OpenJDK Runtime Environment (fedora-2.3.4.fc17-x86_64) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
After confirming whether we are using OpenJDK, we need to remove the package and reinstall the version downloaded from Oracle's official website.
To remove OpenJDK, we...