The import org.apache.hadoop.mapreduce cannot be resolved
You don't have the appropriate dependency. What you have a actually is an Eclipse plugin for Hadoop development which it is totally different from Hadoop's Jar.
Have a look at the contents of hadoop-0.21.0-eclipse-plugin.jar , do you see any Hadoop core classes?
Check Hadoop Releases and add the real Hadoop dependency to your build tool (Maven, Ant, Gradle ...).
Something like if you are using Maven:
<dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> <version>2.2.0</version></dependency>
Try including the following external jars that you downloaded with Hadoop:
- $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.2.0.jar
- $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-common-2.2.0.jar
- $HADOOP_HOME/share/hadoop/common/hadoop-common-2.2.0.jar