1. 在eclipse下,通过main函数传递参数给mapper
在main()中设置configuration,添加名为temp的参数
Configuration conf=getConf();conf.set("temp", "the arg which you need in mapper");Job job = new Job(conf, "Idf");//特别要注意的就是这条语句和上面一行绝不能颠倒在map/reduce中重载setup( Context context) ,并在其中获取参数
String s=context.getConfiguration().get("temp");