Package org.apache.sysds.api
Class DMLScript
- java.lang.Object
- 
- org.apache.sysds.api.DMLScript
 
- 
 public class DMLScript extends Object 
- 
- 
Field Summary
 - 
Constructor SummaryConstructors Constructor Description DMLScript()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcleanupHadoopExecution(DMLConfig config)static voiderrorPrint(Exception e)Print the error in a user friendly manner.static booleanexecuteScript(org.apache.hadoop.conf.Configuration conf, String[] args)Single entry point for all public invocation alternatives (e.g., main, executeScript, JaqlUdf etc)static Types.ExecModegetGlobalExecMode()static StringgetUUID()static voidinitHadoopExecution(DMLConfig config)static booleanisActiveAM()static voidloadConfiguration(String fnameOptConfig)static voidmain(String[] args)Main entry point for systemDS dml script executionstatic StringreadDMLScript(boolean isFile, String scriptOrFilename)Reads the DML/PyDML script into a Stringstatic voidsetActiveAM()static voidsetGlobalExecMode(Types.ExecMode mode)static voidsetGlobalFlags(DMLConfig dmlconf)Sets the global flags in DMLScript based on user provided configurationstatic voidsetUUID(String uuid)Used to set master UUID on all nodes (in parfor remote, where DMLScript passed) in order to simplify cleanup of scratch_space and local working dirs.static booleansuppressPrint2Stdout()
 
- 
- 
- 
Field Detail- 
STATISTICSpublic static boolean STATISTICS 
 - 
JMLC_MEM_STATISTICSpublic static boolean JMLC_MEM_STATISTICS 
 - 
STATISTICS_COUNTpublic static int STATISTICS_COUNT 
 - 
STATISTICS_MAX_WRAP_LENpublic static int STATISTICS_MAX_WRAP_LEN 
 - 
FED_STATISTICSpublic static boolean FED_STATISTICS 
 - 
FED_STATISTICS_COUNTpublic static int FED_STATISTICS_COUNT 
 - 
FED_WORKERpublic static boolean FED_WORKER 
 - 
EXPLAINpublic static Explain.ExplainType EXPLAIN 
 - 
DML_FILE_PATH_ANTLR_PARSERpublic static String DML_FILE_PATH_ANTLR_PARSER 
 - 
FLOATING_POINT_PRECISIONpublic static String FLOATING_POINT_PRECISION 
 - 
PRINT_GPU_MEMORY_INFOpublic static boolean PRINT_GPU_MEMORY_INFO 
 - 
EVICTION_SHADOW_BUFFER_MAX_BYTESpublic static long EVICTION_SHADOW_BUFFER_MAX_BYTES 
 - 
EVICTION_SHADOW_BUFFER_CURR_BYTESpublic static long EVICTION_SHADOW_BUFFER_CURR_BYTES 
 - 
GPU_MEMORY_UTILIZATION_FACTORpublic static double GPU_MEMORY_UTILIZATION_FACTOR 
 - 
GPU_MEMORY_ALLOCATORpublic static String GPU_MEMORY_ALLOCATOR 
 - 
LINEAGEpublic static boolean LINEAGE 
 - 
LINEAGE_DEDUPpublic static boolean LINEAGE_DEDUP 
 - 
LINEAGE_REUSEpublic static LineageCacheConfig.ReuseCacheType LINEAGE_REUSE 
 - 
LINEAGE_POLICYpublic static LineageCacheConfig.LineageCachePolicy LINEAGE_POLICY 
 - 
LINEAGE_ESTIMATEpublic static boolean LINEAGE_ESTIMATE 
 - 
LINEAGE_DEBUGGERpublic static boolean LINEAGE_DEBUGGER 
 - 
CHECK_PRIVACYpublic static boolean CHECK_PRIVACY 
 - 
USE_ACCELERATORpublic static boolean USE_ACCELERATOR 
 - 
FORCE_ACCELERATORpublic static boolean FORCE_ACCELERATOR 
 - 
SYNCHRONIZE_GPUpublic static boolean SYNCHRONIZE_GPU 
 - 
EAGER_CUDA_FREEpublic static boolean EAGER_CUDA_FREE 
 - 
SEEDpublic static int SEED 
 - 
_suppressPrint2Stdoutpublic static boolean _suppressPrint2Stdout 
 - 
USE_LOCAL_SPARK_CONFIGpublic static boolean USE_LOCAL_SPARK_CONFIG 
 - 
_activeAMpublic static boolean _activeAM 
 - 
VALIDATOR_IGNORE_ISSUESpublic static boolean VALIDATOR_IGNORE_ISSUES If true, allow DMLProgram to be generated while not halting due to validation errors/warnings
 - 
_uuidpublic static String _uuid 
 
- 
 - 
Method Detail- 
getUUIDpublic static String getUUID() 
 - 
setUUIDpublic static void setUUID(String uuid) Used to set master UUID on all nodes (in parfor remote, where DMLScript passed) in order to simplify cleanup of scratch_space and local working dirs.- Parameters:
- uuid- master UUID to set on all nodes
 
 - 
suppressPrint2Stdoutpublic static boolean suppressPrint2Stdout() 
 - 
setActiveAMpublic static void setActiveAM() 
 - 
isActiveAMpublic static boolean isActiveAM() 
 - 
mainpublic static void main(String[] args) Main entry point for systemDS dml script execution- Parameters:
- args- command-line arguments
 
 - 
executeScriptpublic static boolean executeScript(org.apache.hadoop.conf.Configuration conf, String[] args) throws IOException, ParseException, DMLScriptExceptionSingle 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:
- IOException- If an internal IOException happens.
- ParseException
- DMLScriptException
 
 - 
readDMLScriptpublic static String readDMLScript(boolean isFile, String scriptOrFilename) throws IOException Reads the DML/PyDML script into a String- Parameters:
- isFile- Whether the string argument is a path to a file or the script itself
- scriptOrFilename- script or filename
- Returns:
- a string representation of the script
- Throws:
- IOException- if error
 
 - 
loadConfigurationpublic static void loadConfiguration(String fnameOptConfig) throws IOException - Throws:
- IOException
 
 - 
setGlobalFlagspublic static void setGlobalFlags(DMLConfig dmlconf) Sets the global flags in DMLScript based on user provided configuration- Parameters:
- dmlconf- user provided configuration
 
 - 
initHadoopExecutionpublic static void initHadoopExecution(DMLConfig config) throws IOException, ParseException, DMLRuntimeException 
 - 
cleanupHadoopExecutionpublic static void cleanupHadoopExecution(DMLConfig config) throws IOException, ParseException - Throws:
- IOException
- ParseException
 
 - 
getGlobalExecModepublic static Types.ExecMode getGlobalExecMode() 
 - 
setGlobalExecModepublic static void setGlobalExecMode(Types.ExecMode mode) 
 - 
errorPrintpublic static void errorPrint(Exception e) Print the error in a user friendly manner.- Parameters:
- e- The exception thrown.
 
 
- 
 
-