Package 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 SummaryConstructors Constructor Description ConfigurationManager()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclearLocalConfigs()Removes the thread-local dml and compiler configurations, leading to a reinitialization on the next get unless set in between.static intgetBlocksize()static org.apache.hadoop.mapred.JobConfgetCachedJobConf()Returns a cached JobConf object, intended for global use by all operations with read-only access to job conf.static CompilerConfiggetCompilerConfig()Gets the current thread-local compiler configuration.static booleangetCompilerConfigFlag(CompilerConfig.ConfigType key)Get a boolean compiler config in a robust manner, returning false if config not existing.static Compression.CompressConfiggetCompressConfig()static DMLConfiggetDMLConfig()Gets the current thread-local dml configuration.static intgetFederatedTimeout()static intgetNumThreads()static intgetParallelApplyBlocks()static intgetParallelBuildBlocks()static StringgetScratchSpace()static booleanisCodegenEnabled()static booleanisCompressionEnabled()static booleanisDynamicRecompilation()static booleanisFederatedRuntimePlanner()static booleanisFederatedSSL()static booleanisParallelMatrixOperations()static booleanisParallelParFor()static booleanisParallelTransform()static booleanisStagedParallelTransform()static voidsetCachedJobConf(org.apache.hadoop.mapred.JobConf job)static voidsetGlobalConfig(CompilerConfig conf)static voidsetGlobalConfig(DMLConfig conf)Sets a global configuration as a basis for any thread-local configurations.static voidsetLocalConfig(CompilerConfig conf)Sets the current thread-local compiler configuration to the given config.static voidsetLocalConfig(DMLConfig conf)Sets the current thread-local dml configuration to the given config.
 
- 
- 
- 
Method Detail- 
getCachedJobConfpublic 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
 
 - 
setCachedJobConfpublic static void setCachedJobConf(org.apache.hadoop.mapred.JobConf job) 
 - 
setGlobalConfigpublic 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
 
 - 
setLocalConfigpublic static void setLocalConfig(DMLConfig conf) Sets the current thread-local dml configuration to the given config.- Parameters:
- conf- the configuration
 
 - 
getDMLConfigpublic static DMLConfig getDMLConfig() Gets the current thread-local dml configuration.- Returns:
- the dml configuration
 
 - 
setGlobalConfigpublic static void setGlobalConfig(CompilerConfig conf) 
 - 
setLocalConfigpublic static void setLocalConfig(CompilerConfig conf) Sets the current thread-local compiler configuration to the given config.- Parameters:
- conf- the compiler configuration
 
 - 
clearLocalConfigspublic static void clearLocalConfigs() Removes the thread-local dml and compiler configurations, leading to a reinitialization on the next get unless set in between.
 - 
getCompilerConfigpublic static CompilerConfig getCompilerConfig() Gets the current thread-local compiler configuration.- Returns:
- the compiler configuration
 
 - 
getCompilerConfigFlagpublic 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
 
 - 
getScratchSpacepublic static String getScratchSpace() 
 - 
getBlocksizepublic static int getBlocksize() 
 - 
isDynamicRecompilationpublic static boolean isDynamicRecompilation() 
 - 
isParallelMatrixOperationspublic static boolean isParallelMatrixOperations() 
 - 
isParallelTransformpublic static boolean isParallelTransform() 
 - 
isStagedParallelTransformpublic static boolean isStagedParallelTransform() 
 - 
getParallelApplyBlockspublic static int getParallelApplyBlocks() 
 - 
getParallelBuildBlockspublic static int getParallelBuildBlocks() 
 - 
getNumThreadspublic static int getNumThreads() 
 - 
isParallelParForpublic static boolean isParallelParFor() 
 - 
isCodegenEnabledpublic static boolean isCodegenEnabled() 
 - 
isFederatedRuntimePlannerpublic static boolean isFederatedRuntimePlanner() 
 - 
isCompressionEnabledpublic static boolean isCompressionEnabled() 
 - 
getCompressConfigpublic static Compression.CompressConfig getCompressConfig() 
 - 
getFederatedTimeoutpublic static int getFederatedTimeout() 
 - 
isFederatedSSLpublic static boolean isFederatedSSL() 
 
- 
 
-