org.apache.sysds.conf

## Class ConfigurationManager

- java.lang.Object
- - org.apache.sysds.conf.ConfigurationManager

-     public class ConfigurationManager
      extends Object

  Singleton for accessing the parsed and merged system configuration. NOTE: parallel execution of multiple DML scripts (in the same JVM) with different configurations would require changes/extensions of this class.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigurationManager()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `clearLocalConfigs()` Removes the thread-local dml and compiler configurations, leading to a reinitialization on the next get unless set in between.
    `static int` | `getBlocksize()`
    `static org.apache.hadoop.mapred.JobConf` | `getCachedJobConf()` Returns a cached JobConf object, intended for global use by all operations with read-only access to job conf.
    `static CompilerConfig` | `getCompilerConfig()` Gets the current thread-local compiler configuration.
    `static boolean` | `getCompilerConfigFlag(CompilerConfig.ConfigType key)` Get a boolean compiler config in a robust manner, returning false if config not existing.
    `static DMLConfig` | `getDMLConfig()` Gets the current thread-local dml configuration.
    `static String` | `getScratchSpace()`
    `static boolean` | `isCodegenEnabled()`
    `static boolean` | `isDynamicRecompilation()`
    `static boolean` | `isParallelMatrixOperations()`
    `static boolean` | `isParallelParFor()`
    `static void` | `setCachedJobConf(org.apache.hadoop.mapred.JobConf job)`
    `static void` | `setGlobalConfig(CompilerConfig conf)`
    `static void` | `setGlobalConfig(DMLConfig conf)` Sets a global configuration as a basis for any thread-local configurations.
    `static void` | `setLocalConfig(CompilerConfig conf)` Sets the current thread-local compiler configuration to the given config.
    `static void` | `setLocalConfig(DMLConfig conf)` Sets the current thread-local dml configuration to the given config.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConfigurationManager

          public ConfigurationManager()

  - ### Method Detail

    - #### getCachedJobConf

          public static org.apache.hadoop.mapred.JobConf getCachedJobConf()

      Returns a cached JobConf object, intended for global use by all operations with read-only access to job conf. This prevents to read the hadoop conf files over and over again from classpath. However,
      Returns:
        the cached JobConf

    - #### setCachedJobConf

          public static void setCachedJobConf(org.apache.hadoop.mapred.JobConf job)

    - #### setGlobalConfig

          public static void setGlobalConfig(DMLConfig conf)

      Sets a global configuration as a basis for any thread-local configurations. NOTE: This global configuration should never be accessed directly but only through its thread-local derivatives.
      Parameters:
        `conf` - the configuration

    - #### setLocalConfig

          public static void setLocalConfig(DMLConfig conf)

      Sets the current thread-local dml configuration to the given config.
      Parameters:
        `conf` - the configuration

    - #### getDMLConfig

          public static DMLConfig getDMLConfig()

      Gets the current thread-local dml configuration.
      Returns:
        the dml configuration

    - #### setGlobalConfig

          public static void setGlobalConfig(CompilerConfig conf)

    - #### setLocalConfig

          public static void setLocalConfig(CompilerConfig conf)

      Sets the current thread-local compiler configuration to the given config.
      Parameters:
        `conf` - the compiler configuration

    - #### clearLocalConfigs

          public static void clearLocalConfigs()

      Removes the thread-local dml and compiler configurations, leading to a reinitialization on the next get unless set in between.

    - #### getCompilerConfig

          public static CompilerConfig getCompilerConfig()

      Gets the current thread-local compiler configuration.
      Returns:
        the compiler configuration

    - #### getCompilerConfigFlag

          public static boolean getCompilerConfigFlag(CompilerConfig.ConfigType key)

      Get a boolean compiler config in a robust manner, returning false if config not existing.
      Parameters:
        `key` - config type
      Returns:
        compiler config flag

    - #### getScratchSpace

          public static String getScratchSpace()

    - #### getBlocksize

          public static int getBlocksize()

    - #### isDynamicRecompilation

          public static boolean isDynamicRecompilation()

    - #### isParallelMatrixOperations

          public static boolean isParallelMatrixOperations()

    - #### isParallelParFor

          public static boolean isParallelParFor()

    - #### isCodegenEnabled

          public static boolean isCodegenEnabled()

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