Launch a mapreduce job from eclipse

后端 未结 3 469
醉话见心
醉话见心 2020-12-09 13:21

I\'ve written a mapreduce program in Java, which I can submit to a remote cluster running in distributed mode. Currently, I submit the job using the following steps:

3条回答
  •  旧巷少年郎
    2020-12-09 13:41

    If you're submitting the hadoop job from within the Eclipse project that defines the classes for the job then you most probably have a classpath problem.

    The job.setjarByClass(CountRows.class) call is finding the class file on the build classpath, and not in the CountRows.jar (which may or may not have been built yet, or even on the classpath).

    You should be able to assert this is true by printing out the result of job.getJar() after you call job.setjarByClass(..), and if it doesn't display a jar filepath, then it's found the build class, rather than the jar'd class

提交回复
热议问题