[hadoop][hive] 리듀서 개수 조절하는 순서

2016. 9. 6. 14:21·빅데이터/hive

하이브 잡을 실행하면 나오는 다음의 설정은

하이브를 실행할 때 리듀서 개수를 조절하는 순서이다. 



In order to change the average load for a reducer (in bytes):

  set hive.exec.reducers.bytes.per.reducer=<number>

In order to limit the maximum number of reducers:

  set hive.exec.reducers.max=<number>

In order to set a constant number of reducers:

  set mapreduce.job.reduces=<number>



hive.exec.reducers.bytes.per.reducer
  • Default Value: 1,000,000,000 prior to Hive 0.14.0; 256 MB (256,000,000) in Hive 0.14.0 and later
  • Added In: Hive 0.2.0; default changed in 0.14.0 with HIVE-7158 (and HIVE-7917)

Size per reducer. The default in Hive 0.14.0 and earlier is 1 GB, that is, if the input size is 10 GB then 10 reducers will be used. In Hive 0.14.0 and later the default is 256 MB, that is, if the input size is 1 GB then 4 reducers will be used.


매퍼의 입력되는 값의 사이즈에 따라 리듀서 개수가 결정된다. 

hive.exec.reducers.max
  • Default Value: 999 prior to Hive 0.14.0; 1009 in Hive 0.14.0 and later
  • Added In: Hive 0.2.0; default changed in 0.14.0 with HIVE-7158 (and HIVE-7917)

Maximum number of reducers that will be used. If the one specified in the configuration property mapred.reduce.tasks is negative, Hive will use this as the maximum number of reducers when automatically determining the number of reducers.

설정한 최대의 값의 리듀서를 설정한다. 

다수의 사용자가 시스템을 사용할 경우 사용자의 원활한 이용을 위해 리듀서를 제한할 필요가 있을 때 사용한다. 

mapred.reduce.tasks
  • Default Value: -1
  • Added In: Hive 0.1.0

The default number of reduce tasks per job. Typically set to a prime close to the number of available hosts. Ignored when mapred.job.tracker is "local". Hadoop set this to 1 by default, whereas Hive uses -1 as its default value. By setting this property to -1, Hive will automatically figure out what should be the number of reducers.


리듀서의 개수를 사용자가 직접 설정한다. 
매퍼의 입력값보다 리듀서의 입력값(데이터 조인을 할 경우 매퍼의 입력값보다 리듀서의 입력값이 늘어날 수 있다.)이 더 클경우나 더 작을 경우
개발자가 직접 리듀서의 개수를 설정할 수도 있다. 

http://socurites.tistory.com/192
https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties


반응형
저작자표시 비영리 (새창열림)

'빅데이터 > hive' 카테고리의 다른 글

[하이브] 매니지드 테이블과 익스터널 테이블 변경하기  (0) 2016.09.23
[hive] skewed 테이블  (0) 2016.09.12
[hive][개념] 하이브 서버2(hiverserver2), 비라인(beeline)  (0) 2016.08.26
[하이브] 파티션 복구 하기(repair partitions)  (0) 2016.07.11
[에러] hive의 INSERT .. SELECT 작업중 No input paths specified in job 에러  (0) 2016.06.29
'빅데이터/hive' 카테고리의 다른 글
  • [하이브] 매니지드 테이블과 익스터널 테이블 변경하기
  • [hive] skewed 테이블
  • [hive][개념] 하이브 서버2(hiverserver2), 비라인(beeline)
  • [하이브] 파티션 복구 하기(repair partitions)
hs_seo
hs_seo
Hello World!
    반응형
  • hs_seo
    개발자로 살아남기
    hs_seo
  • 전체
    오늘
    어제
    • 전체 (1140)
      • 개발자 (21)
        • 개발에 유의할 점 (0)
        • 면접 (5)
      • IT 소식 (5)
        • 업계 (1)
      • java (51)
        • 디자인패턴 (3)
        • apache-common (1)
      • 개념 (47)
        • 자료구조 (4)
        • 함수형사고 (8)
        • 디자인패턴 (1)
      • 데이터분석 (1)
      • python (67)
        • 코드조각 (12)
        • 라이브러리 (2)
      • 빅데이터 (418)
        • zookeeper (5)
        • hadoop (78)
        • hdfs (12)
        • hive (127)
        • hbase (16)
        • spark (40)
        • scala (4)
        • trino (3)
        • oozie (41)
        • Hue (9)
        • R (5)
        • sqoop (6)
        • flume (3)
        • elasticsearch (2)
        • airflow (16)
        • kafka (3)
        • kubernetes (10)
        • openstack (3)
        • flink (2)
        • redis (2)
      • 빅데이터 강좌 (2)
      • 알고리즘 (131)
        • 알고리즘 (1)
        • 백준 (61)
        • 정올 (41)
        • 더블릿 (5)
        • 프로그래머스 (1)
      • 프로그래밍 언어 (30)
        • go (4)
        • js (9)
        • .Net (6)
        • Jsp (1)
        • ansible (3)
        • terraform (6)
      • Tools (56)
        • docker (2)
        • macbook (6)
        • maven (3)
        • sublime (1)
      • 프레임워크 (25)
        • [JS] angularjs (2)
        • [JS] node.js (19)
        • [Java] spring (2)
        • Android (2)
      • 데이타베이스 (43)
        • SQLD (5)
        • Oracle (1)
        • MySQL (8)
        • ADsP (2)
      • 리눅스 (25)
        • Bash (61)
      • GCP (5)
      • AWS (34)
        • EC2 (2)
        • EMR (14)
      • 정보보안기사 (4)
        • 네트워크 (1)
      • 개인 (80)
        • 업무실수 (0)
        • 책 (9)
        • 교육 (3)
        • 여행 (17)
        • 영화 (12)
        • 음악 (2)
        • 피규어 (4)
        • 게임 (3)
        • 생각 (7)
        • 기타 (10)
        • 좋은글 (5)
        • 좋은 사이트 (2)
  • 블로그 메뉴

    • 홈
    • 태그
    • 미디어로그
    • 위치로그
    • 방명록
  • 링크

    • 빅데이터-하둡,하이브로 시작하기
    • 빅데이터-스칼라, 스파크로 시작하기
    • Kaggle에서 파이썬으로 데이터 분석 시작하기
    • 쉘스크립트 개발 시작하기
    • 개발자가 데이터 분석 준전문가 되기
    • 데브쿠마
  • 공지사항

  • 인기 글

  • 태그

    백준
    java
    HDFS
    HIVE
    mysql
    build
    Linux
    hbase
    알고리즘
    nodejs
    SPARK
    Hadoop
    Tez
    ubuntu
    S3
    오류
    airflow
    파이썬
    AWS
    emr
    Python
    oozie
    error
    하둡
    k8s
    하이브
    정올
    yarn
    bash
    다이나믹
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.6
hs_seo
[hadoop][hive] 리듀서 개수 조절하는 순서
상단으로

티스토리툴바