Compare commits

...

1 Commits

Author SHA1 Message Date
sponomarova
a62b7c09dc patch(TPS-2988): Duplicate variable Compile Error When Having several tELTHiveOutput 2019-03-15 13:52:00 +02:00
2 changed files with 12 additions and 6 deletions

View File

@@ -226,7 +226,7 @@ if(hiveDistrib.isExecutedThroughWebHCat()) {
}
}
%>
log.info("Query sent to HiveServer2 to be executed with [Application Name(MapReduce)/DAG Name(Tez): " + queryIdentifier + "]");
log.info("Query sent to HiveServer2 to be executed with [Application Name(MapReduce)/DAG Name(Tez): " + queryIdentifier_<%=cid %> + "]");
} catch (java.lang.Exception e) {
whetherReject_<%=cid%> = true;
<%

View File

@@ -1,8 +1,14 @@
<%@ jet %>
java.text.DateFormat dateStrFormat = new java.text.SimpleDateFormat("yyyyMMddHHmmss");
final String queryIdentifier = projectName + "_" + jobName + "_" + jobVersion.replace(".", "_") + "_<%=cid%>_" + dateStrFormat.format(new Date(startTime));
java.text.DateFormat dateStrFormat_<%=cid %> = new java.text.SimpleDateFormat("yyyyMMddHHmmss");
final String queryIdentifier_<%=cid %> = projectName + "_" + jobName + "_" + jobVersion.replace(".", "_") + "_<%=cid%>_" + dateStrFormat_<%=cid %>.format(new Date(startTime));
// For MapReduce Mode
stmt_<%=cid %>.execute("set mapred.job.name=" + queryIdentifier);
// For Tez Mode
stmt_<%=cid %>.execute("set hive.query.name=" + queryIdentifier);
stmt_<%=cid %>.execute("set mapred.job.name=" + queryIdentifier_<%=cid %>);
<%
if(hiveDistrib.doSupportTezForHive()) {
%>
// For Tez Mode
stmt_<%=cid %>.execute("set hive.query.name=" + queryIdentifier_<%=cid %>);
<%
}
%>