aasha commented on a change in pull request #2136:
URL: https://github.com/apache/hive/pull/2136#discussion_r605347449



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/util/ReplUtils.java
##########
@@ -457,17 +457,20 @@ public static Path getLatestDumpPath(Path dumpRoot, 
HiveConf conf) throws IOExce
     return null;
   }
 
-  public static String getDistCpCustomName(HiveConf conf) {
+  public static String getDistCpCustomName(HiveConf conf, String dbName) {
     String userChosenName = conf.get(JobContext.JOB_NAME);
     if (StringUtils.isEmpty(userChosenName)) {
-      String policyName = conf.get(SCHEDULED_QUERY_SCHEDULENAME, 
"POLICY_NAME");
-      String policyId =
-          conf.get(SCHEDULED_QUERY_EXECUTIONID, "QUERY_EXECUTION_ID");
-      userChosenName = "Repl#" + policyName + "#" + policyId;
+      String policyName = conf.get(SCHEDULED_QUERY_SCHEDULENAME, "");
+      if (policyName.isEmpty()) {
+        userChosenName = "Repl#" + dbName;
+      } else {
+        String policyId = conf.get(SCHEDULED_QUERY_EXECUTIONID, "");

Review comment:
       use policyName




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