Package org.apache.sysds.utils
Class MLContextProxy
- java.lang.Object
- 
- org.apache.sysds.utils.MLContextProxy
 
- 
 public class MLContextProxy extends Object 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 SummaryConstructors Constructor Description MLContextProxy()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static MLContextgetActiveMLContext()static MLContextgetActiveMLContextForAPI()static booleanisActive()static voidsetActive(boolean flag)static voidsetAppropriateVarsForRead(Expression source, String targetname)
 
- 
- 
- 
Method Detail- 
setActivepublic static void setActive(boolean flag) 
 - 
isActivepublic static boolean isActive() 
 - 
setAppropriateVarsForReadpublic static void setAppropriateVarsForRead(Expression source, String targetname) 
 - 
getActiveMLContextpublic static MLContext getActiveMLContext() 
 - 
getActiveMLContextForAPIpublic static MLContext getActiveMLContextForAPI() 
 
- 
 
-