@Override
    public int run(String[] args) throws Exception {



        int round = 0;
        long start = TimeUnit.SECONDS.convert(System.currentTimeMillis(), TimeUnit.MILLISECONDS);

        /*
        args[0]: inputpath
        args[1]: outputpath
        args[2]: NumLinesPerSplit
        args[3]: precision
         */

        String input = args[0];
        String output = args[1];

        //创建output文件夹
        if (!FileSystem.get(getConf()).exists(new Path(output)))
            FileSystem.get(getConf()).mkdirs(new Path(output));

        while (true) {

            Configuration conf = getConf();
            Job job = new Job(conf, "LinearEquation-"+round);

            job.setJarByClass(GeneralDriver.class);

//            job.setInputFormatClass(TextInputFormat.class);
            job.setInputFormatClass(NLineInputFormat.class);
            NLineInputFormat.setNumLinesPerSplit(job, Integer.parseInt(args[2]));
            job.setOutputFormatClass(TextOutputFormat.class);

            job.setMapperClass(GeneralMap.class);
            job.setMapOutputKeyClass(Text.class);
            job.setMapOutputValueClass(Text.class);

            job.setReducerClass(GeneralReduce.class);

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

            FileInputFormat.addInputPath(job, new Path(input + "coefficient/"));

            job.setNumReduceTasks(1);

            job.getConfiguration().setFloat("error", Float.parseFloat(args[3]));


            Path outputDir = new Path(output + "round" + round);

            if (FileSystem.get(job.getConfiguration()).exists(outputDir))
                FileSystem.get(job.getConfiguration()).delete(outputDir, true);

            FileOutputFormat.setOutputPath(job, outputDir);

            String inputX;
            if (round == 0){
                inputX = input + "unknownNum/unknownNum.txt";
            } else {
                inputX = output + "round" + (round - 1) + "/part-r-00000";
            }

            DistributedCache.addCacheFile(new URI(inputX), job.getConfiguration());
            DistributedCache.addCacheFile(new URI(input + "bvector/bvector.txt"), job.getConfiguration());

            if (!job.waitForCompletion(true))
                throw new RuntimeException("job failed");

            //满足精度要求
            if (job.getCounters().findCounter(PrecisionRequire.ITEM).getValue() > 0)
                break;

            round++;
            long now = TimeUnit.SECONDS.convert(System.currentTimeMillis(), TimeUnit.MILLISECONDS);
            if (now - start > 5400)
                System.exit(5);

        }

        long end = TimeUnit.SECONDS.convert(System.currentTimeMillis(), TimeUnit.MILLISECONDS);
        System.out.println("total time = " + (end - start) + "s" );
        return  0;
    }