Commit f6388234 by Vimal Sharma

Remove QueryPlan attribute from Hive Process entity

parent ea6c3cb5
......@@ -175,7 +175,6 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
final HiveEventContext event = new HiveEventContext();
event.setInputs(hookContext.getInputs());
event.setOutputs(hookContext.getOutputs());
event.setJsonPlan(getQueryPlan(hookContext.getConf(), hookContext.getQueryPlan()));
event.setHookType(hookContext.getHookType());
event.setUgi(hookContext.getUgi());
event.setUser(getUser(hookContext.getUserName()));
......@@ -668,18 +667,6 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
}
}
private JSONObject getQueryPlan(HiveConf hiveConf, QueryPlan queryPlan) throws Exception {
try {
ExplainTask explain = new ExplainTask();
explain.initialize(hiveConf, queryPlan, null);
List<Task<?>> rootTasks = queryPlan.getRootTasks();
return explain.getJSONPlan(null, null, rootTasks, queryPlan.getFetchTask(), true, false, false);
} catch (Throwable e) {
LOG.info("Failed to get queryplan", e);
return new JSONObject();
}
}
private boolean isSelectQuery(HiveEventContext event) {
if (event.getOperation() == HiveOperation.QUERY) {
//Select query has only one output
......@@ -778,7 +765,7 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
processReferenceable.set("userName", hiveEvent.getUser());
processReferenceable.set("queryText", queryStr);
processReferenceable.set("queryId", hiveEvent.getQueryId());
processReferenceable.set("queryPlan", hiveEvent.getJsonPlan());
processReferenceable.set("queryPlan", "Not Supported");
processReferenceable.set(AtlasConstants.CLUSTER_NAME_ATTRIBUTE, dgiBridge.getClusterName());
List<String> recentQueries = new ArrayList<>(1);
......@@ -1022,10 +1009,6 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
this.hookType = hookType;
}
public void setJsonPlan(JSONObject jsonPlan) {
this.jsonPlan = jsonPlan;
}
public void setQueryId(String queryId) {
this.queryId = queryId;
}
......@@ -1075,10 +1058,6 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
return hookType;
}
public JSONObject getJsonPlan() {
return jsonPlan;
}
public String getQueryId() {
return queryId;
}
......
......@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES:
ATLAS-1279 Remove QueryPlan attribute from Hive Process entity (svimal2106)
ATLAS-1234 Lineage REST API - v2 (sarath.kum4r@gmail.com via mneethiraj)
ATLAS-1276 fix for webapp test failures (ayubkhan via mneethiraj)
ATLAS-1278 Added API to get typedef header info (apoorvnaik via mneethiraj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment