Package org.apache.sysds.utils
Class MLContextProxy
java.lang.Object
org.apache.sysds.utils.MLContextProxy
The purpose of this proxy is to shield systemds internals from direct access to MLContext
which would try to load spark libraries and hence fail if these are not available. This
indirection is much more efficient than catching NoClassDefFoundErrors for every access
to MLContext (e.g., on each recompile).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MLContextstatic MLContextstatic booleanisActive()static voidsetActive(boolean flag) static voidsetAppropriateVarsForRead(Expression source, String targetname)
-
Constructor Details
-
MLContextProxy
public MLContextProxy()
-
-
Method Details
-
setActive
public static void setActive(boolean flag) -
isActive
public static boolean isActive() -
setAppropriateVarsForRead
-
getActiveMLContext
-
getActiveMLContextForAPI
-