0

I am trying to run a map reduce job using hadoop jar command. I am trying to include external libraries using the -libjars option. The command that I am running currently is hadoop jar mapR.jar com.ms.hadoop.poc.CsvParser -libjars google-gson.jar Test1.txt output But I am recieveing this as the output usage: [input] [output] Can anyone please help me out. I have included the the exteranal libraries in my classpath as well.

4

1 回答 1

0

你能列出你的main(String args[])方法的内容吗?您是否使用 ToolRunner 界面来启动您的工作?-libjars 参数的解析是 GenericOptionsParser 的一个函数,它通过 ToolRunner 实用程序类为您调用:

public class Driver extends Configured implements Tool {
    public static void main(String args[]) {
        System.exit(ToolRunner.run(new Driver(), args)));
    }

    public int run(String args[]) {
        Job job = new Job(getConf());
        Configuration conf = job.getConfiguration();

        // other job configuration

        return job.waitForCompletion(true) ? 0 : 1;
    }
}
于 2012-08-09T10:48:51.340 回答