복붙노트

[HADOOP] 원격 시스템에서 mapreduce 작업을 제출하는 중에 예외가 발생했습니다.

HADOOP

원격 시스템에서 mapreduce 작업을 제출하는 중에 예외가 발생했습니다.

원격 시스템에서 mapreduce 작업을 제출하는 동안 예외가 발생했습니다.

내 hadoop 및 mapreduce 환경은 Linux 시스템에서 구성됩니다. 로컬 Windows PC에서 다음과 같이 단어 카운트 작업을 제출합니다.

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

    UserGroupInformation ugi = UserGroupInformation.createRemoteUser("root");

    try {
        ugi.doAs(new PrivilegedExceptionAction<Void>() {

            public Void run() throws Exception {

                JobConf conf = new JobConf(MapReduce.class);
                conf.set("mapred.job.name", "MyApp");
                conf.set("mapred.job.tracker", "192.168.1.149:9001");
                conf.set("fs.default.name","hdfs://192.168.1.149:9000");
                conf.set("hadoop.job.ugi", "root");

                conf.setOutputKeyClass(Text.class);
                conf.setOutputValueClass(IntWritable.class);

                conf.setMapperClass(Map.class);
                conf.setCombinerClass(Reduce.class);
                conf.setReducerClass(Reduce.class);

                conf.setInputFormat(TextInputFormat.class);
                conf.setOutputFormat(TextOutputFormat.class);

                FileInputFormat.setInputPaths(conf, new Path("test"));
                FileOutputFormat.setOutputPath(conf, new Path("test"));

                JobClient.runJob(conf);

                return null;
            }
        });
    } catch (Exception e) {
        e.printStackTrace();
    }
}

192.168.1.149는 hadoop으로 구성된 리눅스 PC입니다. 나는 거기에서 시작,지도 제작 서비스를 시작했다. 또한 테스트 디렉토리도 같은 자바 API로 만들어졌다. 그러나 mapreduce 아닙니다.

**도와주세요 .. **

해결법

  1. ==============================

    1.실제로 그것은 나의 구성 실수였습니다.

    실제로 그것은 나의 구성 실수였습니다.

    mapred-site.xml의 mapred.local.dir 속성을 놓쳤습니다.

  2. from https://stackoverflow.com/questions/19636220/exception-while-submitting-a-mapreduce-job-from-remote-system by cc-by-sa and MIT license