1、加入配置文件到项目源码目录下(src)

Eclipse中将hadoop项目放在集群中运行

  1. <configuration>
  2. <property>
  3. <name>mapreduce.framework.name</name>
  4. <value>yarn</value>
  5. </property>
  6. </configuration>
读取配置文件内容,使项目知道向集群提交运行

 2、将本项目打包到项目源码目录下(src)

Eclipse中将hadoop项目放在集群中运行

 3、在Java代码加入下一句话


  1. Configuration conf = new Configuration();
  2. conf.set("mapreduce.job.jar", "wc.jar");
注意:这些目的是为了让集群找到所要运行的jar包




相关文章:

  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2022-01-10
  • 2021-05-03
  • 2021-12-20
  • 2021-04-02
  • 2021-11-18
猜你喜欢
  • 2021-11-18
  • 2021-10-21
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2021-08-24
相关资源
相似解决方案