hadoop - 无效的作业 session 异常 : Output directory not set

标签 hadoop mapreduce

我正在使用 Cloudera VM 进行 mapreduce 实践。

我刚刚从 cloudera 提供的默认 wordcount 类创建了 jar。

我在运行 mapreduce 程序时遇到此错误。我能知道我错过了什么吗?

InvalidJobConfException: Output directory not set.
Exception in thread "main" org.apache.hadoop.mapred.InvalidJobConfException: Output directory not set.

最佳答案

要使用 MapReduce 程序处理数据,您需要-

  1. 映射器类
  2. reducer 类
  3. 驱动类(运行MapReduce程序的主类)
  4. 输入数据(输入数据分析的路径)
  5. Output directory(输出目录的路径,程序的输出将存放在这里,这个 HDFS 中不应该存在该目录)

从报错来看,好像是你没有设置输出目录路径。如果您的代码中尚未设置输出目录,那么如果您的代码接受相同的参数,则必须在运行时传递它。 Here是在 MapReduce 中运行第一个 WordCount 程序的很好的分步指南。

关于hadoop - 无效的作业 session 异常 : Output directory not set,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35472642/

相关文章:

database - 将 Spark 与 Cassandra 结合使用的优势

hadoop - 了解 Hive MR 输出

hadoop - Oozie工作的问题,需要多位 parent 的输出

scala - 使用Web应用程序运行Scala Map Reduce代码

hadoop - 如何使用水槽获取实时推文?

sql - 配置单元分区,带通配符

apache - 无法实例化 org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

hadoop - 为每个映射器输出准确运行组合器的时间

hadoop - 如何将 neo4j 分发到多台机器(是否可能)?

mysql - SED 查找和替换 - MapReduce 文件