简体   繁体   中英

org.apache.hadoop.mapreduce Not Found— Hadoop

I am working on Hadoop. I need to process images using the power of Big Data. To play around with it, I have referred this example . I need to create Sequence file prior working on the image duplicates. So i used this source code for creating sequence file.

When i compile this in Hadoop environment i am missing some packages. I am using Hadoop-0.18.0.

/tmp/BinaryFilesToHadoopSequenceFile.java:12: package org.apache.hadoop.mapreduce does not exist
import org.apache.hadoop.mapreduce.Job;
                                  ^
/tmp/BinaryFilesToHadoopSequenceFile.java:13: package org.apache.hadoop.mapreduce does not exist
import org.apache.hadoop.mapreduce.Mapper;
                                  ^
/tmp/BinaryFilesToHadoopSequenceFile.java:14: package org.apache.hadoop.mapreduce.lib.input does not exist
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
                                            ^
/tmp/BinaryFilesToHadoopSequenceFile.java:15: package org.apache.hadoop.mapreduce.lib.input does not exist
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
                                            ^
/tmp/BinaryFilesToHadoopSequenceFile.java:16: package org.apache.hadoop.mapreduce.lib.output does not exist
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
                                             ^
/tmp/BinaryFilesToHadoopSequenceFile.java:17: package org.apache.hadoop.mapreduce.lib.output does not exist
import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat;

Whether am i doing anything wrong?? Or is it not available in 0.18.0. I know this version is very old version. Due to some restrictions i am using an already configured VM to work with ,which is having this version of hadoop. Any Help would be appreciated!!

I can't easily find a copy of 0.18.0 to download anymore, but it looks like the mapreduce package was not available in this version (or 0.19):

It's definately in 0.20.2 though

尝试使用0.20.X hadoop核心软件包版本来使用org.apache.hadoop.mapreduce。*类

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM