hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aihu...@apache.org
Subject hive git commit: HIVE-18023: Redact the expression in lineage info (Aihua Xu, reviewed by Yongzhi Chen)
Date Mon, 13 Nov 2017 22:46:05 GMT
Repository: hive
Updated Branches:
  refs/heads/master d8bc002af -> 83971dec5


HIVE-18023: Redact the expression in lineage info (Aihua Xu, reviewed by Yongzhi Chen)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/83971dec
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/83971dec
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/83971dec

Branch: refs/heads/master
Commit: 83971dec5715071414597a2c0043752fe5186ecd
Parents: d8bc002
Author: Aihua Xu <aihuaxu@apache.org>
Authored: Wed Nov 8 14:23:27 2017 -0800
Committer: Aihua Xu <aihuaxu@apache.org>
Committed: Mon Nov 13 14:45:46 2017 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/ql/hooks/LineageLogger.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/83971dec/ql/src/java/org/apache/hadoop/hive/ql/hooks/LineageLogger.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/LineageLogger.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/LineageLogger.java
index bdd98cf..2f764f8 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/LineageLogger.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/LineageLogger.java
@@ -175,7 +175,7 @@ public class LineageLogger implements ExecuteWithHookContext {
 
         List<Edge> edges = getEdges(plan, index);
         Set<Vertex> vertices = getVertices(edges);
-        writeEdges(writer, edges);
+        writeEdges(writer, edges, hookContext.getConf());
         writeVertices(writer, vertices);
         writer.endObject();
         writer.close();
@@ -415,7 +415,8 @@ public class LineageLogger implements ExecuteWithHookContext {
   /**
    * Write out an JSON array of edges.
    */
-  private void writeEdges(JsonWriter writer, List<Edge> edges) throws IOException {
+  private void writeEdges(JsonWriter writer, List<Edge> edges, HiveConf conf)
+      throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException
{
     writer.name("edges");
     writer.beginArray();
     for (Edge edge: edges) {
@@ -433,7 +434,7 @@ public class LineageLogger implements ExecuteWithHookContext {
       }
       writer.endArray();
       if (edge.expr != null) {
-        writer.name("expression").value(edge.expr);
+        writer.name("expression").value(HookUtils.redactLogString(conf, edge.expr));
       }
       writer.name("edgeType").value(edge.type.name());
       writer.endObject();


Mime
View raw message