하이브 잡을 실행하면 나오는 다음의 설정은
하이브를 실행할 때 리듀서 개수를 조절하는 순서이다.
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.
'빅데이터 > 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 |