[
https://issues.apache.org/jira/browse/HIVE-13286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15200317#comment-15200317
]
Vikram Dixit K commented on HIVE-13286:
---------------------------------------
[~aihuaxu] I think the bug still exists here. I see that once I set a query id,
it never changes. I think you need the following change in the Driver class as
well:
{code}
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
index 7327a42..1fac526 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
@@ -403,13 +403,7 @@ public int compile(String command, boolean resetTaskIds) {
}
saveSession(queryState);
- // Generate new query id if it's not set for CLI case. If it's session
based,
- // query id is passed in from the client or initialized when the session
starts.
- String queryId = conf.getVar(HiveConf.ConfVars.HIVEQUERYID);
- if (queryId == null || queryId.isEmpty()) {
- queryId = QueryPlan.makeQueryId();
- conf.setVar(HiveConf.ConfVars.HIVEQUERYID, queryId);
- }
+ conf.setVar(HiveConf.ConfVars.HIVEQUERYID, QueryPlan.makeQueryId());
//save some info for webUI for use after plan is freed
this.queryDisplay.setQueryStr(queryStr);
{code}
I ran a test with a lot more queries than earlier and it turned out that the
query id did not change.
> Query ID is being reused across queries
> ---------------------------------------
>
> Key: HIVE-13286
> URL: https://issues.apache.org/jira/browse/HIVE-13286
> Project: Hive
> Issue Type: Bug
> Components: Parser
> Affects Versions: 2.0.0
> Reporter: Vikram Dixit K
> Assignee: Aihua Xu
> Priority: Critical
> Attachments: HIVE-13286.1.patch, HIVE-13286.2.patch
>
>
> [~aihuaxu] I see this commit made via HIVE-11488. I see that query id is
> being reused across queries. This defeats the purpose of a query id. I am not
> sure what the purpose of the change in that jira is but it breaks the
> assumption about a query id being unique for each query. Please take a look
> into this at the earliest.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)