Question

I want to try and work with Hadoop on Windows. I have installed the Windows Azure HDInsight Preview as a single node on my Windows 7 notebook. Dashboard and nodes are up and running and HDFS is working. However, when I run a MapReduce job, it fails with an error message " is not a valid Inet address":

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)

When I look in the joblog I can see that Marc_Red_Data is present is the following property:

<property><name>mapreduce.job.submithost</name><value>Marc_Red_Data</value></property>

Somehow it gets the name, but I am at a loss as to how to resolve this. Does anyone have an idea how this can be resolved?

Était-ce utile?

La solution

Hadoop doesn't like it if there are underscores in the hostname of the machine. Edit /etc/hostname and /etc/hosts and change both instances of Marc_Red_data to MarcRedData, then reboot.

I've been banging my head against the same problem, and when I found your post, I noticed that your hostname like mine had underscores. I changed the hostname of the machine and now it works fine. I suspect hadoop is using some library that tries to resolve the hostname as it would a URL, and URLs can't have underscores, so it just errors out.

[Edit] I didn't notice before that you said you're running Windows, so the process for changing your hostname will differ. http://www.howtogeek.com/howto/windows-vista/change-your-computer-name-in-windows-vista/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top