복붙노트

[HADOOP] 하둡 감속기 수 구성 옵션 우선 순위

HADOOP

하둡 감속기 수 구성 옵션 우선 순위

감소 수를 설정하기위한 다음 3 가지 옵션의 우선 순위는 무엇입니까? 다시 말해, 세 개 모두가 설정되면 어떤 것이 고려됩니까?

옵션 1:

setNumReduceTasks(2) within the application code

옵션 2 :

-D mapreduce.job.reduces=2 as command line argument

옵션 3 :

through $HADOOP_CONF_DIR/mapred-site.xml file

 <property>
  <name>mapreduce.job.reduces</name>
  <value>2</value>
 </property>

해결법

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

    1.옵션 1은 2를 재정의하고 2는 3을 재정의합니다. 즉,이 시나리오에서는 작업 1에서 옵션 1이 사용됩니다.

    옵션 1은 2를 재정의하고 2는 3을 재정의합니다. 즉,이 시나리오에서는 작업 1에서 옵션 1이 사용됩니다.

  2. ==============================

    2.Hadoop-The Definitive Guide에 따르면

    Hadoop-The Definitive Guide에 따르면

  3. ==============================

    3.우선 순위 : 명령 줄을 통해 구성 매개 변수 전달 (MR 응용 프로그램 제출 중)

    우선 순위 : 명령 줄을 통해 구성 매개 변수 전달 (MR 응용 프로그램 제출 중)

    두 번째 우선 순위 : 애플리케이션 코드에서 구성 매개 변수 설정

    세 번째 우선 순위 : core-site.xml, hadoop-env.sh, hdfs-site.xml, log4j.properties 및 mapred-site.xml과 같은 여러 XML 파일에서 기본 매개 변수를 읽습니다.

  4. from https://stackoverflow.com/questions/20696449/hadoop-number-of-reducers-configuration-options-priority by cc-by-sa and MIT license