Package org.apache.sysds.runtime.lineage

# Class LineageItemUtils

java.lang.Object
org.apache.sysds.runtime.lineage.LineageItemUtils

public class LineageItemUtils extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`FUNC_DELIM`
`static final String`
`LPLACEHOLDER`
`static final String`
`SERIALIZATION_OPCODE`

## Constructor Summary

Constructors
Constructor
Description
`LineageItemUtils()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`addAllDataLineage(ExecutionContext ec)`
`static void`
`checkCycles(LineageItem current)`
`static void`
`constructLineageFromHops(Hop[] roots, String claName, Hop[] inputs, HashMap<Long,Hop> spoofmap)`
`static boolean`
`containsRandDataGen(HashSet<LineageItem> entries, LineageItem root)`
`static LineageItem`
`createScalarLineageItem(LiteralOp lop)`
`static String`
`explainLineageAsInstruction(LineageItem li, Statistics.LineageNGramExtension ext)`
`static String`
`explainLineageType(LineageItem li, Statistics.LineageNGramExtension ext)`
`static String`
`explainLineageWithTypes(LineageItem li, Statistics.LineageNGramExtension ext)`
`static String`
`explainSingleLineageItem(LineageItem li)`
`static LineageItem[]`
`getLineage(ExecutionContext ec, CPOperand... operands)`
`static LineageItem[]`
`getLineageItemInputstoSB(ArrayList<String> inputs, ExecutionContext ec)`
`static LineageItem`
`getSerializedFedResponseLineageItem(LineageItem li)`
`static LineageItem.LineageItemType`
`getType(String str)`
`static boolean`
`hasValidInsts(ArrayList<Instruction> insts)`
`static boolean`
`isFunctionDebugging()`
`static void`
`rCheckCycles(LineageItem current, Set<Long> probe, boolean useObjIdent)`
`static void`
`rConstructLineageFromHops(Hop root, Hop[] inputs, Map<Long,LineageItem> operands, HashMap<Long,Hop> spoofmap)`
`static LineageItem`
`rDecompress(LineageItem item)`
Deprecated.
`static LineageItem`
`replace(LineageItem root, LineageItem liOld, LineageItem liNew)`
`static void`
`replaceDagLeaves(ExecutionContext ec, LineageItem root, CPOperand[] newLeaves)`
`static void`
`rGetDagLeaves(HashSet<LineageItem> leaves, LineageItem root)`
`static void`
`rReplaceDagLeaves(LineageItem root, LineageItem[] newleaves)`
`static void`
`rReplaceNR(LineageItem current, LineageItem liOld, LineageItem liNew)`
Non-recursive equivalent of `rReplace(LineageItem, LineageItem, LineageItem)` for robustness with regard to stack overflow errors.
`static FederatedResponse`
`setUDFResponse(FederatedUDF udf, MatrixObject mo)`
`static void`
`traceFedUDF(ExecutionContext ec, FederatedUDF udf)`
`static void`
`writeTraceToHDFS(String trace, String fname)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### LPLACEHOLDER

public static final String LPLACEHOLDER

See Also:
  - Constant Field Values

### FUNC_DELIM

public static final String FUNC_DELIM

See Also:
  - Constant Field Values

### SERIALIZATION_OPCODE

public static final String SERIALIZATION_OPCODE

See Also:
  - Constant Field Values

## Constructor Details

### LineageItemUtils

public LineageItemUtils()

## Method Details

### getType

public static LineageItem.LineageItemType getType(String str)

### isFunctionDebugging

public static boolean isFunctionDebugging()

### explainLineageType

public static String explainLineageType(LineageItem li, Statistics.LineageNGramExtension ext)

### explainLineageWithTypes

public static String explainLineageWithTypes(LineageItem li, Statistics.LineageNGramExtension ext)

### explainLineageAsInstruction

public static String explainLineageAsInstruction(LineageItem li, Statistics.LineageNGramExtension ext)

### explainSingleLineageItem

public static String explainSingleLineageItem(LineageItem li)

### getLineage

public static LineageItem[] getLineage(ExecutionContext ec, CPOperand... operands)

### traceFedUDF

public static void traceFedUDF(ExecutionContext ec, FederatedUDF udf)

### setUDFResponse

public static FederatedResponse setUDFResponse(FederatedUDF udf, MatrixObject mo)

### constructLineageFromHops

public static void constructLineageFromHops(Hop[] roots, String claName, Hop[] inputs, HashMap<Long,Hop> spoofmap)

### rConstructLineageFromHops

public static void rConstructLineageFromHops(Hop root, Hop[] inputs, Map<Long,LineageItem> operands, HashMap<Long,Hop> spoofmap)

### rDecompress

@Deprecated public static LineageItem rDecompress(LineageItem item)
Deprecated.

### writeTraceToHDFS

public static void writeTraceToHDFS(String trace, String fname)

### replace

public static LineageItem replace(LineageItem root, LineageItem liOld, LineageItem liNew)

### rReplaceNR

public static void rReplaceNR(LineageItem current, LineageItem liOld, LineageItem liNew)
Non-recursive equivalent of `rReplace(LineageItem, LineageItem, LineageItem)` for robustness with regard to stack overflow errors.

Parameters:
  `current` - Current lineage item
  `liOld` - Old lineage item
  `liNew` - New Lineage item.

### replaceDagLeaves

public static void replaceDagLeaves(ExecutionContext ec, LineageItem root, CPOperand[] newLeaves)

### rReplaceDagLeaves

public static void rReplaceDagLeaves(LineageItem root, LineageItem[] newleaves)

### rGetDagLeaves

public static void rGetDagLeaves(HashSet<LineageItem> leaves, LineageItem root)

### checkCycles

public static void checkCycles(LineageItem current)

### rCheckCycles

public static void rCheckCycles(LineageItem current, Set<Long> probe, boolean useObjIdent)

### containsRandDataGen

public static boolean containsRandDataGen(HashSet<LineageItem> entries, LineageItem root)

### getLineageItemInputstoSB

public static LineageItem[] getLineageItemInputstoSB(ArrayList<String> inputs, ExecutionContext ec)

### hasValidInsts

public static boolean hasValidInsts(ArrayList<Instruction> insts)

### addAllDataLineage

public static void addAllDataLineage(ExecutionContext ec)

### createScalarLineageItem

public static LineageItem createScalarLineageItem(LiteralOp lop)

### getSerializedFedResponseLineageItem

public static LineageItem getSerializedFedResponseLineageItem(LineageItem li)