Package com.linkedin.feathr.offline.mvel
Class MvelContext
java.lang.Object
com.linkedin.feathr.offline.mvel.MvelContext
Some MVEL hackery to enable use in Feathr.
MVEL is an open-source expression language and runtime that makes it easy to write concise statements that operate
on structured data objects (such as Avro records), among other things.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAllows easy access to the properties of GenericRecord object from MVEL. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic ObjectexecuteExpressionWithPluginSupport(Object compiledExpression, Object ctx, com.linkedin.feathr.offline.mvel.plugins.FeathrExpressionExecutionContext mvelContext) Evaluate MVEL expression as perMVEL.executeExpression(Object, Object), with added support forcom.linkedin.feathr.offline.mvel.plugins.FeathrMvelPluginContext.static ObjectexecuteExpressionWithPluginSupportWithFactory(Object compiledExpression, Object ctx, org.mvel2.integration.VariableResolverFactory variableResolverFactory, com.linkedin.feathr.offline.mvel.plugins.FeathrExpressionExecutionContext mvelContext) Evaluate MVEL expression as perMVEL.executeExpression(Object, Object, VariableResolverFactory), with added support forcom.linkedin.feathr.offline.mvel.plugins.FeathrMvelPluginContext.static org.mvel2.ParserContextGives access to our helper methods from within an MVEL expression.
-
Field Details
-
mvelAlienUDFRegisterClazz
-
alienUDFInitialized
-
-
Method Details
-
ensureInitialized
public static void ensureInitialized() -
newParserContext
public static org.mvel2.ParserContext newParserContext()Gives access to our helper methods from within an MVEL expression.- Returns:
- an MVEL
ParserContextin which our helper UDFs are available
-
executeExpressionWithPluginSupport
public static Object executeExpressionWithPluginSupport(Object compiledExpression, Object ctx, com.linkedin.feathr.offline.mvel.plugins.FeathrExpressionExecutionContext mvelContext) Evaluate MVEL expression as perMVEL.executeExpression(Object, Object), with added support forcom.linkedin.feathr.offline.mvel.plugins.FeathrMvelPluginContext. (Output objects that can be converted toFeatureValuevia plugins, will be converted after MVEL returns.) -
executeExpressionWithPluginSupportWithFactory
public static Object executeExpressionWithPluginSupportWithFactory(Object compiledExpression, Object ctx, org.mvel2.integration.VariableResolverFactory variableResolverFactory, com.linkedin.feathr.offline.mvel.plugins.FeathrExpressionExecutionContext mvelContext) Evaluate MVEL expression as perMVEL.executeExpression(Object, Object, VariableResolverFactory), with added support forcom.linkedin.feathr.offline.mvel.plugins.FeathrMvelPluginContext. (Output objects that can be converted toFeatureValuevia plugins, will be converted after MVEL returns.)
-