简体   繁体   English

oozie 中 Hive 操作的作业队列

[英]Job queue for Hive action in oozie

I have a oozie workflow.我有一个 oozie 工作流程。 I am submitting all the hive actions with我正在提交所有的蜂巢动作

<name>mapred.job.queue.name</name>
<value>${queueName}</value>

But for few hive actions, the job launched is not in specified queue;但是对于少数 hive 操作,启动的作业不在指定的队列中; it is invoked in default queue.它在默认队列中调用。

Please suggest me the cause behind this behavior and solution.请告诉我这种行为背后的原因和解决方案。

A. Oozie specifics Oozie propagates the "regular" Hadoop properties to a "regular" MapReduce Action. A. Oozie细节 Oozie将“常规” Hadoop属性传播到“常规” MapReduce操作。

But for other types of Action (Shell, Hive, Java, etc.) where Oozie runs a single Mapper task in YARN, it does not consider that it's a real MapReduce job. 但是对于Oozie在YARN中运行单个Mapper任务的其他类型的Action(Shell,Hive,Java等),它并不认为这是真正的MapReduce工作。 Hence it uses a different set of undocumented properties always prefixed with oozie.launcher. 因此,它使用始终 oozie.launcher. 为前缀不同未记录属性 oozie.launcher. Look into that post for example. 例如查看该帖子

So in your case the actual property to set would be oozie.launcher.mapred.job.queue.name 因此,在您的情况下,要设置的实际属性将是oozie.launcher.mapred.job.queue.name

B. TEZ specifics Excerpt from HortonWorks documentation : B. TEZ的详细信息摘自HortonWorks文档

For example, in Hive you can use the tez.queue.name property in hive-site.xml to specify the queue to use for Hive-on-Tez jobs. 例如,在Hive中,您可以使用hive-site.xml中tez.queue.name属性来指定要用于“ Hive-on-Tez”作业的队列。 To assign Hive-on-Tez jobs to use the "engineering" queue, add the following property to hive-site.xml: 若要将Hive-on-Tez作业分配为使用“工程”队列,请在hive-site.xml中添加以下属性:

<property>  <name>tez.queue.name</name> <value>engineering</value> </property>

In my case using Oozie it seems that there is no way to add --hiveconf tez.queue.name=myqueue in an xml tag.在我使用 Oozie 的情况下,似乎无法在 xml 标记中添加 --hiveconf tez.queue.name=myqueue 。 Trying also by updating the hive-site.xml on hdfs and still no usage of the defined queue.还尝试通过更新 hdfs 上的 hive-site.xml 并且仍然没有使用定义的队列。 I've end up with updating the .hql file by adding the below at the beginning of the required query:我最终通过在所需查询的开头添加以下内容来更新 .hql 文件:

# in your hql file
SET tez.queue.name=${myqueue};

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM