public class Lineage
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Lineage.Type
Lineage metrics resource types.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LINEAGE_NAMESPACE |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String details)
Adds the given details as Lineage.
|
void |
add(java.lang.String system,
java.lang.Iterable<java.lang.String> segments)
Add a FQN (fully-qualified name) to Lineage.
|
void |
add(java.lang.String system,
@Nullable java.lang.String subtype,
java.lang.Iterable<java.lang.String> segments)
Add a FQN (fully-qualified name) to Lineage.
|
static java.lang.String |
getFqName(java.lang.String system,
java.lang.Iterable<java.lang.String> segments)
Assemble the FQN of given system, and segments.
|
static java.lang.String |
getFqName(java.lang.String system,
@Nullable java.lang.String subtype,
java.lang.Iterable<java.lang.String> segments)
Assemble fully qualified name (FQN).
|
static Lineage |
getSinks()
Lineage representing sinks. |
static Lineage |
getSources()
Lineage representing sources and optionally side inputs. |
static java.util.Set<java.lang.String> |
query(MetricResults results,
Lineage.Type type)
Query
StringSet metrics from MetricResults . |
static java.lang.String |
wrapSegment(java.lang.String value)
Wrap segment to valid segment name.
|
public static final java.lang.String LINEAGE_NAMESPACE
public static Lineage getSources()
Lineage
representing sources and optionally side inputs.@Internal public static java.lang.String wrapSegment(java.lang.String value)
Specifically, If there are reserved chars (colon, whitespace, dot), escape with backtick. If the segment is already wrapped, return the original.
This helper method is for internal and testing usage only.
@Internal public static java.lang.String getFqName(java.lang.String system, @Nullable java.lang.String subtype, java.lang.Iterable<java.lang.String> segments)
system:segment1.segment2
system:subtype:segment1.segment2
system:`segment1.with.dots:clons`.segment2
This helper method is for internal and testing usage only.
@Internal public static java.lang.String getFqName(java.lang.String system, java.lang.Iterable<java.lang.String> segments)
This helper method is for internal and testing usage only.
public void add(java.lang.String system, @Nullable java.lang.String subtype, java.lang.Iterable<java.lang.String> segments)
getFqName(java.lang.String, java.lang.String, java.lang.Iterable<java.lang.String>)
.public void add(java.lang.String system, java.lang.Iterable<java.lang.String> segments)
getFqName(java.lang.String, java.lang.String, java.lang.Iterable<java.lang.String>)
.public void add(java.lang.String details)
public static java.util.Set<java.lang.String> query(MetricResults results, Lineage.Type type)
StringSet
metrics from MetricResults
.