Installing Java and other tools

Hadoop was built using Java, so Java is required before installing Hadoop.

Getting ready

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.

  1. Check if OpenJDK has been installed in the system with the command:
    rpm –qa | grep openjdk


    If no output is given, it means OpenJDK has not been installed.

  2. If Java has been installed in the system, we can check its version with:
    java -version
  3. 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 ...

Get Hadoop Operations and Cluster Management Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.