Package org.apache.sysds.conf
Class ConfigurationManager
java.lang.Object
org.apache.sysds.conf.ConfigurationManager
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidRemoves the thread-local dml and compiler configurations, leading to a reinitialization on the next get unless set in between.static intstatic org.apache.hadoop.mapred.JobConfReturns a cached JobConf object, intended for global use by all operations with read-only access to job conf.static CompilerConfigGets the current thread-local compiler configuration.static booleanGet a boolean compiler config in a robust manner, returning false if config not existing.static Compression.CompressConfigstatic intstatic intstatic longstatic DMLConfigGets the current thread-local dml configuration.static intstatic intstatic intstatic intstatic intstatic Stringstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic voidsetCachedJobConf(org.apache.hadoop.mapred.JobConf job) static voidstatic 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.
-
Constructor Details
-
ConfigurationManager
public ConfigurationManager()
-
-
Method Details
-
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.- Returns:
- the cached JobConf
-
setCachedJobConf
public static void setCachedJobConf(org.apache.hadoop.mapred.JobConf job) -
setGlobalConfig
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
Sets the current thread-local dml configuration to the given config.- Parameters:
conf- the configuration
-
getDMLConfig
Gets the current thread-local dml configuration.- Returns:
- the dml configuration
-
setGlobalConfig
-
setLocalConfig
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
Gets the current thread-local compiler configuration.- Returns:
- the compiler configuration
-
getCompilerConfigFlag
Get a boolean compiler config in a robust manner, returning false if config not existing.- Parameters:
key- config type- Returns:
- compiler config flag
-
getScratchSpace
-
getBlocksize
public static int getBlocksize() -
isDynamicRecompilation
public static boolean isDynamicRecompilation() -
isParallelMatrixOperations
public static boolean isParallelMatrixOperations() -
isParallelTransform
public static boolean isParallelTransform() -
isParallelTokenize
public static boolean isParallelTokenize() -
isStagedParallelTransform
public static boolean isStagedParallelTransform() -
getNumberTokenizeBlocks
public static int getNumberTokenizeBlocks() -
getParallelApplyBlocks
public static int getParallelApplyBlocks() -
getParallelBuildBlocks
public static int getParallelBuildBlocks() -
getNumThreads
public static int getNumThreads() -
isParallelParFor
public static boolean isParallelParFor() -
isCodegenEnabled
public static boolean isCodegenEnabled() -
isFederatedRuntimePlanner
public static boolean isFederatedRuntimePlanner() -
isCompressionEnabled
public static boolean isCompressionEnabled() -
getCompressConfig
-
getFederatedTimeout
public static int getFederatedTimeout() -
getDeltaReaderBatchSize
public static int getDeltaReaderBatchSize()- Returns:
- rows per parquet read batch for the native Delta reader
-
getDeltaWriterBatchSize
public static int getDeltaWriterBatchSize()- Returns:
- matrix rows materialized per columnar batch for the native Delta writer
-
getDeltaWriterTargetFileSize
public static long getDeltaWriterTargetFileSize()- Returns:
- upper bound (bytes) on the native Delta writer's target data-file size
-
isDeltaWriterAdaptiveFileSize
public static boolean isDeltaWriterAdaptiveFileSize()- Returns:
- whether the native Delta writer adaptively sizes data files for parallel reads
-
isFederatedSSL
public static boolean isFederatedSSL() -
isFederatedReadCacheEnabled
public static boolean isFederatedReadCacheEnabled() -
isPrefetchEnabled
public static boolean isPrefetchEnabled() -
isMaxPrallelizeEnabled
public static boolean isMaxPrallelizeEnabled() -
isAutoLinearizationEnabled
public static boolean isAutoLinearizationEnabled() -
isParallelIOEnabled
public static boolean isParallelIOEnabled() -
isBroadcastEnabled
public static boolean isBroadcastEnabled() -
isCheckpointEnabled
public static boolean isCheckpointEnabled() -
isRuleBasedGPUPlacement
public static boolean isRuleBasedGPUPlacement() -
isAutoEvictionEnabled
public static boolean isAutoEvictionEnabled() -
getLinearizationOrder
-