public class VariableCPInstruction extends CPInstruction implements LineageTraceable
Modifier and Type | Class and Description |
---|---|
static class |
VariableCPInstruction.VariableOperationCode |
CPInstruction.CPType
Instruction.IType
DATATYPE_PREFIX, FEDERATED_INST_PREFIX, GPU_INST_PREFIX, INSTRUCTION_DELIM, LITERAL_PREFIX, OPERAND_DELIM, SP_INST_PREFIX, VALUETYPE_PREFIX
Modifier and Type | Method and Description |
---|---|
void |
addInput(CPOperand input) |
FileFormatProperties |
getFormatProperties() |
CPOperand |
getInput(int index) |
CPOperand |
getInput1() |
CPOperand |
getInput2() |
CPOperand |
getInput3() |
CPOperand |
getInput4() |
List<CPOperand> |
getInputs() |
org.apache.commons.lang3.tuple.Pair<String,LineageItem> |
getLineageItem(ExecutionContext ec)
Obtain lineage trace of an instruction with a single output.
|
CPOperand |
getOutput() |
String |
getOutputVariableName() |
static String |
getUniqueFileName(String fname) |
VariableCPInstruction.VariableOperationCode |
getVariableOpcode() |
boolean |
isAssignOrCopyVariable() |
boolean |
isAssignVariable() |
boolean |
isCreateVariable() |
boolean |
isRemoveVariable() |
boolean |
isRemoveVariable(String varName)
Checks if this instruction is a remove instruction for varName
|
boolean |
isRemoveVariableNoFile() |
boolean |
isVariableCastInstruction() |
static VariableCPInstruction |
parseInstruction(String str) |
static Instruction |
prepareCopyInstruction(String srcVar,
String destVar) |
static Instruction |
prepareRemoveInstruction(long... varName) |
static Instruction |
prepareRemoveInstruction(String... varNames) |
static Instruction |
prepCreatevarInstruction(String varName,
String fileName,
boolean fNameOverride,
String format) |
static Instruction |
prepCreatevarInstruction(String varName,
String fileName,
boolean fNameOverride,
Types.DataType dt,
String format,
DataCharacteristics mc,
MatrixObject.UpdateType update) |
static Instruction |
prepCreatevarInstruction(String varName,
String fileName,
boolean fNameOverride,
Types.DataType dt,
String format,
DataCharacteristics mc,
MatrixObject.UpdateType update,
boolean hasHeader,
String delim,
boolean sparse) |
static Instruction |
prepMoveInstruction(String srcVar,
String destVar) |
static Instruction |
prepMoveInstruction(String srcVar,
String destFileName,
String format) |
void |
processInstruction(ExecutionContext ec)
This method should be used to execute the instruction.
|
static void |
processRmvarInstruction(ExecutionContext ec,
String varname)
Remove variable instruction externalized as a static function in order to allow various
cleanup procedures to use the same codepath as the actual rmVar instruction
|
void |
updateInstructionThreadID(String pattern,
String replace)
All instructions that have thread-specific filenames or names encoded in it
should overwrite this method in order to update (1) the in-memory instruction
and (2) the instruction string
|
getCPInstructionType, getGraphString, getType, preprocessInstruction, requiresLabelUpdate, updateLabels
getBeginColumn, getBeginLine, getEndColumn, getEndLine, getExtendedOpcode, getFilename, getInstID, getInstructionString, getLineNum, getOpcode, getOperator, getPrivacyConstraint, postprocessInstruction, printMe, setInstID, setLocation, setLocation, setLocation, setLocation, setPrivacyConstraint, setPrivacyConstraint, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLineageItems, hasSingleLineage
public boolean isRemoveVariable(String varName)
varName
- variable namepublic boolean isRemoveVariableNoFile()
public boolean isRemoveVariable()
public boolean isAssignVariable()
public boolean isAssignOrCopyVariable()
public boolean isCreateVariable()
public VariableCPInstruction.VariableOperationCode getVariableOpcode()
public FileFormatProperties getFormatProperties()
public CPOperand getInput1()
public CPOperand getInput2()
public CPOperand getInput3()
public CPOperand getInput4()
public CPOperand getInput(int index)
public void addInput(CPOperand input)
public String getOutputVariableName()
public CPOperand getOutput()
public static VariableCPInstruction parseInstruction(String str)
public void processInstruction(ExecutionContext ec)
Instruction
processInstruction
in class CPInstruction
ec
- execution contextpublic static void processRmvarInstruction(ExecutionContext ec, String varname)
ec
- execution contextvarname
- variable namepublic static Instruction prepareRemoveInstruction(long... varName)
public static Instruction prepareRemoveInstruction(String... varNames)
public static Instruction prepareCopyInstruction(String srcVar, String destVar)
public static Instruction prepMoveInstruction(String srcVar, String destFileName, String format)
public static Instruction prepMoveInstruction(String srcVar, String destVar)
public static Instruction prepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, String format)
public static Instruction prepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, Types.DataType dt, String format, DataCharacteristics mc, MatrixObject.UpdateType update)
public static Instruction prepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, Types.DataType dt, String format, DataCharacteristics mc, MatrixObject.UpdateType update, boolean hasHeader, String delim, boolean sparse)
public void updateInstructionThreadID(String pattern, String replace)
Instruction
updateInstructionThreadID
in class Instruction
pattern
- ?replace
- ?public org.apache.commons.lang3.tuple.Pair<String,LineageItem> getLineageItem(ExecutionContext ec)
LineageTraceable
getLineageItem
in interface LineageTraceable
ec
- execution context w/ live variablespublic boolean isVariableCastInstruction()
Copyright © 2020 The Apache Software Foundation. All rights reserved.