AWS/EMR
[EMR] AWS EMR의 hive cli에서 tez.queue.name가 설정되지 않는 문제 해결 방법
hs_seo
2019. 11. 4. 17:05
EMR 5.24로 변경후 hive cli에서 set tez.queue.name
을 실행하여도 큐가 설정되지 않는 문제가 발생하였습니다.
상황
- YARN의 큐 설정을 변경
- 기존 default큐를 제거하고, dynamic, batch로 큐를 설정
- hive CLI에서 큐를 설정하고 작업을 실행하면 오류발생
Caused by: java.util.concurrent.ExecutionException: org.apache.tez.dag.api.TezException: org.apache.hadoop.yarn.exceptions.YarnException: Failed to submit application_111122223333_0034 to YARN : Application application_111122223333_0034 submitted by user hadoop to unknown queue: default
원인
- TezSessionState.java의
startSessionAndContainers
메소드를 확인 - 큐이름 설정 주체를 정확하게 확인할 수 없기 때문에 세션에 설정된 큐이름을 초기화하는 과정에서 기본 큐이름인 default로 설정
isSuccessful = true; // sessionState.getQueueName() comes from cluster wide configured queue names. // sessionState.getConf().get("tez.queue.name") is explicitly set by user in a session. // TezSessionPoolManager sets tez.queue.name if user has specified one or use the one from // cluster wide queue names. // There is no way to differentiate how this was set (user vs system). // Unset this after opening the session so that reopening of session uses the correct queue // names i.e, if client has not died and if the user has explicitly set a queue name // then reopened session will use user specified queue name else default cluster queue names. conf.unset(TezConfiguration.TEZ_QUEUE_NAME); return session; } finally { if (isOnThread && !isSuccessful) { closeAndIgnoreExceptions(session); } } }
해결방법
- 하이브의 hive-site.xml에 기본큐를 설정
<configuration>
<property>
<name>tez.queue.name</name>
<value>dynamic</value>
</property>
</configuration>
반응형