Class MvelContext

java.lang.Object
com.linkedin.feathr.offline.mvel.MvelContext

public class MvelContext extends Object
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.
  • Field Details

    • mvelAlienUDFRegisterClazz

      public static Optional<org.apache.spark.broadcast.Broadcast<Class<?>>> mvelAlienUDFRegisterClazz
    • alienUDFInitialized

      public static Boolean 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 ParserContext in 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 per MVEL.executeExpression(Object, Object), with added support for com.linkedin.feathr.offline.mvel.plugins.FeathrMvelPluginContext. (Output objects that can be converted to FeatureValue via 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 per MVEL.executeExpression(Object, Object, VariableResolverFactory), with added support for com.linkedin.feathr.offline.mvel.plugins.FeathrMvelPluginContext. (Output objects that can be converted to FeatureValue via plugins, will be converted after MVEL returns.)