Packages

c

com.linkedin.feathr.common

FeatureDependencyGraph

class FeatureDependencyGraph extends AnyRef

A dependency graph for feature anchors and feature derivations.

Purpose 1: Given a list of features' dependencies and which features are anchored, build a graph that can determine which features are reachable and can resolve features' transitive dependencies on demand. Purpose 2: Given a list of features with entity key bindings (a.k.a. key tags), provide fully expanded list of all transitive dependencies including entity key bindings. E.g. if feature2 depends on feature1, and the request was for [ (a1):feature2, (a2):feature2 ], then the expanded dependencies would be: [ (a1):feature2, (a2):feature2, (a1):feature1, (a2):feature1]

Annotations
@InternalApi()
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FeatureDependencyGraph
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FeatureDependencyGraph(dependencyFeatures: Map[String, Set[ErasedEntityTaggedFeature]], anchoredFeatures: Collection[String])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def getComputationPipeline(requestedFeatures: Collection[TaggedFeatureName]): List[Set[TaggedFeatureName]]

    Return a computation pipeline (a collection of stages that can be computed simultaneously) for the requested features by examining their dependencies and grouping them based on their depth.

    Return a computation pipeline (a collection of stages that can be computed simultaneously) for the requested features by examining their dependencies and grouping them based on their depth. For each stage, all features will have their direct dependencies resolved from the previous stages so they can be computed simultaneously

    For example, if the feature dependencies are as follows and features E and F are requested A -> C B -> D (C,D) -> E F

    Then the result would be returned in the form of an ordered list: F],[C,D],[E which represents stage 1: A, B, F stage 2: C, D stage 3: E

    Disclaimer: the pipeline based approach provides one way to optimize the feature execution and their dependencies but it is by no means the most optimal. For example, in the example above, if A is very slow compared to B and F, then computation of C will be blocked until A is ready. The optimal solution where each feature is computed in isolation all the way from its root dependency.

    returns

    a sorted list of features represents the stages for feature execution

  11. def getOrderedPlanForFeatureUrns(request: Collection[TaggedFeatureName]): List[TaggedFeatureName]

    Returns an ordered list of features including the requested features and its dependencies that represents their execution order.

    Returns an ordered list of features including the requested features and its dependencies that represents their execution order.

    For example, if the feature dependency is A->B, B->C and (A,C) -> D. Then one possible execution order would be: A, B, C, D

  12. def getPlan(features: Collection[String]): List[String]

    Construct a plan for procuring a group of features.

    Construct a plan for procuring a group of features.

    For a given group of features, what are all the features (transitive dependencies) that need to be procured in order to derive them? This function returns a complete, ordered list of features sufficient to derive the given group of features when evaluated in-order.

    returns

    Ordered list of feature names that can be resolved in-sequence to produce a superset of the given group of features. The returned list is NOT just a re-ordering of the input features, and may contain other features that weren't specifically requested but are required as dependencies. The returned list will always contain all of the features provided in the input.

  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def isDeclared(feature: String): Boolean

    Returns whether a given feature name is present in the dependency graph

    Returns whether a given feature name is present in the dependency graph

    returns

    whether a given feature name is present in the dependency graph

  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def isReachableWithErrorMessage(feature: String): Pair[Boolean, String]

    Returns whether a given feature is reachable

    Returns whether a given feature is reachable

    returns

    A Pair of Boolean and String. Boolean indicates if it's reachable and the String indicates the error message if not reachable.

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    FeatureDependencyGraph → AnyRef → Any
    Annotations
    @Override()
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Deprecated Value Members

  1. def getOrderedPlanForRequest(request: Collection[TaggedFeatureName]): List[TaggedFeatureName]

    Use #getOrderedPlanForFeatureUrns instead.

    Annotations
    @Deprecated
    Deprecated
  2. def isReachable(feature: String): Boolean

    Returns whether a given feature is reachable

    Returns whether a given feature is reachable

    returns

    isReachable Boolean

    Annotations
    @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped