Today CDAP determines the number of instances of a system service using the following logic -
- If the num instances is not set in HBase, then use – min (max instances, num instances from cdap-site.xml)
- If the num instances is set in HBase, then use – min (max instances, num instances from HBase)
This means the num instances value from cdap-site.xml will only be used for the first time CDAP runs. After that, the value from cdap-site.xml is always ignored even when it is changed later. The user sees the new value in cdap-site.xml, and expects that to be used.
This logic of using a value from two different places causes confusion to the user. We need to figure out a way to make this logic straightforward to the user.
Also I could not find this logic documented anywhere in CDAP docs.