gpt4 book ai didi

hadoop - 线程 "main"org.apache.hadoop.mapred.InvalidJobConfException : Output directory not set 中的异常

转载 作者:可可西里 更新时间:2023-11-01 14:47:36 30 4
gpt4 key购买 nike

嘿,你能帮我清除以下错误吗?当我运行 Mapreduce 作业 fopr 将数据从 hdfs 文件插入到 hbase 表中时,我得到了这个。使用 HFileOutputFormat.class ,之前我使用 MultiTableOutputFormat.class 运行相同的程序,它工作正常,但是在将数据插入 hbase 表时花费了很多时间。

那么你能帮帮我吗……:) *

job.setMapOutputKeyClass(ImmutableBytesWritable.class); job.setMapOutputValueClass(Put.class); job.setInputFormatClass(TextInputFormat.class);
job.setOutputFormatClass(HFileOutputFormat.class); job.setMapperClass(Map.class); HTable hTable = new HTable(conf,"ARK_3000"); HFileOutputFormat.configureIncrementalLoad(job, hTable);

ERROR security.UserGroupInformation: PriviledgedActionException as:reddym (auth:SIMPLE) cause:org.apache.hadoop.mapred.InvalidJobConfException: Output directory not set. Exception in thread "main" org.apache.hadoop.mapred.InvalidJobConfException: Output directory not set.

谢谢 Madhusudhana Reddy

最佳答案

确保输出目录没有被写保护,然后重试 不要使用像驱动器根目录这样的目录。希望这可以帮助问候

编辑:尝试在它要求您提供输出目录的地方添加它

HFileOutputFormat.setOutputPath(conf, new Path(<YOUR_LOCATION>));

FileOutputFormat.setOutputPath(conf, new Path(<YOUR_LOCATION>));

并且您需要提及输出目录,以便它知道将数据写入何处。

希望这能帮助您进一步解决问题,如果您需要更多帮助,请告诉我。因为我总是很乐意提供帮助。

编辑 2:您需要提及输出目录,因为您正在写入的表存储在内存中,当您结束程序时,内存中的所有数据都将丢失。例如,如果程序崩溃,除非将其写入磁盘,否则所有数据都会丢失。因此,保存到输出目录的数据是一个备份,以防出现任何问题。

我希望这能清楚地回答您的问题,如果您需要更多帮助,请发表另一条评论问候汤姆

关于hadoop - 线程 "main"org.apache.hadoop.mapred.InvalidJobConfException : Output directory not set 中的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15290669/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com