belugabehr commented on a change in pull request #947:
URL: https://github.com/apache/hive/pull/947#discussion_r436693841
##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -1481,6 +1481,9 @@ private static void populateLlapDaemonVarsSet(Set<String>
llapDaemonVarsSetLocal
HIVEQUERYNAME ("hive.query.name", null,
"This named is used by Tez to set the dag name. This name in turn will
appear on \n" +
"the Tez UI representing the work that was done."),
+ HIVETEZJOBNAME("tez.job.name",null,
Review comment:
The default value here should be `HIVE-%s`
##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -1481,6 +1481,9 @@ private static void populateLlapDaemonVarsSet(Set<String>
llapDaemonVarsSetLocal
HIVEQUERYNAME ("hive.query.name", null,
"This named is used by Tez to set the dag name. This name in turn will
appear on \n" +
"the Tez UI representing the work that was done."),
+ HIVETEZJOBNAME("tez.job.name",null,
Review comment:
The default value here should be `HIVE-%s` and watch the style. 'null'
should have a space before it.
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
##########
@@ -310,7 +311,11 @@ protected void openInternal(final HiveConf conf,
Collection<String> additionalFi
setupSessionAcls(tezConfig, conf);
- final TezClient session = TezClient.newBuilder("HIVE-" + sessionId,
tezConfig)
+ String tezJobName = HiveConf.getVar(conf,ConfVars.HIVETEZJOBNAME);
+ if (StringUtils.isBlank(tezJobName)){
+ tezJobName = String.format("HIVE-%s", sessionId);
Review comment:
This is not quite what I was suggesting. Right now, the format only
happens for the default value. it should be allowed for the user's customer
value as well. I'm not even sure I would worry about the `isBlank` check.
Just rely on the default value. of `HIVETEZJOBNAME`
##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -1481,6 +1481,9 @@ private static void populateLlapDaemonVarsSet(Set<String>
llapDaemonVarsSetLocal
HIVEQUERYNAME ("hive.query.name", null,
"This named is used by Tez to set the dag name. This name in turn will
appear on \n" +
"the Tez UI representing the work that was done."),
+ HIVETEZJOBNAME("tez.job.name", null,
Review comment:
The second value here, I believe is a 'default' value. The default
should be `HIVE-%s`
##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -1481,6 +1481,9 @@ private static void populateLlapDaemonVarsSet(Set<String>
llapDaemonVarsSetLocal
HIVEQUERYNAME ("hive.query.name", null,
"This named is used by Tez to set the dag name. This name in turn will
appear on \n" +
"the Tez UI representing the work that was done."),
+ HIVETEZJOBNAME("tez.job.name", null,
Review comment:
The second value here, I believe is a 'default' value. The default
should be `HIVE-%s`. Also please update comments to explain how this works.
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
##########
@@ -310,7 +310,8 @@ protected void openInternal(final HiveConf conf,
Collection<String> additionalFi
setupSessionAcls(tezConfig, conf);
- final TezClient session = TezClient.newBuilder("HIVE-" + sessionId,
tezConfig)
+ String tezJobName = HiveConf.getVar(conf, ConfVars.HIVETEZJOBNAME,
sessionId);
+ final TezClient session = TezClient.newBuilder(String.format("HIVE-%s",
tezJobName), tezConfig)
Review comment:
Here is what I am suggesting:
```
String tezJobNameFormat = HiveConf.getVar(conf, ConfVars.HIVETEZJOBNAME);
final TezClient session =
TezClient.newBuilder(String.format(tezJobNameFormat, sessionId), tezConfig)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]