Search in sources :

Example 1 with CompilingClassLoader

use of com.hortonworks.streamline.streams.sql.compiler.javac.CompilingClassLoader in project streamline by hortonworks.

the class PlanCompiler method compile.

public AbstractValuesProcessor compile(RelNode plan) throws Exception {
    String javaCode = generateJavaSource(plan);
    LOG.debug("Compiling... source code {}", javaCode);
    ClassLoader cl = new CompilingClassLoader(getClass().getClassLoader(), PACKAGE_NAME + ".Processor", javaCode, null);
    return (AbstractValuesProcessor) cl.loadClass(PACKAGE_NAME + ".Processor").newInstance();
}
Also used : CompilingClassLoader(com.hortonworks.streamline.streams.sql.compiler.javac.CompilingClassLoader) CompilingClassLoader(com.hortonworks.streamline.streams.sql.compiler.javac.CompilingClassLoader) AbstractValuesProcessor(com.hortonworks.streamline.streams.sql.runtime.AbstractValuesProcessor)

Aggregations

CompilingClassLoader (com.hortonworks.streamline.streams.sql.compiler.javac.CompilingClassLoader)1 AbstractValuesProcessor (com.hortonworks.streamline.streams.sql.runtime.AbstractValuesProcessor)1