启动Eclipse,
右键点击 Project Explorer 窗口,选择 New -> Project.. 找到 Map/Reduce Project, 点Next ,输入名字。 点击下面的Config Hadoop Install Directiory,输入Hadoop的目录,如:C:/cygwin/home/User/hadoop-0.19.2conf.setInputPath(new Path("src"));
conf.setOutputPath(new Path("out"));
换为
conf.setInputFormat(TextInputFormat.class);
conf.setOutputFormat(TextOutputFormat.class);
FileInputFormat.setInputPaths(conf, new Path("In"));
FileOutputFormat.setOutputPath(conf, new Path("Out"));
右键点击文件,选择 Run As --> Run on Hadoop.
弹出以下窗口:
选择 "Choose existing hadoop location" , 然后选择刚才创建的localhost ,点Finish 就开始运行了.
结束了^_^