Vincent_Leee丶 2018-12-20 16:46 采纳率: 100%
浏览 949
已采纳

在Linux hadoop环境中运行sh脚本,报异常java.io.IOException: No FileSystem for scheme: E

jar包是从eclipse中导出的,代码没有问题,在Windows下可以正确运行。
在Linux下用脚本运行,出现问题。
脚本内容:
图片说明

运行后报错:
图片说明

jar包main方法:

public static void main(String[] args) throws Exception {

        Configuration conf = new Configuration();
        conf.set("fs.hdfs.impl", "org.apache.hadoop.hdfs.DistributedFileSystem");

        Job job = Job.getInstance(conf);

        job.setJarByClass(AppLogDataClean.class);

        job.setMapperClass(AppLogDataCleanMapper.class);

        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(NullWritable.class);

        job.setNumReduceTasks(0);

        // 避免生成默认的part-m-00000等文件,因为,数据已经交给MultipleOutputs输出了
        LazyOutputFormat.setOutputFormatClass(job, TextOutputFormat.class);

        FileInputFormat.setInputPaths(job, new Path("E:/educ/infile/20170816new"));
        FileOutputFormat.setOutputPath(job, new Path("E:/educ/outfile/LogTest2/clean"));

        boolean res = job.waitForCompletion(true);
        System.exit(res ? 0 : 1);

    }

配置文件应该也都没问题,之前所有业务都能正常操作,所以现在应该怎么解决?
求助大神

  • 写回答

1条回答 默认 最新

  • ainiburuqusi 2018-12-20 09:58
    关注
    FileInputFormat.setInputPaths(job, new Path("E:/educ/infile/20170816new"));
    FileOutputFormat.setOutputPath(job, new Path("E:/educ/outfile/LogTest2/clean"));
    

    你的linux是啥版本,竟然还有E盘,厉害了我的哥.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料