티스토리 뷰
우지를 이용하여 작업을 처리하는 중 fork를 이용하여 한번에 여러개의 액션(action)을 실행하면 클러스터 자원의 여유가 있어도, 우지가 10개의 액션만 동시에 처리(RUNNING 상태)하고 나머지는 대기 상태(PREP 상태)로 남아서 작업 속도를 증가하기 위해서 우지 액션 관련 설정을 확인해 보았습니다. 우지 액션 관련 설정은 세가지입니다.
설정 | 기본값 | 비고 |
oozie.service.ActionCheckerService.action.check.interval | 60 | 작업의 동작 상황을 체크하는 기간. 60초 마다 반복 |
oozie.service.ActionCheckerService.action.check.delay | 600 | 작업을 시작하고 동작체크를 시작하는 지연시간. 작업 시작후 600초(10분)뒤에 체크 시작 |
oozie.service.ActionCheckerService.callable.batch.size | 10 | 한번에 체크하는 액션의 개수 |
예를 들어 fork를 이용하여 한번에 30개의 작업을 동시에 수행하면, 기본 설정에서는 한번에 10개의 액션이 동시에 실행 상태(RUNNING)가 됩니다. 실행된 작업은 10뒤에 1분 간격으로 작업이 성공하였는지 확인하게 됩니다. 클러스터의 자원이 남아있어도 작업이 느리게 진행되기 때문에 이를 적절하게 수정하는 것이 좋습니다.
관련 설정은 다음의 사이트에서 확인할 수 있습니다.
https://oozie.apache.org/docs/4.2.0/oozie-default.xml
액션 체크 관련 소스코드를 확인해보면 자바 유틸의 ScheduledThreadPoolExecutor를 이용하여 액션을 체크할 때 위의 설정값을 이용하여 인터벌과 딜레이를 입력하고 있습니다.
// ActionCheckRunnable
@Override
public void init(Services services) {
Runnable actionCheckRunnable = new ActionCheckRunnable(ConfigurationService.getInt
(services.getConf(), CONF_ACTION_CHECK_DELAY));
services.get(SchedulerService.class).schedule(actionCheckRunnable, 10,
ConfigurationService.getInt(services.getConf(), CONF_ACTION_CHECK_INTERVAL),
SchedulerService.Unit.SEC);
}
// SchedulerService
if (!scheduler.isShutdown()) {
scheduler.scheduleWithFixedDelay(r, delay * unit.getMillis(), interval * unit.getMillis(),
TimeUnit.MILLISECONDS);}
apache/oozie
Mirror of Apache Oozie. Contribute to apache/oozie development by creating an account on GitHub.
github.com
https://github.com/apache/oozie/core/src/main/java/org/apache/oozie/service/SchedulerService.java
apache/oozie
Mirror of Apache Oozie. Contribute to apache/oozie development by creating an account on GitHub.
github.com
'빅데이터 > oozie' 카테고리의 다른 글
[oozie][EMR] EMR Oozie 실행시 java.lang.ClassNotFoundException: Class com.amazon.ws.emr.hadoop.fs.EmrFileSystem not found 오류 수정 (0) | 2019.10.30 |
---|---|
[oozie][slf4j] SLF4J: Class path contains multiple SLF4J bindings. 오류 (0) | 2019.10.25 |
[oozie] 우지 워크플로우(workflow) 기본 스펙 및 실행 (0) | 2019.04.19 |
[oozie] 코디네이터(coordinator)의 일자 변환 EL 함수 사용법 (0) | 2019.03.19 |
[oozie] 우지의 HDFS EL 함수 알아보기 (0) | 2019.02.13 |
- Total
- Today
- Yesterday
- ubuntu
- AWS
- S3
- 파이썬
- java
- yarn
- 정올
- SPARK
- error
- nodejs
- bash
- 하이브
- Linux
- SQL
- 하둡
- Hadoop
- HDFS
- oozie
- hbase
- HIVE
- build
- emr
- 알고리즘
- 백준
- airflow
- 다이나믹
- mysql
- 오류
- Python
- Tez
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |