Package org.apache.drill.exec.compile
Class ClassCompilerSelector
java.lang.Object
org.apache.drill.exec.compile.ClassCompilerSelector
Selects between the two supported Java compilers: Janino and
the build-in Java compiler.
Session Options
- exec.java_compiler
- The compiler to use. Valid options are defined in the
ClassCompilerSelector.CompilerPolicy
enum. - exec.java_compiler_debug
- If debug logging is enabled, then
AbstractClassCompiler
writes the generated Java code to the log file prior to compilation. This option adds line numbers to the logged code. - exec.java_compiler_janino_maxsize
- The maximum size of code that the Janino compiler can handle. Larger code is handled by the JDK compiler. Defaults to 256K.
Configuration Options
Configuration options are used when the above session options are unset.- drill.exec.compile.compiler
- Default for exec.java_compiler
- drill.exec.compile.debug
- Default for exec.java_compiler_debug
- drill.exec.compile.janino_maxsize
- Default for exec.java_compiler_janino_maxsize
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final OptionValidator
static final String
static final String
static final OptionValidator
static final String
static final String
static final String
static final TypeValidators.StringValidator
-
Constructor Summary
ConstructorDescriptionClassCompilerSelector
(ClassLoader classLoader, DrillConfig config, OptionSet sessionOptions) -
Method Summary
Modifier and TypeMethodDescriptioncompile
(ClassTransformer.ClassNames className, String sourceCode)
-
Field Details
-
JAVA_COMPILER_JANINO_MAXSIZE_CONFIG
- See Also:
-
JAVA_COMPILER_DEBUG_CONFIG
- See Also:
-
JAVA_COMPILER_CONFIG
- See Also:
-
JAVA_COMPILER_OPTION
- See Also:
-
JAVA_COMPILER_JANINO_MAXSIZE_OPTION
- See Also:
-
JAVA_COMPILER_JANINO_MAXSIZE
-
JAVA_COMPILER_DEBUG_OPTION
- See Also:
-
JAVA_COMPILER_DEBUG
-
JAVA_COMPILER_VALIDATOR
-
-
Constructor Details
-
ClassCompilerSelector
-
-
Method Details
-
compile
public Map<String,byte[]> compile(ClassTransformer.ClassNames className, String sourceCode) throws org.codehaus.commons.compiler.CompileException, ClassNotFoundException, ClassTransformationException, IOException - Throws:
org.codehaus.commons.compiler.CompileException
ClassNotFoundException
ClassTransformationException
IOException
-