org.apache.sysml.api

Class DMLScript



  • public class DMLScript
    extends Object
    • Field Detail

      • STATISTICS

        public static boolean STATISTICS
      • STATISTICS_COUNT

        public static int STATISTICS_COUNT
      • ENABLE_DEBUG_MODE

        public static boolean ENABLE_DEBUG_MODE
      • USE_LOCAL_SPARK_CONFIG

        public static boolean USE_LOCAL_SPARK_CONFIG
      • DML_FILE_PATH_ANTLR_PARSER

        public static String DML_FILE_PATH_ANTLR_PARSER
      • EXPLAIN

        public static org.apache.sysml.utils.Explain.ExplainType EXPLAIN
      • SCRIPT_TYPE

        public static ScriptType SCRIPT_TYPE
        Global variable indicating the script type (DML or PYDML). Can be used for DML/PYDML-specific tasks, such as outputting booleans in the correct case (TRUE/FALSE for DML and True/False for PYDML).
      • USE_ACCELERATOR

        public static boolean USE_ACCELERATOR
      • FORCE_ACCELERATOR

        public static boolean FORCE_ACCELERATOR
      • _suppressPrint2Stdout

        public static boolean _suppressPrint2Stdout
      • _uuid

        public static String _uuid
      • _activeAM

        public static boolean _activeAM
      • USAGE

        public static String USAGE
    • Constructor Detail

      • DMLScript

        public DMLScript()
    • Method Detail

      • getUUID

        public static String getUUID()
      • setUUID

        public static void setUUID(String uuid)
        Used to set master UUID on all nodes (in parfor remote_mr, where DMLScript passed) in order to simplify cleanup of scratch_space and local working dirs.
        Parameters:
        uuid - master UUID to set on all nodes
      • suppressPrint2Stdout

        public static boolean suppressPrint2Stdout()
      • setActiveAM

        public static void setActiveAM()
      • isActiveAM

        public static boolean isActiveAM()
      • main

        public static void main(String[] args)
                         throws IOException,
                                DMLException
        Default DML script invocation (e.g., via 'hadoop jar SystemML.jar -f Test.dml')
        Parameters:
        args - command-line arguments
        Throws:
        IOException - if an IOException occurs
        DMLException - if a DMLException occurs
      • executeScript

        public static boolean executeScript(org.apache.hadoop.conf.Configuration conf,
                                            String[] args)
                                     throws DMLException
        Single entry point for all public invocation alternatives (e.g., main, executeScript, JaqlUdf etc)
        Parameters:
        conf - Hadoop configuration
        args - arguments
        Returns:
        true if success, false otherwise
        Throws:
        DMLException - if DMLException occurs
        org.apache.sysml.parser.ParseException - if ParseException occurs
      • createArgumentsMap

        protected static Map<String,String> createArgumentsMap(boolean hasNamedArgs,
                                                               String[] args)
                                                        throws org.apache.sysml.parser.LanguageException
        Throws:
        org.apache.sysml.parser.LanguageException
      • readDMLScript

        protected static String readDMLScript(String argname,
                                              String script)
                                       throws IOException,
                                              org.apache.sysml.parser.LanguageException
        Throws:
        IOException
        org.apache.sysml.parser.LanguageException
      • cleanupHadoopExecution

        public static void cleanupHadoopExecution(org.apache.sysml.conf.DMLConfig config)
                                           throws IOException,
                                                  org.apache.sysml.parser.ParseException
        Throws:
        IOException
        org.apache.sysml.parser.ParseException

Copyright © 2017 The Apache Software Foundation. All rights reserved.