After setting up the environment, start debugging the Mapreduse program. But there is no constant error. I hate to set it up in my own operating system environment variables, including Linux. It is common to prefer to set the environment variable in the script that launches the program, so that the script can run its own environment with the appropriate environment variable values. In eclipse, I anticipate the need to set the value of the Hadoop_home variable, after Setup, regardless of how it is debugged. All error:
Exception in thread "main" JAVA.LANG.UNSATISFIEDLINKERROR:ORG.APACHE.HADOOP.IO.NATIVEIO.NATIVEIO$WINDOWS.ACCESS0 ( Ljava/lang/string;i) Z
Baidu a bit, many people encounter such problems. is the Windows Hadoop installation directory, the bin directory is missing dynamic libraries such as Hadoop.dll and Winutils.exe. But I have already put these documents in the previous link, but I still do not succeed. After several days of searching, it was discovered that during the regular installation of Hadoop, the bin directory was added to the path. Then in the Eclipse debugging environment, add the path setting. The commissioning passed smoothly.
Not much to say, take a look at the picture:
Select the Debug configuration item and set the environment parameters.
OK into debugging everything is OK.
After doing this, if you want to package the release program, it is best to remember to configure the above environment variables in the script, otherwise all kinds of unusual wonderful strange like you hit!!
Mapreduse of Hadoop in the debugging environment under eclipse