public class Data extends Lop
Lop.SimpleInstType, Lop.Type, Lop.VisitStatus
Modifier and Type | Field and Description |
---|---|
static String |
PREAD_PREFIX |
_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 and 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:
input must be provided. |
Modifier and Type | Method and Description |
---|---|
static Data |
createLiteralLop(Types.ValueType vt,
String literalValue)
Method to create literal LOPs.
|
boolean |
getBooleanValue() |
String |
getCreateVarInstructions(String outputFileName,
String outputLabel) |
double |
getDoubleValue() |
Types.FileFormat |
getFileFormatType()
method to get format type for input, output files.
|
HashMap<String,Lop> |
getInputParams()
method to get inputParams
|
String |
getInstructions()
Method to generate createvar instruction that updates symbol table with metadata, hdfsfile name, etc.
|
String |
getInstructions(String outputFileName)
Method should be overridden if needed
|
String |
getInstructions(String input1,
String input2)
Method to get CP instructions for reading/writing scalars and matrices from/to HDFS.
|
long |
getLongValue() |
Lop |
getNamedInputLop(String name) |
Lop |
getNamedInputLop(String name,
String defaultVal) |
Types.OpOpData |
getOperationType()
method to get operation type, i.e.
|
String |
getStringValue() |
boolean |
isLiteral()
method to check if this data lop represents a literal.
|
boolean |
isPersistentRead() |
boolean |
isPersistentWrite() |
void |
setExecType(LopProperties.ExecType et)
Data-Lop-specific method to set the execution type for persistent write.
|
String |
toString()
Method to have Lops print their state.
|
addInput, addOutput, addToDag, createReachable, getBeginColumn, getBeginLine, getDataType, getEndColumn, getEndLine, getExecType, getFilename, getID, getInputs, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getInstructions, getLevel, getOutputParameters, getOutputs, getPrivacyConstraint, getProducesIntermediateOutput, getReachable, getSimpleInstructionType, getType, getValueType, getVisited, isDataExecLocation, isVariable, prepInputOperand, prepInputOperand, prepOperand, prepOperand, prepOutputOperand, prepOutputOperand, prepOutputOperand, prepScalarInputOperand, prepScalarInputOperand, prepScalarLabel, prepScalarOperand, printErrorLocation, removeConsumer, resetVisitStatus, setAllPositions, setBeginColumn, setBeginLine, setConsumerCount, setDataType, setEndColumn, setEndLine, setFilename, setPrivacyConstraint, setValueType, setVisited
public static final String PREAD_PREFIX
public Data(Types.OpOpData op, Lop input, HashMap<String,Lop> inputParametersLops, String name, String literal, Types.DataType dt, Types.ValueType vt, Types.FileFormat fmt)
input
must be provided. This will always be added as the first element in input
array.
For literals: this function is invoked through the static method createLiteralLop
.op
- operation typeinput
- low-level operatorinputParametersLops
- input lopsname
- string nameliteral
- string literaldt
- data typevt
- value typefmt
- file formatpublic static Data createLiteralLop(Types.ValueType vt, String literalValue)
vt
- value typeliteralValue
- literal valuepublic void setExecType(LopProperties.ExecType et)
et
- execution typepublic Types.FileFormat getFileFormatType()
public String toString()
Lop
public Types.OpOpData getOperationType()
public HashMap<String,Lop> getInputParams()
public boolean isLiteral()
public boolean getBooleanValue()
public double getDoubleValue()
public long getLongValue()
public String getStringValue()
public boolean isPersistentWrite()
public boolean isPersistentRead()
public String getInstructions(String input1, String input2)
getInstructions
in class Lop
input1
- input 1input2
- outputpublic String getInstructions()
getInstructions
in class Lop
public String getInstructions(String outputFileName)
Lop
getInstructions
in class Lop
outputFileName
- outputCopyright © 2020 The Apache Software Foundation. All rights reserved.