...
Step 2 - Annotate stack configs (Non-UI Metadata)
Each configuration that is used by the service's theme has to provide extra metadata about the configuration. The list of available metadata are:
display-name
value-attributes
type
string
value-list
float
int
boolean
minimum
maximum
unit
increment-step
entries
entry
value
description
depends-on
property
type
name
...
Dependencies between configurations is a directed-acyclic-graph (DAG). When a configuration is updated, the UI has to determine its effect on other configs in the graph. To determine this, the /recommendations endpoint should be provided an array of what configurations have been just changed in the changed_configurations field. Based on the provided changed-configs, only its dependencies are updated in the response.
Example:
Figure below shows some config dependencies - A effects B and C, each of which effects DE and FG respectively.
|
Now assume user changes B to B' - a call to /recommendations will only change D and E to D' and E' respectively (AB'CD'E'FG). No other config will be changed. Now assume that C is changed to C' - /recommendations will only change F and G to F' and G' while still keeping the values of B' D' E' intact (AB'C'D'E'F'G'). Now if you change A to A', it will affect all its children (A'B''C''D''E''F''G''). The user will have chance to pick and choose which he wants to apply.
...
Step 3 - Restart Ambari server
...
Restarting ambari-server is required for any changes in the themes or the stack-definition to be loaded.
Reference
...
HDFS HDP-2.2 theme.json
YARN HDP-2.2 theme.json
HIVE HDP-2.2 theme.json
Appendix
Appendix A - Widget Metadata Usage
Widget | Metadata Used | ||
---|---|---|---|
Slider | <value-attributes> | ||
Combo, List | <value-attributes> | ||