我如何控制配置单元名称,但保留舞台信息? [英] How do I control a hive job name but keep the stage info?

查看:158
本文介绍了我如何控制配置单元名称,但保留舞台信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些我的系统定期执行的配置单元查询。当你看到作业追踪器时,它们显示为SELECT field,other_field .....(Stage-1)和类似的。这对我不是特别有用,所以我补充说:


set mapred.job.name =更有用的名称;


到查询。现在我可以更好地分辨他们。但是,现在我的分为多个阶段的查询都显示为相同的名称。我理想上喜欢的是类似于

set mapred.job.name =更有用的名称(Stage-%d);



其中%d将被当前阶段编号取代。

这是可能的吗?有人知道吗? p>

I have a number of hive queries that my system executes on a regular basis. When you look at the job tracker, they show up as "SELECT field, other_field ..... (Stage-1)" and similar. That's not particularly helpful to me, so I added:

set mapred.job.name = more helpful name;
to the query. Now I can tell them apart better. However, now my queries that get split into multiple stages all show up as the same name. What I'd ideally like is something along the lines of

set mapred.job.name = more helpful name (Stage-%d);
where the %d would get replaced by the current stage number.
Is this possible, and does anyone know how?

推荐答案

我不确定有什么方法可以实现您想要的内容,但我可以提供其他内容。

而不是使用设置mapred.job.name ,您可以在查询的开头添加一个注释,使用更有用的名称像这样:

- 这是一个更有用的名称

SELECT字段,other_field ....

I'm not sure there is a way to implement exactly what you wish but I can offer something else.
Instead of using set mapred.job.name you can add a comment in the beginning of the query with a more helpful name like this :
-- this is a more helpful name
SELECT field, other_field ....

然后,在jobtracker中您会看到 - 这是一个更有用的名称.....(Stage-%d) code>

Then, in the jobtracker you'll see -- this is a more helpful name ..... (Stage-%d)"

这篇关于我如何控制配置单元名称,但保留舞台信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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