Class VariableCPInstruction

All Implemented Interfaces:
LineageTraceable

public class VariableCPInstruction extends CPInstruction implements LineageTraceable
  • Method Details

    • isRemoveVariable

      public boolean isRemoveVariable(String varName)
      Checks if this instruction is a remove instruction for varName
      Parameters:
      varName - variable name
      Returns:
      true if rmvar instruction including varName
    • isRemoveVariableNoFile

      public boolean isRemoveVariableNoFile()
    • isRemoveVariable

      public boolean isRemoveVariable()
    • isMoveVariable

      public boolean isMoveVariable()
    • isAssignVariable

      public boolean isAssignVariable()
    • isAssignOrCopyVariable

      public boolean isAssignOrCopyVariable()
    • isCreateVariable

      public boolean isCreateVariable()
    • getVariableOpcode

      public VariableCPInstruction.VariableOperationCode getVariableOpcode()
    • getFormatProperties

      public FileFormatProperties getFormatProperties()
    • getInputs

      public List<CPOperand> getInputs()
    • getInput1

      public CPOperand getInput1()
    • getInput2

      public CPOperand getInput2()
    • getInput3

      public CPOperand getInput3()
    • getInput4

      public CPOperand getInput4()
    • getInput

      public CPOperand getInput(int index)
    • addInput

      public void addInput(CPOperand input)
    • getOutputVariableName

      public String getOutputVariableName()
    • getOutput

      public CPOperand getOutput()
    • parseInstruction

      public static VariableCPInstruction parseInstruction(String str)
    • processInstruction

      public void processInstruction(ExecutionContext ec)
      Description copied from class: Instruction
      This method should be used to execute the instruction.
      Specified by:
      processInstruction in class CPInstruction
      Parameters:
      ec - execution context
    • processRmvarInstruction

      public 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
      Parameters:
      ec - execution context
      varname - variable name
    • prepareRemoveInstruction

      public static Instruction prepareRemoveInstruction(long... varName)
    • prepareRemoveInstruction

      public static Instruction prepareRemoveInstruction(String... varNames)
    • prepareCopyInstruction

      public static Instruction prepareCopyInstruction(String srcVar, String destVar)
    • prepMoveInstruction

      public static Instruction prepMoveInstruction(String srcVar, String destFileName, String format)
    • prepMoveInstruction

      public static Instruction prepMoveInstruction(String srcVar, String destVar)
    • prepCreatevarInstruction

      public static Instruction prepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, String format)
    • prepCreatevarInstruction

      public static Instruction prepCreatevarInstruction(String varName, String fileName, boolean fNameOverride, Types.DataType dt, String format, DataCharacteristics mc, MatrixObject.UpdateType update)
    • prepCreatevarInstruction

      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)
    • updateInstructionThreadID

      public void updateInstructionThreadID(String pattern, String replace)
      Description copied from class: Instruction
      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
      Overrides:
      updateInstructionThreadID in class Instruction
      Parameters:
      pattern - ?
      replace - ?
    • getLineageItem

      public org.apache.commons.lang3.tuple.Pair<String,LineageItem> getLineageItem(ExecutionContext ec)
      Description copied from interface: LineageTraceable
      Obtain lineage trace of an instruction with a single output.
      Specified by:
      getLineageItem in interface LineageTraceable
      Parameters:
      ec - execution context w/ live variables
      Returns:
      pair of (output variable name, output lineage item)
    • isVariableCastInstruction

      public boolean isVariableCastInstruction()
    • getUniqueFileName

      public static String getUniqueFileName(String fname)
    • getMetaData

      public MetaData getMetaData()