xiejiajun commented on a change in pull request #1080:
URL: https://github.com/apache/hive/pull/1080#discussion_r437552140



##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -1500,6 +1500,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:
       We can use 'set tez.job.name=<customized_job_name>;' or '--hiveconf 
ez.job.name=<customized_job_name>'  to use this function to customize Yarn 
application name when we run a sql
   

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
##########
@@ -317,7 +317,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:
       Thanks for the hint, I have updated the code according to your suggestion




----------------------------------------------------------------
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]

Reply via email to