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.
rpm –qa | grep openjdk
If no output is given, it means OpenJDK has not been installed.
java version "1.7.0_09-icedtea" OpenJDK Runtime Environment ...