use of org.apache.metron.stellar.dsl.functions.resolver.FunctionResolver in project metron by apache.
the class KafkaFunctionsIntegrationTest method run.
/**
* Runs a Stellar expression.
* @param expression The expression to run.
*/
private Object run(String expression) {
// make the global properties available to the function
Context context = new Context.Builder().with(Context.Capabilities.GLOBAL_CONFIG, () -> global).build();
// execute the expression
StellarProcessor processor = new StellarProcessor();
return processor.parse(expression, new DefaultVariableResolver(x -> variables.get(x), x -> variables.containsKey(x)), functionResolver, context);
}
Aggregations