@PublicEvolving public interface Compiler
Compiler interface provides a way to implement your
own version of compiler for directive or recipe.
This interface contains methods that provides variants of the source
from which the recipe are read. It support reading from string, HDFS location
and Path.
Each of the methods would return CompileStatus objects that
contains the compiled directives in the form of Executor or
iterator of SyntaxError in case of failure to compile.
| Modifier and Type | Method and Description |
|---|---|
CompileStatus |
compile(org.apache.twill.filesystem.Location location)
Compiles the recipe that is supplied in a
Location on HDFS. |
CompileStatus |
compile(Path path)
Compiles the recipe that is supplied in a
Path on Filesystem. |
CompileStatus |
compile(String recipe)
Compiles the recipe that is supplied in a
String format. |
CompileStatus compile(String recipe) throws CompileException
String format.recipe - representing the String form of recipe.CompileStatus status of compilation.CompileExceptionCompileStatus compile(org.apache.twill.filesystem.Location location) throws CompileException
Location on HDFS.location - Location to the recipe being compiled.CompileStatus status of compilation.CompileExceptionCompileStatus compile(Path path) throws CompileException
Path on Filesystem.path - Path to the recipe being compiled.CompileStatus status of compilation.CompileExceptionCopyright © 2020 CDAP Licensed under the Apache License, Version 2.0.