Package org.apache.drill.yarn.appMaster
Class DrillControllerFactory
java.lang.Object
org.apache.drill.yarn.appMaster.DrillControllerFactory
- All Implemented Interfaces:
ControllerFactory
Builds a controller for a cluster of Drillbits. The AM is designed to be
mostly generic; only this class contains knowledge that the tasks being
managed are drillbits. This design ensures that we can add other Drill
components in the future without the need to make major changes to the AM
logic.
The controller consists of a generic dispatcher and cluster controller, along with a Drill-specific scheduler and task launch specification. Drill also includes an interface to ZooKeeper to monitor Drillbits.
The AM is launched by YARN. All it knows is what is in its launch environment
or configuration files. The client must set up all the information that the
AM needs. Static information appears in configuration files. But, dynamic
information (or that which is inconvenient to repeat in configuration files)
must arrive in environment variables. See DrillOnYarnConfig
for more
information.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.yarn.appMaster.ControllerFactory
ControllerFactory.ControllerFactoryException
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addIfSet
(LaunchSpec spec, String configParam, String envVar) Utility method to create an environment variable in the process launch specification if a given Drill-on-YARN configuration variable is set, copying the config value to the environment variable.build()
-
Constructor Details
-
DrillControllerFactory
public DrillControllerFactory()
-
-
Method Details
-
build
- Specified by:
build
in interfaceControllerFactory
- Throws:
ControllerFactory.ControllerFactoryException
-
addIfSet
Utility method to create an environment variable in the process launch specification if a given Drill-on-YARN configuration variable is set, copying the config value to the environment variable.- Parameters:
spec
- launch specificationconfigParam
- config valueenvVar
- environment variable
-