运行Map减少程序时的大数据和hadoop异常

时间:2015-05-27 12:25:47

标签: java hadoop mapreduce

我从互联网上获得了WordCount.java代码,我尝试在包含必要的库之后在eclipse中运行它。但代码抛出了这个异常:

2015-05-27 17:48:24,759 WARN  util.NativeCodeLoader     
(NativeCodeLoader.java:<clinit>(62)) - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

Exception in thread "main" java.io.IOException: Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses.
at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:120)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:82)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:75)
at org.apache.hadoop.mapred.JobClient.init(JobClient.java:470)
at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:449)
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:832)
at MapReduce.WordCount.main(WordCount.java:57)

你能告诉我这意味着什么,我该如何解决? 我非常了解大数据,Hadoop和地图缩减程序,所以请详细解释。谢谢!

1 个答案:

答案 0 :(得分:0)

也许缺少原生图书馆。在$ {HADOOP_HOME} / lib / native中,有一些执行文件,尝试将这些文件添加到您的配置中。