InvalidJobConfException: Output directory not set

以后还是要先看一下翻译的结果吧。头疼。

报错内容:

Output directory not set.
2023-02-27 18:15:48,840 INFO client.RMProxy: Connecting to ResourceManager at hadoop102/39.98.177.124:8032
Exception in thread "main" org.apache.hadoop.mapred.InvalidJobConfException: Output directory not set.
	at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:156)
	at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:277)
	at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:143)
	at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1570)

翻译一下:

InvalidJobConfException: Output directory not set_第1张图片

更改前

  6、设置输入和输出路径
  FileInputFormat.setInputPaths(job, new Path(args[0]));
  FileInputFormat.setInputPaths(job, new Path(args[1]));

更改后

  6、设置输入和输出路径
  FileInputFormat.setInputPaths(job, new Path(args[0]));
  FileInputFormat.setOutputPath(job, new Path(args[1]));

你可能感兴趣的:(日常Bug,hadoop,大数据,java)