WARN - PriviledgedActionException as:superè (auth:SIMPLE) cause:0: No such file or directory

WARN - PriviledgedActionException as:superè (auth:SIMPLE) cause:0: No such file or directory解决方法
在runner类添加 conf.set(“hadoop.tmp.dir”,“E:\tmp\hadoop-abc”);

在这里插入图片描述
代码
如下:
public class WordCountRunner {
public static void main(String[] args) throws Exception {
// 创建本次mr程序的job实例
Configuration conf = new Configuration();
conf.set(“hadoop.tmp.dir”,“E:\tmp\hadoop-abc”);
// conf.set(“mapreduce.framework.name”, “local”);
Job job = Job.getInstance(conf);
// 指定本次job运行的主类
job.setJarByClass(WordCountRunner.class);
// 指定本次job的具体mapper reducer实现类
job.setMapperClass(WordCountMapper.class);
job.setReducerClass(WordCountReducer.class);
// 指定本次job map阶段的输出数据类型
job.setMapOutputKeyClass(Text.class);
job.setMapOutputValueClass(LongWritable.class);
// 指定本次job reduce阶段的输出数据类型 也就是整个mr任务的最终输出类型
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(LongWritable.class);
// 指定本次job待处理数据的目录 和程序执行完输出结果存放的目录
long startTime=System.currentTimeMillis(); //获取开始时间
//FileInputFormat.setMaxInputSplitSize(job, 128);
//FileInputFormat.setMinInputSplitSize(job, 128);
FileInputFormat.setInputPaths(job,“E:\wordcount\input\words.txt”);
FileOutputFormat.setOutputPath(job, new Path(“E:\wordcount\output”));
// 提交本次job
boolean b = job.waitForCompletion(true);
long endTime=System.currentTimeMillis(); //获取结束时间
System.out.println("程序运行时间: "+(endTime-startTime)+“ms”);
System.exit(b ? 0 : 1);
}
}

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值