Files
impala/common/thrift/LineageGraph.thrift
Tianyi Wang c505a8159b IMPALA-6210: Add query id to lineage graph logging
Some tools use lineage graph logging to collect query metrics. Currently
only query hash is present in this log. Adding query id into it makes
such accounting easier.

Testing: The equality of query id in the query profile and lineage log
is checked in test_lineage.py. A test for TUniqueIdUtil is added to the
FE tests.

Change-Id: I4adbd02df37a234dbb79f58b7c46ca11a914229f
Reviewed-on: http://gerrit.cloudera.org:8080/8589
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: Impala Public Jenkins
2017-12-06 00:52:19 +00:00

71 lines
1.7 KiB
Thrift

// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
namespace cpp impala
namespace java org.apache.impala.thrift
include "Types.thrift"
struct TVertex {
// Vertex id
1: required i64 id
// Column label
2: required string label
}
enum TEdgeType {
PROJECTION,
PREDICATE
}
struct TMultiEdge {
// Set of source vertices
1: list<TVertex> sources
// Set of target vertices
2: list<TVertex> targets
// Connecting edge type
3: TEdgeType edgetype
}
struct TLineageGraph {
// Input SQL query
1: required string query_text
// md5 hash of the query string
2: required string hash
// Name of the user who issued this query
3: required string user
// Query start time as a unix epoch, set in planner
4: required i64 started
// Query end time as unix epoch.
// Marked as optional as it is set in the backend
5: optional i64 ended
6: list<TMultiEdge> edges
7: list<TVertex> vertices
// Query id in TQueryCtx
8: required Types.TUniqueId query_id
}