Class 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.
    • Constructor Detail

      • Data

        public 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. 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 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

      • createLiteralLop

        public static Data createLiteralLop​(Types.ValueType vt,
                                            String literalValue)
        Method to create literal LOPs.
        vt - value type
        literalValue - literal value
        literal low-level operator
      • getFileFormatType

        public Types.FileFormat getFileFormatType()
        method to get format type for input, output files.
        file format
      • toString

        public String toString()
        Description copied from class: Lop
        Method to have Lops print their state. This is for debugging purposes.
        Specified by:
        toString in class Lop
      • getOperationType

        public Types.OpOpData getOperationType()
        method to get operation type, i.e. read/write.
        operation type
      • getInputParams

        public HashMap<String,​Lop> getInputParams()
        method to get inputParams
        input parameters
      • getNamedInputLop

        public Lop getNamedInputLop​(String name)
      • getNamedInputLop

        public Lop getNamedInputLop​(String name,
                                    String defaultVal)
      • isLiteral

        public boolean isLiteral()
        method to check if this data lop represents a literal.
        true if data lop is a literal
      • getBooleanValue

        public boolean getBooleanValue()
      • getDoubleValue

        public double getDoubleValue()
      • getLongValue

        public long getLongValue()
      • getStringValue

        public String getStringValue()
      • isPersistentWrite

        public boolean isPersistentWrite()
      • isPersistentRead

        public boolean isPersistentRead()
      • isTransientWrite

        public boolean isTransientWrite()
      • isTransientRead

        public boolean isTransientRead()
      • getInstructions

        public 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.
        getInstructions in class Lop
        input1 - input 1
        input2 - output
        instructions as string
      • getInstructions

        public String getInstructions()
        Method to generate createvar instruction that updates symbol table with metadata, hdfsfile name, etc.
        getInstructions in class Lop
        instructions as string
      • getInstructions

        public String getInstructions​(String outputFileName)
        Description copied from class: Lop
        Method should be overridden if needed
        getInstructions in class Lop
        outputFileName - output
        instructions as string
      • getCreateVarInstructions

        public String getCreateVarInstructions​(String outputFileName,
                                               String outputLabel)