在 HIVE 中运行查询时如何更改 Tez 作业名称 [英] How to change Tez job name when running query in HIVE

查看:49
本文介绍了在 HIVE 中运行查询时如何更改 Tez 作业名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 Tez 提交 Hive SQL 时,如下所示:

When I submit a Hive SQL using Tez like below:

hive (default)> select count(*) from simple_data;

在资源管理器 UI 中,作业名称显示类似于 HIVE-9d1906a2-25dd-4a7c-9ea3-bf651036c7eb 是否可以将作业名称更改为 my_job_nam?

In Resource Manager UI the job name shows something like HIVE-9d1906a2-25dd-4a7c-9ea3-bf651036c7eb Is there a way to change the job name tomy_job_nam?

如果我不使用 Tez 并在 MR 中运行作业,我可以使用 set mapred.job.name 设置作业名称.

If I am not using Tez and running the job in MR, I can set the job name using set mapred.job.name.

是否需要设置任何 Tez 参数来更改作业名称?

Are there any Tez parameters I need to set, to change the job name?

感谢任何输入.

推荐答案

想通了.使用属性 hive.session.id 可以更改名称.下面是一个例子.

Got this figured out. Using the property hive.session.id the name could be changed. Below is an example.

hive --hiveconf hive.session.id=test_$(date '+%Y%m%d_%H%M%S') \
      -e "select month, max(sale) from simple_data group by month;"

这篇关于在 HIVE 中运行查询时如何更改 Tez 作业名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆