Package org.apache.sysds.lops
Class Data
- java.lang.Object
- 
- org.apache.sysds.lops.Lop
- 
- org.apache.sysds.lops.Data
 
 
- 
 public class Data extends Lop Lop to represent data objects. Data objects represent matrices, vectors, variables, literals. Can be for both input and output.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.sysds.lops.LopLop.SimpleInstType, Lop.Type, Lop.VisitStatus
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static StringPREAD_PREFIX- 
Fields inherited from class org.apache.sysds.lops.Lop_beginColumn, _beginLine, _endColumn, _endLine, _filename, CP_CHILD_THREAD, CP_ROOT_THREAD_ID, DATATYPE_PREFIX, FILE_SEPARATOR, FRAME_VAR_NAME_PREFIX, INSTRUCTION_DELIMITOR, LITERAL_PREFIX, MATRIX_VAR_NAME_PREFIX, NAME_VALUE_SEPARATOR, OPERAND_DELIMITOR, PROCESS_PREFIX, SAMPLE_FRACTION, SCALAR_VAR_NAME_PREFIX, UPDATE_INPLACE_PREFIX, VALUETYPE_PREFIX, VARIABLE_NAME_PLACEHOLDER
 
- 
 - 
Constructor SummaryConstructors Constructor Description Data(Types.OpOpData op, Lop input, HashMap<String,Lop> inputParametersLops, String name, String literal, Types.DataType dt, Types.ValueType vt, Types.FileFormat fmt)Constructor to setup read or write LOP In case of write:inputmust be provided.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DatacreateLiteralLop(Types.ValueType vt, String literalValue)Method to create literal LOPs.booleangetBooleanValue()StringgetCreateVarInstructions(String outputFileName, String outputLabel)doublegetDoubleValue()Types.FileFormatgetFileFormatType()method to get format type for input, output files.HashMap<String,Lop>getInputParams()method to get inputParamsStringgetInstructions()Method to generate createvar instruction that updates symbol table with metadata, hdfsfile name, etc.StringgetInstructions(String outputFileName)Method should be overridden if neededStringgetInstructions(String input1, String input2)Method to get CP instructions for reading/writing scalars and matrices from/to HDFS.longgetLongValue()LopgetNamedInputLop(String name)LopgetNamedInputLop(String name, String defaultVal)Types.OpOpDatagetOperationType()method to get operation type, i.e.StringgetStringValue()booleanisLiteral()method to check if this data lop represents a literal.booleanisPersistentRead()booleanisPersistentWrite()voidsetExecType(Types.ExecType et)Data-Lop-specific method to set the execution type for persistent write.StringtoString()Method to have Lops print their state.- 
Methods inherited from class org.apache.sysds.lops.LopactivatePrefetch, addInput, addOutput, addToDag, createReachable, getAggType, getBeginColumn, getBeginLine, getBroadcastInput, getDataType, getEndColumn, getEndLine, getExecType, getFederatedOutput, getFilename, getID, getInputs, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getLevel, getOutputParameters, getOutputs, getPrivacyConstraint, getProducesIntermediateOutput, getReachable, getSimpleInstructionType, getType, getValueType, getVisited, isAllOutputsCP, isDataExecLocation, isVariable, prefetchActivated, prepInputOperand, prepInputOperand, prepOperand, prepOperand, prepOutputOperand, prepOutputOperand, prepOutputOperand, prepScalarInputOperand, prepScalarInputOperand, prepScalarLabel, prepScalarOperand, printErrorLocation, removeConsumer, removeOutput, replaceInput, resetVisitStatus, setAllPositions, setBeginColumn, setBeginLine, setConsumerCount, setDataType, setEndColumn, setEndLine, setFederatedOutput, setFilename, setPrivacyConstraint, setValueType, setVisited
 
- 
 
- 
- 
- 
Field Detail- 
PREAD_PREFIXpublic static final String PREAD_PREFIX - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
Datapublic Data(Types.OpOpData op, Lop input, HashMap<String,Lop> inputParametersLops, String name, String literal, Types.DataType dt, Types.ValueType vt, Types.FileFormat fmt) Constructor to setup read or write LOP In case of write:inputmust be provided. This will always be added as the first element ininputarray. For literals: this function is invoked through the static methodcreateLiteralLop.- Parameters:
- op- operation type
- input- low-level operator
- inputParametersLops- input lops
- name- string name
- literal- string literal
- dt- data type
- vt- value type
- fmt- file format
 
 
- 
 - 
Method Detail- 
createLiteralLoppublic static Data createLiteralLop(Types.ValueType vt, String literalValue) Method to create literal LOPs.- Parameters:
- vt- value type
- literalValue- literal value
- Returns:
- literal low-level operator
 
 - 
setExecTypepublic void setExecType(Types.ExecType et) Data-Lop-specific method to set the execution type for persistent write. TODO: split lops into MR/CP lop.- Overrides:
- setExecTypein class- Lop
- Parameters:
- et- execution type
 
 - 
getFileFormatTypepublic Types.FileFormat getFileFormatType() method to get format type for input, output files.- Returns:
- file format
 
 - 
toStringpublic String toString() Description copied from class:LopMethod to have Lops print their state. This is for debugging purposes.
 - 
getOperationTypepublic Types.OpOpData getOperationType() method to get operation type, i.e. read/write.- Returns:
- operation type
 
 - 
getInputParamspublic HashMap<String,Lop> getInputParams() method to get inputParams- Returns:
- input parameters
 
 - 
isLiteralpublic boolean isLiteral() method to check if this data lop represents a literal.- Returns:
- true if data lop is a literal
 
 - 
getBooleanValuepublic boolean getBooleanValue() 
 - 
getDoubleValuepublic double getDoubleValue() 
 - 
getLongValuepublic long getLongValue() 
 - 
getStringValuepublic String getStringValue() 
 - 
isPersistentWritepublic boolean isPersistentWrite() 
 - 
isPersistentReadpublic boolean isPersistentRead() 
 - 
getInstructionspublic String getInstructions(String input1, String input2) Method to get CP instructions for reading/writing scalars and matrices from/to HDFS. This method generates CP read/write instructions.- Overrides:
- getInstructionsin class- Lop
- Parameters:
- input1- input 1
- input2- output
- Returns:
- instructions as string
 
 - 
getInstructionspublic String getInstructions() Method to generate createvar instruction that updates symbol table with metadata, hdfsfile name, etc.- Overrides:
- getInstructionsin class- Lop
- Returns:
- instructions as string
 
 - 
getInstructionspublic String getInstructions(String outputFileName) Description copied from class:LopMethod should be overridden if needed- Overrides:
- getInstructionsin class- Lop
- Parameters:
- outputFileName- output
- Returns:
- instructions as string
 
 
- 
 
-