Yunikorn Scheduler Interface defines protobuf interfaces for the communication between the yunikorn-core and the resource management systems.
For detailed information on the components and how to build the overall scheduler please see the yunikorn-core.
The interface has two parts:
Both interfaces are build from the same source.
The source and documentation are included in one file the scheduler-interface-spec
The protocol definition is extracted from the documentation by the build. The extracted protocol definition and the source code generated from the definition are part of the repository but should not be modified directly.
The interface is defined in the specification as blocks of type
protobuf as follows:
```protobuf defintion following the protobuf specifications ```
The blocks of definitions are extracted from the specification file and added together to form the protobuf input. The definitions cannot have lines exceeding 200 characters.
The output of this build is required to build the scheduler and the shims for the resource manager(s). However to allow building those projects against a predefined interface and without the requirement of generating the interface artifacts in each build the generated artifacts are part of the repository for direct use.
The dependent projects can use the interface by importing github.com/apache/incubator-yunikorn-scheduler-interface/lib/go/si as part of the code:
package example import "github.com/apache/incubator-yunikorn-scheduler-interface/lib/go/si"
To be added: currently only the go source code artifact is generated.
The scheduler interface is used by all other components of yunikorn. For building the scheduler and its shims please check the instructions in the How to build section in the yunikorn-core repository.
The build process will download and install all required tools to build the artifact. Building the interface should only be required if the interface has been modified.
Including the modified interface in other components without updating the repository is possible by replacing the artifact checked out from the repository with the newly generated artifact. The exact procedure depends on the language the component is written in.
See how to contribute code from this guide.