API service for deploy, and manage YARN services have several limitations.
updateService API provides multiple functions:
- Stopping a service.
- Start a service.
- Increase or decrease number of containers. (This was removed in
The overloading is buggy depending on how the configuration should be applied.
A user retrieves Service object from getService call, and the Service object contains state: STARTED. The user would like to increase number of containers for the deployed service. The JSON has been updated to increase container count. The PUT method does not actually increase container count.
A user retrieves Service object from getService call, and the Service object contains state: STOPPED. The user would like to make a environment configuration change. The configuration does not get updated after PUT method.
This is possible to address by rearranging the logic of START/STOP after configuration update. However, there are other potential combinations that can break PUT method. For example, user like to make configuration changes, but not yet restart the service until a later time.
There is no API to list all deployed applications by the same user.
Desired state (spec) and current state are represented by the same Service object. There is no easy way to identify "state" is desired state to reach or, the current state of the service. It would be nice to have ability to retrieve both desired state, and current state with separated entry points. By implementing /spec and /state, it can resolve this problem.
List all services deploy by the same user can trigger a directory listing operation on namenode if hdfs is used as storage for metadata. When hundred of users use Service UI to view or deploy applications, this will trigger denial of services attack on namenode. The sparse small metadata files also reduce efficiency of Namenode memory usage. Hence, a cache layer for storing service metadata can reduce namenode stress.
ApiService can separate the PUT method into two PUT methods for configuration changes vs operation changes. New API could look like:
SOLR can be used to cache Yarnfile to improve lookup performance and reduce stress of namenode small file problems and high frequency lookup. SOLR is chosen for caching metadata because its indexing feature can be used to build full text search for application catalog as well.
For service that requires configuration changes to increase or decrease node count. The calling sequence is:
For components that can increase node count without rewrite configuration: