eclipse程序运行成功但是File Output Format Counters Bytes Written=0

eclipse程序运行成功但是File Output Format Counters Bytes Written=0

问题遇到的现象和发生背景

img

img

问题相关代码,请勿粘贴截图
package day0606;

import java.io.IOException;
import java.util.Map;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.yarn.webapp.hamlet.HamletSpec.MAP;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;

import utils.DataUtils;

public class JobDataMapper extends Mapper<LongWritable, Text, Text, NullWritable>{
    

    
    @Override
    
    
    protected void map(LongWritable key, Text value, Context context)
            throws IOException, InterruptedException {
        String jobData = value.toString();
        String jobResult="";
        
        try {
            JSONObject jsonData = new JSONObject(jobData);
            
            JSONArray jsonArray = jsonData.getJSONArray("result");
            
            //遍历数据 
            for(int i=0;i<jsonArray.length();i++){
                String companyDetail = jsonArray.get(i).toString();
                JSONObject companyData = new JSONObject(companyDetail);
                
                String city = companyData.getString("city");
                
                String salary = companyData.getString("salary");
                
                JSONArray companyLabelList = companyData.getJSONArray("companyLabelList");
                
                JSONArray positionLables = companyData.getJSONArray("positionLables");
                
        
                String company = DataUtils.mergeArray(companyLabelList);
                
                String skill = DataUtils.mergeArray(positionLables);
                
                DataUtils.dataToSql(city, salary, company, skill);
                
                
                if(i==jsonArray.length()-1){
                    jobResult=jobResult+city+","+salary+","+company+","+skill;
                }else{
                jobResult=jobResult+city+","+salary+","+company+","+skill+"\n";
                }
                
            }
            
            context.write(new Text(jobResult), NullWritable.get());
            
        } catch (JSONException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
    }

}


运行结果及报错内容

java.lang.Exception: java.io.IOException: Mkdirs failed to create file:/E:/Date/output/_temporary/0/_temporary/attempt_local1852148913_0001_r_000000_0 (exists=false, cwd=file:/D:/workspaces/MapReduce)
    at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
    at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:529)
Caused by: java.io.IOException: Mkdirs failed to create file:/E:/Date/output/_temporary/0/_temporary/attempt_local1852148913_0001_r_000000_0 (exists=false, cwd=file:/D:/workspaces/MapReduce)
    at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:455)
    at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:440)
    at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:911)
    at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:892)
    at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:789)
    at org.apache.hadoop.mapreduce.lib.output.TextOutputFormat.getRecordWriter(TextOutputFormat.java:132)
    at org.apache.hadoop.mapred.ReduceTask$NewTrackingRecordWriter.<init>(ReduceTask.java:541)
    at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:614)
    at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389)
    at org.apache.hadoop.mapred.LocalJobRunner$Job$ReduceTaskRunnable.run(LocalJobRunner.java:319)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
- Job job_local1852148913_0001 failed with state FAILED due to: NA
- Counters: 30
    File System Counters
        FILE: Number of bytes read=535998
        FILE: Number of bytes written=1160516
        FILE: Number of read operations=0
        FILE: Number of large read operations=0
        FILE: Number of write operations=0
    Map-Reduce Framework
        Map input records=4
        Map output records=4
        Map output bytes=6065
        Map output materialized bytes=6105
        Input split bytes=376
        Combine input records=0
        Combine output records=0
        Reduce input groups=0
        Reduce shuffle bytes=6105
        Reduce input records=0
        Reduce output records=0
        Spilled Records=4
        Shuffled Maps =4
        Failed Shuffles=0
        Merged Map outputs=4
        GC time elapsed (ms)=66
        Total committed heap usage (bytes)=680669184
    Shuffle Errors
        BAD_ID=0
        CONNECTION=0
        IO_ERROR=0
        WRONG_LENGTH=0
        WRONG_MAP=0
        WRONG_REDUCE=0
    File Input Format Counters 
        Bytes Read=210706
    File Output Format Counters 
        Bytes Written=0


我的解答思路和尝试过的方法

检查了读写代码有没有问题或者eclipse运行程序也没有问题 但是output就是写入不进去 writen=0

我想要达到的结果

img

可能路径不行吧,直接写项目名_包名_文件名不行吗,不要写盘符之类的绝对路径,你翻译一下报错的第一行就知道哪里有问题了

我改了路径还是不行,有别的办法吗