有沒有辦法從C或C++提交Map/Reduce作業到Hadoop?Hadoop有沒有優雅的C++ API?
像這樣但在C++(這是Java代碼):
Configuration config = new Configuration();
JobConf job = new JobConf(config);
job.setJarByClass(MyFirstJob.class);
job.setJobName("My first job");
FileInputFormat.setInputPaths(job, new Path(args[0));
FileOutputFormat.setOutputPath(job, new Path(args[1]));
job.setMapperClass(MyFirstJob.MyFirstMapper.class);
job.setReducerClass(MyFirstJob.MyFirstReducer.class);
JobClient.runJob(job);
感謝。
使用c或C++的任何好理由? – 2013-03-20 22:00:09