[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.실제로 그것은 나의 구성 실수였습니다.
실제로 그것은 나의 구성 실수였습니다.
mapred-site.xml의 mapred.local.dir 속성을 놓쳤습니다.
from https://stackoverflow.com/questions/19636220/exception-while-submitting-a-mapreduce-job-from-remote-system by cc-by-sa and MIT license
'HADOOP' 카테고리의 다른 글
[HADOOP] 돼지 기본 JsonLoader 스키마 문제 (0) | 2019.07.01 |
---|---|
[HADOOP] Hadoop / Hive 수집 목록 - 반복되는 항목 없음 (0) | 2019.07.01 |
[HADOOP] Spark가 HDFS 데이터를 읽고 동시에 계산을 수행 할 수 있습니까? (0) | 2019.07.01 |
[HADOOP] 전역 변수의 값은 루프에 대해 변경되지 않습니다. (0) | 2019.07.01 |
[HADOOP] 스파크 클라이언트 생성 실패 : 스파크 예외 발생시 하이브 (0) | 2019.07.01 |