我想尝试在 Windows 上使用 Hadoop。我已将 Windows Azure HDInsight Preview 作为单个节点安装在我的 Windows 7 笔记本上。仪表板和节点已启动并运行,HDFS 正在运行。但是,当我运行 MapReduce 作业时,它会失败并显示错误消息“不是有效的 Inet 地址”:
c:\Hadoop\GettingStarted>powershell -ExecutionPolicy unrestricted /F runSamples.
ps1 w3c small java totalhits
Moved to trash: hdfs://localhost:8020/w3c/out
12/12/10 13:50:16 WARN mapred.JobClient: Use GenericOptionsParser for parsing th
e arguments. Applications should implement Tool for the same.
12/12/10 13:50:16 WARN util.NativeCodeLoader: Unable to load native-hadoop libra
ry for your platform... using builtin-java classes where applicable
12/12/10 13:50:16 WARN snappy.LoadSnappy: Snappy native library not loaded
12/12/10 13:50:16 INFO mapred.FileInputFormat: Total input paths to process : 1
12/12/10 13:50:17 INFO mapred.JobClient: Running job: job_201212101301_0001
12/12/10 13:50:18 INFO mapred.JobClient: map 0% reduce 0%
12/12/10 13:50:27 INFO mapred.JobClient: Job complete: job_201212101301_0001
12/12/10 13:50:27 INFO mapred.JobClient: Counters: 0
12/12/10 13:50:27 INFO mapred.JobClient: Job Failed: Job initialization failed:
java.net.UnknownHostException: Marc_Red_Data is not a valid Inet address
at org.apache.hadoop.net.NetUtils.verifyHostnames(NetUtils.java:569)
at org.apache.hadoop.mapred.JobInProgress.initTasks(JobInProgress.java:7
12)
at org.apache.hadoop.mapred.JobTracker.initJob(JobTracker.java:4214)
at org.apache.hadoop.mapred.JobInitializationPoller$JobInitializationThr
ead.initializeJobs(JobInitializationPoller.java:137)
at org.apache.hadoop.mapred.JobInitializationPoller$JobInitializationThr
ead.run(JobInitializationPoller.java:108)
Exception in thread "main" java.io.IOException: Job failed!
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1265)
at microsoft.hadoop.w3c.TotalHitsForPage.main(TotalHitsForPage.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
当我查看作业日志时,我可以看到 Marc_Red_Data 存在是以下属性:
<property><name>mapreduce.job.submithost</name><value>Marc_Red_Data</value></property>
不知何故,它得到了这个名字,但我不知道如何解决这个问题。有谁知道如何解决这个问题?